Update.
[glibc.git] / linuxthreads / ChangeLog
blobb4c474a2a6e88b589d4635111b7f79c66bcfa0e3
1 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
2             Wolfram Gloger <wg@malloc.de>
4         * join.c: Protect all communications from and to manager with
5         TEMP_FAILURE_RETRY.
6         * manager.c: Likewise.
7         * pthread.c: Likewise.
8         * smeaphore.c: Likewise.
10 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
12         * spinlock.c (__pthread_lock): Top max_count value with
13         MAX_ADAPTIVE_SPIN_COUNT.
14         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
16         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
17         help P4.
19 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
21         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
22         non-opaque type if __USE_UNIX98.
24 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
26         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
27         non-opaque lock types also if _IO_MTSAFE_IO is defined.
29 2001-08-23  Roland McGrath  <roland@frob.com>
31         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
32         new first argument, skip the cleanup handler if it's zero.
33         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
34         (__libc_lock_define_initialized_recursive): Use it.
35         * sysdeps/pthread/bits/stdio-lock.h: File removed.
36         The sysdeps/generic file from the main tree now suffices.
38 2001-08-22  Roland McGrath  <roland@frob.com>
40         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
41         instead of <pthread.h>.
42         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
43         (_IO_lock_initializer): Add braces.
44         (_IO_lock_lock): Use __libc_lock_lock_recursive.
45         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
47         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
48         (__libc_lock_define_initialized_recursive): Use it.
49         (__libc_lock_init_recursive): Likewise.
50         (__libc_lock_fini_recursive): Likewise.
51         (__libc_lock_lock_recursive): Likewise.
52         (__libc_lock_trylock_recursive): Likewise.
53         (__libc_lock_unlock_recursive): Likewise.
54         (__libc_lock_define_recursive): New macro.
56 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
58         * lockfile.c (__pthread_provide_lockfile): New variable.
59         * pthread.c (__pthread_require_lockfile): New variable.
60         * cancel.c (__pthread_require_lockfile): New variable.
62 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
64         * tst-context.c (threadfct): Initialize context before calling
65         makecontext.
67         * Examples/ex17.c: Make sure test thread is around long enough.
69 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
71         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
73 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
75         * tst-context.c (main): Print explanation before bailing out
76         because context handling is not supported.
78 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
80         * Makefile (tests): Add tst-context.
81         * tst-context.c: New file.
83         * sysdeps/pthread/bits/stdio-lock.h: Define
84         _IO_cleanup_region_start_noarg.
86 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
88         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
89         (ARCH_STACK_MAX_SIZE): Define.
90         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
91         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
93 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
95         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
97         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
98         (ARCH_STACK_MAX_SIZE): Define.
99         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
100         NEED_SEPARATE_REGISTER_STACK.
102 2001-07-16  Andreas Schwab  <schwab@suse.de>
104         * Makefile (before-compile): Don't add $(objpfx)crti.o.
105         (omit-deps): Add crti.
106         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
107         it is filtered out of the link command.
109 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
111         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
112         to find the right value for __pthread_initial_thread_bos, it's not
113         used.  If not FLOATING_STACKS first run
114         __pthread_init_max_stacksize.
116 2001-06-16  H.J. Lu  <hjl@gnu.org>
118         * internals.h: Include <stackinfo.h>.
120         * attr.c: Don't include <stackinfo.h> here.
121         * cancel.c: Likewise.
122         * manager.c: Likewise.
123         * pthread.c: Likewise.
124         * ptlongjmp.c: Likewise.
126 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
128         * attr.c: Make _STACK_GROWS_UP work.
129         * internals.h: Likewise.
130         * manager.c: Likewise.
131         * pthread.c: Likewise.
133 2001-06-15  H.J. Lu  <hjl@gnu.org>
135         * pthread.c (__pthread_reset_main_thread): Fix a typo.
137 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
139         * semaphore.h: Use struct _pthread_fastlock as an element of
140         sem_t instead of an identical struct.
141         * rwlock.c: Remove casts.
142         * semaphore.c: Likewise.
144 2001-04-30  Alan Modra  <amodra@one.net.au>
146         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
148 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
150         * linuxthreads.texi: Spelling corrections.
152 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
154         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
155         returning successfully.
156         Patch by Gene Cooperman <gene@ccs.neu.edu>.
158 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
160         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
161         serious work try once whether the lock is uncontested.
162         Remove duplicate reading of __status before loop.
163         Change suggested by Hans Boehm <hans_boehm@hp.com>.
165         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
166         (__pthread_alt_trylock): Likewise.
168 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
170         Memory barrier overhaul following line by line inspection.
171         * mutex.c (pthread_once): Missing memory barriers added.
172         * pthread.c (__pthread_wait_for_restart_signal,
173         __pthread_timedsuspend_new, __pthread_restart_new): Added
174         memory barriers ``just in case'' and for documentary value.
175         * spinlock.c (__pthread_release): New inline function for releasing
176         spinlock, to complement __pthread_acquire.  Includes memory
177         barrier prior to assignment to spinlock, and __asm __volatile
178         dance to prevent reordering or optimization of the spinlock access.
179         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
180         __pthread_alt_timedlock, __pthread_alt_unlock,
181         __pthread_compare_and_swap): Updated to use new __pthread_release
182         instead of updating spinlock directly.
183         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
184         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
185         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
186         Memory barrier overhaul.  Lots of missing memory barriers added,
187         a couple needless ones removed.
188         * spinlock.c (__pthread_compare_and_swap): testandset optimization
189         removed, just calls __pthread_acquire, which has the new read
190         barrier in it before its testandset.
192 2001-05-20  Roland McGrath  <roland@frob.com>
194         * Makeconfig: New file, variables used to be in main libc Makeconfig.
196 2001-05-09  Geoff Keating  <geoffk@redhat.com>
198         * sysdeps/powerpc/pt-machine.h
199         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
200         (__compare_and_swap): Remove memory barriers.
201         (__compare_and_swap_with_release_semantics): New function.
203 2001-04-24  Andreas Jaeger  <aj@suse.de>
205         * wrapsyscall.c: send* and recv* return ssize_t.
207         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
208         mutex instead of double locking it.
209         Reported by Pierre Artaud <partaud@sodatec.com>.
211 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
213         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
214         using #ifdef whether the clock is available.
215         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
217         * sysdeps/ia64/Versions: New file.
219         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
220         have to call __gmon_start__ in the libpthread DSO.
221         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
223         * Makefile (libpthread-routines): Add ptclock_gettime and
224         ptclock_settime.
225         * internals.h: Don't use cpuclock-init.h definitions, use
226         hp-timing.h definitions.
227         * pthread.c: Likewise.
228         * manager.c: Likewise.
229         * ptclock_gettime.c: New file.
230         * ptclock_settime.c: New file.
231         * internals.h: Fix parameter type for __pthread_clock_gettime and
232         __pthread_clock_settime.
234         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
235         * sysdeps/i386/i586/ptclock_settime.c: Removed.
236         * sysdeps/i386/i586/Makefile: Removed.
238 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
240         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
241         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
243 2001-04-21  Andreas Jaeger  <aj@suse.de>
245         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
246         attribute, remove statements that will never be executed.
247         (thread_func): Remove mutex_unlock call since it's never executed.
248         (thread_func): Fix comment as suggested by Jakub Jelinek.
250         * manager.c (__pthread_manager): Add noreturn
251         attribute.
252         (pthread_start_thread): Likewise, remove return statement.
253         (pthread_start_thread_event): Likewise.
254         Add noreturn attribute for pthread_handle_exit.
255         * weaks.c: Add noreturn attribute for pthread_exit.
257         * internals.h: Add __pthread_clock_gettime and
258         __pthread_clock_settime prototypes.
260 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
262         * internals.h: Include <cpuclock-init.h>.
263         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
264         CPUCLOCK_VARDEF is defined.
265         * pthread.c (__pthread_initialize_minimal): Initialize
266         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
267         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
268         for new thread to current CPU clock value.
270         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
272         * sysdeps/i386/i586/Makefile: New file.
273         * sysdeps/i386/i586/Versions: New file.
274         * sysdeps/i386/i586/ptclock_gettime.c: New file.
275         * sysdeps/i386/i586/ptclock_settime.c: New file.
276         * sysdeps/i386/i686/Implies: New file.
278 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
280         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
281         $generated, not $postclean-generated.
283 2001-04-18  Andreas Jaeger  <aj@suse.de>
285         * Makefile (otherlibs): Added.
287 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
289         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
291 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
293         * signals.c (sigwait): NSIG is no signal number.  Block all
294         signals while in signal handler for signals in SET.
295         Patch by Manfred Spraul <manfred@colorfullife.com>.
297 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
299         * tst-cancel.c: Disable most tests.  Add new test where all
300         cleanup handlers must run.
301         * Makefile (tests): Add tst-cancel again.
303         * cancel.c (__pthread_perform_cleanup): Correct condition for
304         leaving cleanup loop early.
306         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
307         all the files which use CURRENT_STACK_FRAME.
308         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
309         __builtin_frame_address.
310         * sysdeps/i386/i686/pt-machine.h: Likewise.
312 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
314         * Makefile (tests): Comment out tst-cancel for now.
316         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
317         temporary file in object directory.
318         * Makefile: Don't allow inlining when compiling tst-cancel.c.
319         Pass $(objpfx) to tst-cancel.
321 2001-04-11  David S. Miller  <davem@redhat.com>
323         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
324         up closer to user local variables so that new cleanup heuristics work.
325         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
327 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
329         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
330         and remove it.
331         (_pthread_cleanup_push_defer): Likewise.
333         * tst-cancel.c (main): Fix loop printing cleanup output.
335 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
337         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
338         test.
339         (__pthread_spin_trylock): Likewise.
340         * sysdeps/sh/pt-machine.h (testandset): Likewise.
342 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
344         * join.c (pthread_exit): Move code to new function __pthread_do_exit
345         which takes an extra parameter with the current frame pointer.
346         Call new function with CURRENT_STACK_FRAME.
347         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
348         with the new parameter.
349         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
350         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
351         this parameter as the initial value the cleanup handler records are
352         compared against.  No active cleanup handler record must have an
353         address lower than the previous one and the initial record must be
354         above (below on PA) the frame address passed in.
355         (pthread_setcancelstate): Call __pthread_do_exit instead of
356         pthread_exit.
357         (pthread_setcanceltype): Likewise.
358         (pthread_testcancel): Likewise.
359         (_pthread_cleanup_pop_restore): Likewise.
360         * condvar.c (pthread_cond_wait): Likewise.
361         (pthread_cond_timedwait_relative): Likewise.
362         * manager.c (pthread_start_thread): Likewise.
363         * oldsemaphore.c (__old_sem_wait): Likewise.
364         * pthread.c (pthread_handle_sigcancel): Likewise.
365         * semaphore.c (__new_sem_wait): Likewise.
366         (sem_timedwait): Likewise.
367         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
368         to limit the cleanup handlers which get run.
369         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
370         for __pthread_perform_cleanup.
372         * Makefile (tests): Add tst-cancel.
373         * tst-cancel.c: New file.
375 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
377         * sysdeps/cris/pt-machine.h: New file.
378         * sysdeps/cris/pspinlock.c: New file.
380 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
382         * shlib-versions: Add case for Linux on CRIS.
384 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
386         * attr.c (pthread_getattr_np): Correct computation of stack size
387         for machiens with register stack.
389         * Examples/ex17.c (main): Correct detection of failed mmap call.
391 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
393         * pthread.c (__pthread_initialize_manager): Fix a typo.
395 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
397         * attr.c (__pthread_attr_setstack): Fix alignment check.
398         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
399         * Makefile (tests): Add ex17 test.
400         * Examples/ex17.c: New test.
402 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
404         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
405         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
406         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
408 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
410         * Makefile: When generating DSO link with libc_nonshared.a.
412 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
414         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
416 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
418         * internals.h (__pthread_init_max_stacksize): New prototype.
419         * attr.c (__pthread_attr_setstacksize): Call
420         __pthread_init_max_stacksize if not yet initialized.
421         * pthread.c (__pthread_init_max_stacksize): New function.
422         (__pthread_initialize_manager): Call it.
423         Patch by <dtc@cmucl.cons.org>.
425 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
427         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
429 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
431         * shlib-versions: Add rule for Linux on 64 bit S/390.
432         * sysdeps/s390/s390-64/pt-machine.h: New file.
433         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
435 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
437         * sysdeps/s390/pt-machine.h: Move to...
438         * sysdeps/s390/s390-32/pt-machine.h: ...here.
439         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
441 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
443         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
444         * attr.c: Implement pthread_getattr_np.
445         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
446         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
447         * manager.c (pthread_handle_create): Initialize p_inheritsched.
449 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
451         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
452         code alignment.
454 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
456         * manager.c (manager_mask): Removed static vesion.  Now always local
457         to __pthread_manager().
458         (manager_mask_all): Removed completely.
459         (__pthread_manager): Remove manager_mask_all initialization.
460         (pthread_handle_create): Remove code to set and reset signal mask
461         around __clone2() calls.
463 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
465         * spinlock.c (__pthread_lock): Force lock->__status to be read from
466         memory on every spin.
468 2001-02-10  Andreas Jaeger  <aj@suse.de>
470         * Makefile (extra-objs): New.
472 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
474         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
475         __pthread_initialize_minimal prototype.
477 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
479         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
481 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
483         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
485 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
487         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
488         broken code.  Patch by Jes Sorensen.
490 2001-02-06  Andreas Jaeger  <aj@suse.de>
492         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
493         to...
494         * internals.h: ...here.
496 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
498         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
500 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
502         * Versions: Remove __pthread_initialize_minimal.
504 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
506         * Makefile: Add rules to build crti.o and make it being used in
507         building libpthread.so.
508         * sysdeps/i386/Makefile: New file.
509         * sysdeps/pthread/pt-initfini.c: New file.
511         * pthread.c: Cleanups.
513 2001-01-28  Andreas Jaeger  <aj@suse.de>
515         * oldsemaphore.c (__old_sem_init): Adjust for last change.
516         * sysdeps/pthread/bits/libc-lock.h: Likewise.
517         * spinlock.c: Likewise.
519 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
521         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
522         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
523         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
524         * pthread.c: Likewise.
525         * spinlock.h: Likewise.
526         * sysdeps/pthread/pthread.h: Likewise.
528 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
530         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
531         as struct __pthread_attr_s.
533         * semaphore.h (sem_t): Cleanup namespace, rename status and
534         spinlock elements.
536 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
538         * pthread.c (pthread_onexit_process): Clear
539         __pthread_manager_thread_bos after freeing it.
540         * Makefile (tests): Add ex16.
541         * Examples/ex16.c: New file.
543 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
545         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
546         -z nodelete.
547         * pthread.c (pthread_exit_process): Rename to...
548         (pthread_onexit_process): ...this.
549         (pthread_atexit_process, pthread_atexit_retcode): New.
550         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
551         and only if HAVE_Z_NODELETE is not defined.
552         (__pthread_initialize_manager): Register pthread_atexit_retcode
553         with __cxa_atexit.
555 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
557         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
559 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
561         * Makefile (tests): Add ex15.
562         * Examples/ex15.c: New test.
564 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
566         * pthread.c (pthread_exit_process): Free memory allocated for
567         manager stack.
569 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
571         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
572         (pthread_free): Always unmap the stack.  It's safe now that we don't
573         use MAP_FIXED to allocate stacks.
575 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
577         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
579         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
581 2000-11-15  Wolfram Gloger  <wg@malloc.de>
583         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
584         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
586 2000-12-27  Andreas Jaeger  <aj@suse.de>
588         * Examples/ex13.c: Make local functions static.
589         * ecmutex.c: Likewise.
590         * joinrace.c: Likewise.
591         * Examples/ex14.c: Likewise.
593         * Examples/ex2.c: Make local functions static; reformat.
594         * Examples/ex1.c: Likewise.
595         * Examples/ex4.c: Likewise.
596         * Examples/ex5.c: Likewise.
597         * Examples/ex7.c: Likewise.
599         * oldsemaphore.c: Add prototypes to shut up GCC.
600         * pt-machine.c: Likewise.
602         * weaks.c: Add prototype for pthread_exit.
604         * internals.h: Add some prototypes, format prototypes and add
605         missing externs.
606         Move __libc_waitpid prototype to include/sys/wait.h.
608         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
609         * mutex.c: Likewise.
610         * specific.c: Likewise.
611         * ptfork.c: Likewise.
613         * lockfile.c: Include internals.h to get prototypes.
614         * events.c: Likewise.
615         * sysdeps/alpha/pspinlock.c: Likewise.
616         * sysdeps/arm/pspinlock.c: Likewise.
617         * sysdeps/hppa/pspinlock.c: Likewise.
618         * sysdeps/i386/pspinlock.c: Likewise.
619         * sysdeps/ia64/pspinlock.c: Likewise.
620         * sysdeps/m68k/pspinlock.c: Likewise.
621         * sysdeps/mips/pspinlock.c: Likewise.
622         * sysdeps/powerpc/pspinlock.c: Likewise.
623         * sysdeps/s390/pspinlock.c: Likewise.
624         * sysdeps/sh/pspinlock.c: Likewise.
625         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
626         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
627         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
629 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
631         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
632         (__pthread_attr_getstack): Return correct address.
633         Add warnings for using pthread_attr_getstackaddr and
634         pthread_attr_setstackaddr.
636 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
638         * Examples/ex6.c (test_thread): Make static.
639         * Examples/ex12.c (test_thread): Make static and add noreturn
640         attribute.
642 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
644         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
645         and compare_and_swap_with_release_semantics returns int not long.
647 2000-12-17  Andreas Jaeger  <aj@suse.de>
649         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
650         value.
651         * sysdeps/arm/pt-machine.h (testandset): Likewise.
652         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
653         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
654         * sysdeps/sh/pt-machine.h (testandset): Likewise.
655         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
656         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
658 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
660         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
661         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
663 2000-12-17  Andreas Jaeger  <aj@suse.de>
665         * internals.h: Add prototypes for testandset and
666         __compare_and_swap to shut up gcc warnings.
668 2000-12-06  Wolfram Gloger  <wg@malloc.de>
670         * join.c (pthread_detach): Allow case where the thread has already
671         terminated.
673 2000-12-05  Andreas Jaeger  <aj@suse.de>
675         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
676         * sysdeps/mips/pt-machine.h (testandset): Likewise.
677         (__compare_and_swap): Likewise.
678         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
680 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
682         * Examples/ex3.c (main): Cast int to long before casting to void *.
683         (search): Cast void * to long, not int.
684         * Examples/ex8.c (main, thread): Similarly.
685         * Examples/ex11.c (main): Similarly.
686         * Examples/ex14.c (worker, do_test): Similarly.
687         * ecmutex.c (worker, do_test): Similarly.
688         (nlocks): Cast to int.
690 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
692         * linuxthreads.texi:  Add documentation for pthreads attributes
693         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
694         patch.  Document pthread_[sg]etconcurrency().  Mark
695         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
697 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
699         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
700         Don't define it.
701         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
702         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
704 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
706         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
707         not doing it right now.
708         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
710 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
712         * Examples/ex4.c (main): Don't use exit() to avoid warning with
713         broken compilers.
715 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
717         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
718         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
720         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
721         discussing mutexes. (As per the Unix98 name for the API.)
722         Changes documentation for pthread_mutexattr_setkind_np() and
723         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
724         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
725         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
726         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
727         Begins to introduce discussion of the ``timed'' mutex type.  This
728         discussion is currently incomplete.
729         Patch by Bruce Mitchener <bruce@cubik.org>.
731 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
732             Yutaka Niibe  <gniibe@chroot.org>
734         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
735         has restrictions, use register.
737 2000-10-23  Andreas Schwab  <schwab@suse.de>
739         * Examples/ex14.c (TIMEOUT): Override default timeout.
741 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
743         * specific.c: Protect tsd array modification in thread data
744         structures by getting the thread lock in pthread_key_delete and
745         __pthread_destroy_specifics.
746         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
748 2000-10-12  Alan Modra <alan@linuxcare.com.au>
750         * sysdeps/pthread/bits/initspin.h: New file.
751         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
752         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
753         (__pthread_alt_init_lock): Likewise.
754         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
756 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
758         * oldsemaphore.c (__old_sem_init): Release lock with
759         LT_SPINLOCK_INIT, not zero.
760         * spinlock.c (__pthread_unlock): Likewise.
761         (__pthread_alt_lock): Likewise.
762         (__pthread_alt_timedlock): Likewise.
763         (__pthread_alt_unlock): Likewise.
764         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
765         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
766         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
767         LT_SPINLOCK_INIT do initialize spinlocks not 0.
769 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
771         * shlib-versions: Add version definitions for hppa-linux.
773 2000-10-12  Alan Modra <alan@linuxcare.com.au>
775         * sysdeps/hppa/pspinlock.c: New file.
776         * sysdeps/hppa/pt-machine.h: New file.
777         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
779 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
781         * mutex.c (__pthread_mutex_destroy): Correct test of
782         busy mutex for mutexes using alternate fastlocks.
783         Patch by dtc@cmucl.cons.org.
785 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
787         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
789 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
791         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
792         test for owner first.
793         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
795         * cancel.c (pthread_cancel): Don't do anything if cancelation is
796         disabled.
798 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
800         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
801         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
803         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
804         _POSIX_MONOTONIC_CLOCK.
806         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
807         and explain why.
809 2000-09-20  Andreas Jaeger  <aj@suse.de>
811         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
812         "testrtsig.h" conditional.
814 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
816         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
817         pthread_attr_setstack.
818         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
819         pthread_attr_setstack.
820         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
822 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
824         * Examples/ex14.c: New file.
825         * Makefile (tests): Add ex14.
827         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
828         mutex.  Patch by dtc@cmucl.cons.org.
830         * ecmutex.c: New file.
831         * Makefile (tests): Add ecmutex.
833 2000-09-04  H.J. Lu  <hjl@gnu.org>
835         * attr.c (__pthread_attr_setguardsize): Use page_roundup
836         instead of roundup to round up to the page size.
838 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
840         * manager.c (pthread_exited): Correctly report event as TD_REAP
841         instead of TD_DEATH.  Fix comments.
843 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
845         * spinlock.h (testandset): Add cast to avoid warning.
846         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
848 2000-09-02  Andreas Jaeger  <aj@suse.de>
850         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
851         prototype.
853 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
855         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
856         Fix typo in last patch (_mode -> _flags).
858         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
859         Provide definition which respects _IO_USER_LOCK flag.
861 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
863         * manager.c (pthread_allocate_stack): Clear descriptor only if not
864         mmaped.
866 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
868         * Makefile: Add rules to build and run unload.
869         * unload.c: New file.
871         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
873         * sysdeps/pthread/pthread.h
874         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
875         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
877 2000-08-24  Andreas Jaeger  <aj@suse.de>
879         * Examples/ex13.c: Include <string.h> for strerror prototype and
880         <stdlib.h> for abort prototype.
881         (pthr_cond_signal_mutex): Rewrite to silence GCC.
882         (thread_start): Remove unused variable err.
883         (main): Silence GCC warnings.
885 2000-08-22  Andreas Jaeger  <aj@suse.de>
887         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
889         * Makefile (tests): Add ex13.
891 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
893         * semaphore.h: Add restrict where required by AGd4.
894         * sysdeps/pthread/pthread.h: Likewise.
895         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
897 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
899         * Makefile (tests): Add ex12.  Add rule to build it.
900         * Examples/ex12.c: New file.
902 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
904         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
905         even though the implementation is not quite complete (but it reports
906         it).  Define _POSIX_MESSAGE_PASSING to -1.
907         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
909 2000-08-12  Andreas Jaeger  <aj@suse.de>
911         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
912         assembler.
913         (__compare_and_swap): Likewise.
914         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
916 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
918         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
919         p_h_errnop correctly and not to NULL.
921 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
923         * Banner: Bump version number to 0.9.
925 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
927         * Makefile (tests): Add tststack.  Add rule to build the program.
928         * tststack.c: New file.
930         * internals.h: Declare __pthread_max_stacksize.
931         * pthread.c (__pthread_max_stacksize): New variable.
932         (__pthread_initialize_manager): Determine __pthread_initialize_manager
933         value.
934         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
935         (pthread_allocate_stack): Allow kernel to choose stack address if
936         FLOATING_STACKS.  This also handles variable-sized stacks.
937         Always allocate stack and guardpage together.  Use mprotect to
938         change guardpage access.
939         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
940         ARCH_STACK_MAX_SIZE.
942         * attr.c (__pthread_attr_setstacksize): Also test value against
943         upper limit.
945         * manager.c (__pthread_nonstandard_stacks): Define only if
946         THREAD_SELF is not defined.
947         (pthread_allocate_stack): Always initialize gardaddr to a correct
948         value.
949         (pthread_handle_create): Unmap thread with one call.
950         (pthread_free): Remove test for initial thread before removing stack.
951         Unmap stack with one call.
953         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
954         1 to avoid removing the stack.
956 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
958         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
959         load of spin lock to prime the cache before the atomic compare and
960         exchange operation (cmpxchg4). This avoids the spinning on the
961         cmpxchg4 instruction and reduces movement of the cache line back
962         and forth between the processors (explanation by Asis K. Mallick
963         from Intel). This basically makes the implementation operate the
964         same as the Linux kernel implementation.
966         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
967         * sysdeps/ia64/pspinlock.c: New file.
969 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
971         * pthread.c: Move definition of __pthread_set_own_extricate_if...
972         * spinlock.h: ...here.  Remove locking.
973         * internals.h: Remove __pthread_set_own_extricate_if prototype.
975         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
976         (rwlock_rd_extricate_func): Don't determine self, let
977         __pthread_lock do it.
978         (rwlock_wr_extricate_func): Likewise.
979         (rwlock_have_already): Optimize *pself handling a bit.
981         * mutex.c: Use __builtin_expect.
982         * pthread.c: Likewise.
984 2000-08-02  Andreas Jaeger  <aj@suse.de>
986         * sysdeps/s390/pspinlock.c: New file.
987         * sysdeps/s390/pt-machine.h: New file.
988         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
990 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
992         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
993         R3K.
994         * sysdeps/mips/pt-machine.h (testandset): Likewise.
996 2000-07-26  Andreas Jaeger  <aj@suse.de>
998         * pthread.c: Initialize p_sem_avail.
1000 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
1002         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1003         * semaphore.c: Handle spurious wakeups.
1005         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1006         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1008         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1009         (__pthread_wait_for_restart): Likewise.
1011         * condvar.c (pthread_cond_wait): Also check whether thread is
1012         cancelable before aborting loop.
1013         (pthread_cond_timedwait): Likewise.
1015         * signals.c (pthread_sighandler): Remove special code to restrore
1016         %gs on x86.
1017         (pthread_sighandler_t): Likewise.
1019 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
1021         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1022         * pthread.c: Include <resolv.h>.
1023         (_res): Undefine.  Add extern declaration.
1025 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
1027         * pthread.c (__pthread_initial_thread): Update initializer.
1028         (__pthread_manager_thread): Likewise.
1029         (pthread_initialize): Move setrlimit call to...
1030         (__pthread_initialize_manager): ...here.
1031         (__pthread_reset_main_thread): Reset also soft limit on stack size.
1033         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
1034         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1036 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
1038         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1039         __compare_and_swap to define testandset.
1040         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1041         Define IMPLEMENT_TAS_WITH_CAS.
1043 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
1045         * Makefile: Pass -z nodelete to linker for libpthread.so
1046         generation if it understand this option.
1048 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
1050         * manager.c (pthread_handle_create): Remove initialization of
1051         new_thread->p_res._sock.
1053 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
1055         Bugfixes to the variant of the code for machines with no compare
1056         and swap.
1058         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1059         node was not being properly enqueued, due to failing to update
1060         the lock->__status field.
1062         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1063         being set inappropriately, causing the suspend function to be called
1064         with a null self pointer and crash.
1066 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
1068         * spinlock.h (__pthread_alt_trylock): Fix code used if no
1069         compare&swap is available.
1071         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1072         compare_and_swap.
1074         * pthread.c (pthread_initialize): Don't use sysconf to determine
1075         whether the machine has more than one processor.
1077         * spinlock.c (__pthread_alt_timedlock): Add back one of the
1078         removed thread_self calls.
1080 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1082         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1083         __compare_and_swap to compare_and_swap in code which assumes
1084         compare swap is available.
1086 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1088         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1089         bug whereby thr field of waitnode structure would not be correctly
1090         set unless a null self pointer is passed to the functions.
1091         Eliminated redundant calls to thread_self().
1093 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
1095         * pthread.c (__pthread_initialize_manager): Lock
1096         __pthread_manager_thread.p_lock before calling clone.
1098 2000-05-05  H.J. Lu  <hjl@gnu.org>
1100         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1101         have acquire semantics.
1102         (__compare_and_swap_with_release_semantics): New inline
1103         function.
1104         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1106 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
1108         * manager.c: Fix the problem with signals at startup.
1109         Change the way that thread stacks are allocated on IA64.
1110         Clean up some of the guard page allocation stuff.
1112 1999-12-19  H.J. Lu  <hjl@gnu.org>
1114         * internals.h (page_roundup): New.
1115         * attr.c (__pthread_attr_setguardsize); Use page_roundup
1116         instead of roundup.
1117         * manager.c (pthread_allocate_stack): Make sure guardaddr is
1118         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1119         is define.
1121 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
1123         * manager.c (pthread_allocate_stack): Unmap the stack top
1124         if failed to map the stack bottom.
1125         Fix the guard page.
1126         (pthread_free): Fix the guard page.
1128         * pthread.c (pthread_initialize): Set rlimit correctly for
1129         NEED_SEPARATE_REGISTER_STACK.
1131 1999-12-16  H.J. Lu  <hjl@gnu.org>
1133         * pthread.c (__pthread_initialize_manager): Pass
1134         __pthread_manager_thread_bos instead of
1135         __pthread_manager_thread_tos to __clone2.
1137 1999-12-16  H.J. Lu  <hjl@gnu.org>
1139         * manager.c (pthread_allocate_stack): Correct the calculation
1140         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1141         stack bottom.
1143 1999-12-13  H.J. Lu  <hjl@gnu.org>
1145         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1146         bit after setting ar.ccv.
1148 1999-12-12  H.J. Lu  <hjl@gnu.org>
1150         * manager.c (pthread_allocate_stack): Make the starting
1151         address of the stack bottom page aligned. FIXME: it may
1152         need changes in other places.
1153         (pthread_handle_create): Likewise.
1155 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
1157         * manager.c (pthread_allocate_stack): Handle
1158         NEED_SEPARATE_REGISTER_STACK.
1159         (pthread_handle_create): Likewise.
1160         * pthread.c (__pthread_initialize_manager): Likewise.
1162         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1164 1999-12-02  H.J. Lu  <hjl@gnu.org>
1166         * sysdeps/ia64/pt-machine.h: New.
1168 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
1170         * wrapsyscall.c: Mark non-__ protected names as weak.
1171         PR libc/1466.
1173 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
1175         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1177 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
1179         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1180         Add tests also to new alternative spinlock implementation.
1181         * spinlock.h: Likewise.
1182         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1184 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
1186         * Version: Export __sigaction.
1187         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
1188         of __sigaction.
1189         * pthread.c: Use __libc_sigaction instead of __sigaction.
1191         * condvar.c: Implement pthread_condattr_getpshared and
1192         pthread_condattr_setpshared.
1193         * mutex.c: Implement pthread_mutexattr_getpshared and
1194          pthread_mutexattr_setpshared.
1195         * Versions: Export new functions.
1196         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1198         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1199         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1200         is not selected.
1202 2000-07-04  Greg McGary  <greg@mcgary.org>
1204         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1205         pragmas.  Include bp-sym.h only if _LIBC.
1207 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
1209         * spinlock.c (__pthread_unlock): Properly place write barrier.
1210         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1212 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
1214         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1215         faster on SMP systems.  No more emulation of compare&swap for adaptive
1216         spinlocks.
1217         * spinlock.h: Likewise.
1218         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1219         Replace fast with adaptive mutex.
1220         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1221         * condvar.c: Likewise.
1222         * pthread.c: Define and initialize __pthread_smp_kernel variable.
1223         * internals.h: Declare __pthread_smp_kernel.
1224         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1225         _pthread_fastlock structure.
1226         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1228         * pthread.c: Remove initialization to zero from global variables.
1230 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
1232         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1234 2000-06-28  Greg McGary  <greg@mcgary.org>
1236         * weaks.c: Wrap BP_SYM () around weak extern declarations of
1237         pthread functions that have pointers in their return+arg signatures.
1239 2000-06-27  Greg McGary  <greg@mcgary.org>
1241         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1242         extern declarations of pthread functions that have pointers in
1243         their return+arg signatures.
1245 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
1247         * Makefile (tests): Add ex11.  Add rules to build it.
1248         * Examples/ex11.c: New file.
1249         * rwlock.c: Fix complete braindamaged previous try to implement
1250         timedout functions.
1252         * spinlock.c: Pretty print.
1254 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
1256         * Makefile (tests): Add ex10.  Add rules to build it.
1257         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1258         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1259         * condvar.c (pthread_cond_wait): Allow mutex of kind
1260         PTHREAD_MUTEX_TIMED_NP.
1261         (pthread_cond_timedwait_relative): Likewise.
1262         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1263         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1264         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1265         (__pthread_mutex_lock): Use __pthread_alt_lock for
1266         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1267         (__pthread_mutex_timedlock): New function.
1268         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1269         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1270         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1271         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1272         * spinlock.c: Implement alternate fastlocks.
1273         * spinlock.h: Add prototypes.
1274         * Examples/ex10.c: New file.
1275         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1276         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1278         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1279         (__pthread_rwlock_timedrdlock): New function.
1280         (__pthread_rwlock_timedwrlock): New function.
1281         Use laternate fastlock function everywhere.
1283 2000-06-21  Andreas Jaeger  <aj@suse.de>
1285         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1286         prototype.
1288         * join.c: Include <stdlib.h> for exit prototype.
1290 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
1292         * sysdeps/i386/useldt.h: Include <stdlib.h>.
1294         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1295         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1297         * Makefile (libpthread-routines): Add barrier.
1298         (tests): Add ex9.  Add rule to build ex9.
1299         * Versions: Export barrier functions.
1300         * barrier.c: New file.
1301         * Examples/ex9.c: New file.
1302         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1303         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1304         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1306 2000-06-19  H.J. Lu  <hjl@gnu.org>
1308         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1309         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1310         (compare_and_swap_with_release_semantics): New. Default to
1311         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1312         is not defined.
1314         * spinlock.c (__pthread_unlock): Call
1315         compare_and_swap_with_release_semantics () instead of
1316         compare_and_swap ().
1318 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
1320         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1321         to errno directly.
1322         * sysdeps/pthread/timer_delete.c: Likewise.
1323         * sysdeps/pthread/timer_getoverr.c: Likewise.
1324         * sysdeps/pthread/timer_gettime.c: Likewise.
1325         * sysdeps/pthread/timer_settime.c: Likewise.
1327 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1329         Timer nodes are now reference counted, and can be marked
1330         as deleted. This allows for the safe release of the global mutex
1331         in the middle without losing the timer being operated on.
1333         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
1334         member is now an enum with three values, so that an intermediate
1335         state can be represented (deleted but not free for reuse yet).
1336         New refcount member added.
1337         * sysdeps/pthread/timer_routines.c: Likewise.
1339         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1340         timer_valid): New inline functions added.
1342         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1343         restructured, recursive deadlock bug fixed.
1345         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1346         timer_addref to ensure that timer won't be deleted while mutex is not
1347         held. Also uses timer_invalid to perform validation of timer handle.
1348         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1349         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1351 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
1353         * shlib-versions: Add entry for SH.
1354         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1356 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1358         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
1359         tightened up some critical regions and micro-optimized some list
1360         manipulation code.
1362         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1363         Returns int value now to indicate whether timer was queued at head.
1364         * sysdeps/pthread/posix-timer.h: Likewise.
1365         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1366         new return value from __timer_thread_queue_timer to avoid waking
1367         up timer thread unnecessarily.
1369         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1370         inuse flag, because this requires mutex to be held.  Callers updated
1371         to do the check when they have the mutex.
1372         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1374         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1375         regions: avoids making system calls while holding timer mutex, and
1376         a few computations were moved outside of the mutex as well.
1377         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1379         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1380         to list_unlink_ip, meaning idempotent.  Pointer manipulation
1381         changed to get better better code out of gcc.
1382         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1383         version of list_unlink added here.
1384         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1385         function in all places: idempotent one for timers, non-idempotent
1386         one for thread nodes.
1387         * sysdeps/pthread/timer_settime: Likewise.
1388         * sysdeps/pthread/timer_routines.c: Likewise.
1390 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
1392         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1393         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1395         * sysdeps/pthread/Makefile: Remove tests definition.
1397 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1398             Yutaka Niibe  <gniibe@chroot.org>
1400         * sysdeps/sh/pspinlock.c: New file.
1401         * sysdeps/sh/pt-machine.h: New file.
1403 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
1405         * Makefile (tests): Add joinrace.
1407         * Examples/ex6.c: Test return value of pthread_join.
1409 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
1411         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1412         (__pthread_spin_trylock): Implement.
1413         (__pthread_spin_unlock): Implement.
1414         (__pthread_spin_init): Implement.
1415         (__pthread_spin_destroy): Implement.
1417 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1419         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1420         really append the entry.
1422 2000-06-10  Andreas Jaeger  <aj@suse.de>
1424         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1426 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1428         * sysdeps/pthread/timer_create.c: Thread matching now done on
1429         clock type as well as thread attributes.
1430         There are individual global signal-delivering threads for
1431         different clock types.
1432         * sysdeps/pthread/posix-timer.h: Likewise.
1433         * sysdeps/pthread/timer_routines.c: Likewise.
1435         * sysdeps/pthread/timer_routines.c: Thread allocation and
1436         deallocation function now remembers to put thread on active
1437         list and remove from active list.
1438         Thus now the feature of binding multiple timers
1439         to a single thread actually works.
1441 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1443         * pthread.c (__pthread_create_2_1): Optimize a bit.
1445         * internals.h (invalid_handle): Also test for p_terminated != 0.
1446         (nonexisting_handle): New function.  Same as old invalid_handle.
1447         * join.c (pthread_join): Use nonexisting_handle instead of
1448         invalid_handle to test for acceptable thread handle.
1449         * manager.c (pthread_handle_free): Likewise.
1450         * joinrace.c: New file.
1451         Reported by Permaine Cheung <pcheung@cygnus.com>.
1453 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1455         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1456         Correct handling of matching variable.
1458         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1459         avoid warnings.
1461         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1462         Be prepared for empty timer list.
1464         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1465         CPUTIME clock ID.  Add support for thread clocks.
1467         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1468         subtraction were switched.
1470         * sysdeps/pthread/timer_routines.c (init_module): Use
1471         THREAD_MAXNODES threads.
1473         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1474         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1475         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1476         with sigqueueinfo is this system call is available.
1478         * sysdeps/pthread/timer_create.c (timer_create): Allow
1479         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1481         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1482         functionality.
1483         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1485 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1487         * sysdeps/pthread/posix-timer.h: New file.
1488         * sysdeps/pthread/timer_create.c: New file.
1489         * sysdeps/pthread/timer_delete.c: New file.
1490         * sysdeps/pthread/timer_getoverr.c: New file.
1491         * sysdeps/pthread/timer_gettime.c: New file.
1492         * sysdeps/pthread/timer_routines.c: New file.
1493         * sysdeps/pthread/timer_settime.c: New file.
1494         * sysdeps/pthread/tst-timer.c: New file.
1496 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1498         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1499         LINK_MAX definitions if necessary.
1501 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1503         Added missing fork time handling of global libio lock.
1505         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1506         not just the individual stream locks. Rewritten to use new
1507         iterator interface provided by libio rather than accessing
1508         global variable.
1510         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1511         which lock and unlock the stream list using the new interface
1512         provied by libio.
1513         * internals.h: Likewise.
1515         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1516         and __funlockfilelist in the parent after the fork.
1517         Child still calls __fresetlockfiles as before.
1519         * linuxthreads.texi: Now explains what happens to streams at
1520         fork time. Also whole new section on forking and thread added.
1521         Definition of pthread_atfork moved out of Miscellaneous Functions
1522         to this new section.
1524 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1526         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1527         Add missing register.
1528         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1530 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1532         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1533         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1534         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1536 2000-05-31  Andreas Jaeger  <aj@suse.de>
1538         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1540 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1542         * spinlock.c (__pthread_lock): Remove ASSERT.
1544         * Makefile (tests): Add ex8.
1545         * Examples/ex8.c: New file.
1547 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1549         Bugfix: The pthread_atfork mechanism now takes care of its
1550         own internal mutex at fork time.
1552         * ptfork.c (__fork): Revised so that the mutex is held across
1553         the fork operation and while the handlers are called, and so that
1554         the child resets the mutex.
1556         * linuxthreads.texi: Updated pthread_atfork documentation to make
1557         it clear that fork and pthread_atfork can't be reentered from
1558         atfork handlers, that pthread_atfork and fork are mutually atomic,
1559         and that the handlers are inherited by the child process.
1561 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1563         * Makefile (libpthread-routines): Add pspinlock.
1564         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1565         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1566         * condvar.c: Likewise.
1567         * internals.h: Likewise.
1568         * join.c: Likewise.
1569         * manager.c: Likewise.
1570         * mutex.c: Likewise.
1571         * pthread.c: Likewise.
1572         * rwlock.c: Likewise.
1573         * semaphore.c: Likewise.
1574         * signals.c: Likewise.
1575         * spinlock.h: Likewise.
1576         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1577         * sysdeps/alpha/pspinlock.c: New file.
1578         * sysdeps/arm/pspinlock.c: New file.
1579         * sysdeps/i386/pspinlock.c: New file.
1580         * sysdeps/m68k/pspinlock.c: New file.
1581         * sysdeps/mips/pspinlock.c: New file.
1582         * sysdeps/powerpc/pspinlock.c: New file.
1583         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1584         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1585         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1586         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1588 2000-05-24  Andreas Jaeger  <aj@suse.de>
1590         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1592 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1594         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1596 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1598         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1600 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1602         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1603         object state is represented with additional bits which distinguish
1604         whether that state was set up in the current process, or
1605         in an ancestor process. If that state was set in an ancestor,
1606         it means that a fork happened while thread was executing the init
1607         function. In that case, the state is reset to NEVER.
1608         * mutex.c (__pthread_once_fork_prepare): New function.
1609         (__pthread_once_fork_child): Likewise
1610         (__pthread_once_fork_parent): Likewise
1611         (__pthread_reset_pthread_once): Removed.
1612         * ptfork.c (__fork): Call new handlers in mutex.c.
1613         * internals.h: Declarations of new mutex.c functions added.
1614         Declaration of removed function deleted.
1615         * linuxthreads.texi: Updated documentation about pthread_once
1616         to clarify what happens under cancellation and forking.
1618 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1620         * internals.h: New thread manager request type, REQ_KICK.
1621         * join.c (pthread_exit): main thread now calls exit() instead
1622         of _exit() in order to proper process cleanup.
1623         * manager.c (__pthread_manager): Do not terminate manager
1624         after unblocking main thread; wait for main thread's
1625         REQ_PROCESS_EXIT request instead.
1626         Also, added REQ_KICK case to handle new request; this just does
1627         nothing.
1628         * manager.c (pthread_exited): Do not terminate manager after
1629         unblocking main thread.
1630         * manager.c (__pthread_manager_sighandler): If the main thread
1631         is waiting for all other threads to die, send a REQ_KICK into
1632         the thread manager request pipe to get it to clean out the threads
1633         and unblock the main thread as soon as possible. This fixes
1634         the 2000 millisecond hang on shutdown bug.
1635         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1636         including the main one call pthread_exit(), or implicitly do so.
1637         * Makefile (tests): Add ex7.
1639 2000-05-05  Andreas Jaeger  <aj@suse.de>
1641         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1642         (pthread_getcpuclockid): Correct test for ourselves.
1644 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1646         * internals.h (struct _pthread_descr_struct): Reorganization.
1647         Allocate room for 16 pointers at head of the structure for future
1648         thread-local data handling.  Move p_self member in this area.
1649         * manager.c (pthread_handle_create): Adjust use of p_self.
1650         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1651         * pthread.c (__pthread_initial_thread): Adjust initialization.
1652         (__pthread_manager_thread): Likewise.
1654 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1656         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1657         for eventmask larger than 1 word.
1659 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1661         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1662         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1663         minimal initialization.
1664         (pthread_initialize): Remove this code here.
1665         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1666         are working around the problem in glibc.
1668 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
1670         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1671         now.  First gcc must be fixed (more concrete: libgcc).
1673 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
1675         * pthread.c: Remove special treatement for interrupt handlers on x86.
1676         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1677         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1678         necessary.
1679         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1681 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
1683         * join.c (pthread_exit): Set p_terminated after reporting the
1684         termination event instead of before.
1686 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
1688         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1689         if __USE_UNIX98.
1691 2000-04-18  Andreas Jaeger  <aj@suse.de>
1693         * Versions: Use ld instead of ld.so.
1695 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1697         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1698         Remove the typedef keyword.
1700 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1702         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1703         not stbar.
1704         (READ_MEMORY_BARRIER): Define.
1705         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1706         MEMORY_BARRIER.
1707         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1708         headers.
1710 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
1712         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1713         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1714         use thread_handle().
1716 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
1718         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1719         if fast mutex is used.  Don't initialize `already_canceled' twice.
1720         Correctly test for return value of timedsuspend.
1722         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
1723         therefore don't need the _rt versions of the signal handlers.
1725 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1727         * pthread.c (pthread_yield): New function.
1728         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1729         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1730         * internals.h: Declare __pthread_yield.
1732         * pthread.c (pthread_initialize): Avoid a bit more code if
1733         realtime signals are known to exist.
1735         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1736         to dynamically detect RT signals and avoid generating compatibility
1737         functions with old kernel.
1738         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1739         __pthread_restart_new directly.
1740         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1741         __pthread_wait_for_restart_signal directly.
1742         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1743         __pthread_timedsuspend_new directly.
1745 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1747         * condvar.c: Remove all the special code to handle cond_timedwait.
1748         Use timedsuspend instead.
1749         * internals.h: Declare __pthread_timedsuspend_old,
1750         __pthread_timedsuspend_new, and __pthread_timedsuspend.
1751         Remove declaration of __pthread_init_condvar.
1752         * pthread.c: Define __pthread_timedsuspend variable.
1753         (__pthread_timedsuspend_old): New function.  Timed suspension
1754         implementation for old Linux kernels.
1755         (__pthread_timedsuspend_new): New function.  Timed suspension
1756         implementation for new Linux kernels.
1757         * restart.h (timedsuspend): New function.  Call appropriate
1758         suspension function through __pthread_timedsuspend.
1759         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1760         the code.
1761         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1763         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1764         undefined.
1765         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1766         where possible.
1767         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1768         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1770         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1771         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1773 2000-04-14  Andreas Jaeger  <aj@suse.de>
1775         * weaks.c: Fix typo.
1777         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1778         2.2 for linuxthreads.
1780 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
1782         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1783         (pthread_getcpuclockid): Fix typo.
1785 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
1787         * Makefile (libpthread-routines): Add getcpuclockid.
1788         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1789         * sysdeps/pthread/getcpuclockid.c: New file.
1790         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1791         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1793         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1794         Defined.
1795         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1797         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1798         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1799         and pthread_spin_unlock.
1800         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1801         into pthread_spinlock_t.  Change all uses.
1802         * spinlock.c: Implement pthread_spin_lock.
1803         Rename __pthread_unlock to __pthread_spin_unlock and define weak
1804         alias for real name.
1805         Define pthread_spin_trylock, pthread_spin_init, and
1806         pthread_spin_destroy.
1807         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1808         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1809         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1810         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1811         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1812         and pthread_spin_unlock.
1813         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1814         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1815         * condvar.c: Likewise.
1816         * internals.h: Likewise.
1817         * join.c: Likewise.
1818         * manager.c: Likewise.
1819         * mutex.c: Likewise.
1820         * pthread.c: Likewise.
1821         * rwlock.c: Likewise.
1822         * semaphore.c: Likewise.
1823         * signals.c: Likewise.
1825         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1826         macros.
1827         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1829 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1831         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1832         _POSIX_SHARED_MEMORY_OBJECTS.
1834 2000-04-11  Andreas Jaeger  <aj@suse.de>
1836         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1837         (__compare_and_swap): Mark as modifying memory.
1839 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
1841         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1842         __volatile__.
1843         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1844         Don't have the 'asm' __volatile__.
1846 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1848         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1849         * spinlock.c (__pthread_lock): Add memory barriers.
1850         (__pthread_unlock): Likewise.
1851         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1852         instruction.
1853         (RELEASE): Not needed anymore.
1854         (__compare_and_swap): Mark asm as modifying memory.
1855         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
1856         of MEMORY_BARRIER.
1857         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1858         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1859         (MEMORY_BARRIER): Define using stbar.
1860         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1861         stbar.
1862         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1863         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1864         Mike Burrows <m3b@pa.dec.com>.
1866 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
1868         * signals.c (sigaction): Fix return value for the case SIG is one
1869         of the signals the implementation uses.
1870         Patch by Xavier.Leroy@inria.fr.
1872 2000-04-01  Andreas Jaeger  <aj@suse.de>
1874         * attr.c: Use shlib-compat macros.
1875         * oldsemaphore.c: Likewise.
1876         * pthread.c: Likewise.
1877         * weaks.c: Likewise.
1879 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
1881         * semaphore.c (sem_timedwait): New function.
1882         Patch by Carl Mailloux <carlm@oricom.ca>.
1883         * semaphore.h: Declare sem_timedwait.
1884         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1886 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
1888         * sysdeps/pthread/Makefile: File removed.
1890 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
1892         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1893         * internals.h (__pthread_reset_pthread_once): Add prototype.
1894         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1896         * manager.c (pthread_handle_create): Store ID of new thread before
1897         clone call.
1899 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
1901         * attr.c: Use new macros from shlib-compat.h to define versions.
1902         * oldsemaphore.c: Likewise.
1903         * semaphore.c: Likewise.
1904         * weaks.c: Likewise.
1906         * pthread.c: Update for new SHLIB_COMPAT definition.
1908         * manager.c (__pthread_manager): Unmask debug signal.
1910         * pthread.c (pthread_initialize): Test for address of __dso_handle
1911         being NULL, not value.  Use __on_exit, not on_exit.
1912         Patch by Andreas Jaeger <aj@suse.de>.
1914         * pthread.c: Use new macros from shlib-compat.h to define versions.
1916 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1918         * pthread.c (pthread_initialize): Instead of on_exit use
1919         __cxa_atexit if __dso_label is available to allow unloading the
1920         libpthread shared library.
1922 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1924         * condvar.c: Make tests for ownership of mutex less strict.
1926 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1928         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1929         current thread and return error if not.
1930         (pthread_cond_timedwait_relative_old): Likewise.
1931         (pthread_cond_timedwait_relative_new): Likewise.
1933         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1934         (pthread_once_cancelhandler): New function.
1935         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1937 2000-03-14  Andreas Jaeger  <aj@suse.de>
1939         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1940         REG_GS.
1941         (pthread_handle_sigrestart_rt): Likewise.
1942         * signals.c (pthread_sighandler_rt): Likewise.
1944 2000-03-02  Andreas Jaeger  <aj@suse.de>
1946         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1947         Reported by Sean Chen <sean.chen@turbolinux.com>.
1949 2000-02-28  Andreas Jaeger  <aj@suse.de>
1951         * rwlock.c: Fix typo.
1953 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1955         * rwlock.c: Define __* variants of the functions and make old names
1956         aliases.
1957         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1958         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1960 2000-02-25  Andreas Jaeger  <aj@suse.de>
1962         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1963         pwrite64, lseek64, open64, and __open64 with version 2.2.
1965 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
1967         * semaphore.h (SEM_FAILED): Use 0 not NULL.
1969 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
1971         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1972         nanosleep does not work either.  Get absolute time inside the
1973         loop.
1974         (pthread_cond_timedwait_relative_new): Likewise.
1975         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1977 2000-02-13  Andreas Jaeger  <aj@suse.de>
1979         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1980         (pthread_cond_timedwait_relative_old): Likewise.
1982 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
1984         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1985         but keep the code around.  A bug in the kernel prevent us from
1986         using the code.
1987         (pthread_cond_timedwait_relative_new): Likewise.
1988         (PR libc/1597 and libc/1598).
1990 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1992         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1993         loop around nanosleep calls instead of around most of the function
1994         (pthread_cond_timedwait_relative_new): Likewise.
1995         body.  Got rid of backwards goto and one local.
1997 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1999         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2000         before every nanosleep call to account for time spent in the rest
2001         of the function.
2002         (pthread_cond_timedwait_relative_new): Likewise.
2003         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2005 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
2007         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2008         from nanosleep call so that in case we restart we only wait for the
2009         remaining time.
2010         (pthread_cond_timedwait_relative_new): Likewise.
2011         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2013 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
2015         * manager.c (pthread_allocate_stack): Compute guard page address
2016         correctly.  Patch by HJ Lu.
2018         * sysdeps/pthread/pthread.h: Define
2019         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2021 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
2023         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2024         preference handling.
2025         (pthread_rwlockattr_setkind_np): Allow
2026         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2027         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2029 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
2031         * internals.h (pthread_readlock_info): New structure.
2032         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2033         p_untracked_readlock_count.
2034         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2035         Add initializers for new fields.
2036         * manager.c (pthread_free): Free read/write lock lists.
2037         * queue.h (queue_is_empty): New function.
2038         * rwlock.c: Implement requirements about when readers should get
2039         locks assigned.
2040         * sysdeps/pthread/pthread.h
2041         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2042         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2043         Define this name as well.
2044         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2046 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
2048         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2049         Adjust initializers for struct _pthread_descr_struct change.
2050         * internals.h (struct _pthread_descr_struct): Move new elements to
2051         the end.
2053 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
2055         Redesigned how cancellation unblocks a thread from internal
2056         cancellation points (sem_wait, pthread_join,
2057         pthread_cond_{wait,timedwait}).
2058         Cancellation won't eat a signal in any of these functions
2059         (*required* by POSIX and Single Unix Spec!).
2060         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2061         simultaneous condition variable signal (not required by POSIX
2062         or Single Unix Spec, but nice).
2063         * spinlock.c: __pthread_lock queues back any received restarts
2064         that don't belong to it instead of assuming ownership of lock
2065         upon any restart; fastlock can no longer be acquired by two threads
2066         simultaneously.
2067         * restart.h: Restarts queue even on kernels that don't have
2068         queued real time signals (2.0, early 2.1), thanks to atomic counter,
2069         avoiding a rare race condition in pthread_cond_timedwait.
2071 1999-12-31  Andreas Jaeger  <aj@suse.de>
2073         * internals.h: Remove duplicate prototype declarations.
2075         * weaks.c: Remove __THROW from prototypes since the file is not
2076         compiled by a C++ compiler.
2077         * internals.h: Likewise.
2079 1999-12-30  Andreas Jaeger  <aj@suse.de>
2081         * sysdeps/pthread/pthread.h: Move internal functions to...
2082         * sysdeps/pthread/bits/libc-lock.h: ...here.
2084 1999-12-29  Andreas Jaeger  <aj@suse.de>
2086         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2088 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
2090         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2091         beginning.
2093         * manager.c (__pthread_start): Add one more cast to prevent
2094         warning on 64bit machines.
2096 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
2098         * manager.c (pthread_handle_create): Set p_pid of new thread
2099         before calling the callback function to report a new thread.
2101 1999-12-20  Andreas Jaeger  <aj@suse.de>
2103         * pthread.c (pthread_initialize): Move getrlimit call after
2104         setting of errno.
2106 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
2108         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2109         pwrite64, lseek64, open64, and __open64.
2110         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2111         pwrite64, lseek64, open64, and __open64.
2113         * manager.c (pthread_allocate_stack): Correct computation of
2114         new_thread_bottom.  Correct handling of stack size and when the
2115         rlimit method to guard for stack growth is used.
2116         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2117         minus one pagesize (not two).
2119 1999-12-03  Andreas Jaeger  <aj@suse.de>
2121         * Versions: Add __res_state with version GLIBC_2.2.
2123         * errno.c (__res_state): New function to return thread specific
2124         resolver state.
2126         * pthread.c (pthread_initialize): Initialize p_resp.
2127         (__pthread_reset_main_thread): Also set p_resp.
2129         * manager.c (pthread_handle_create): Initialize p_resp.
2131         * internals.h: Add thread specific resolver state.
2132         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2134 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
2136         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2137         beginning.
2138         * sysdeps/i386/i686/pt-machine.h: Likewise.
2139         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2141 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
2143         * manager.c (pthread_start_thread_event): Initialize p_pid already
2144         here.
2146 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
2148         * internals.h: Add prototype for __pthread_manager_event.
2149         * manager.c (__pthread_manager_event): New function.
2150         (pthread_start_thread_event): Correct computation of self.
2151         Use INIT_THREAD_SELF.
2152         * pthread.c (__pthread_manager_thread): Initialize p_lock.
2153         (__pthread_initialize_manager): Respect event flags also for creation
2154         of the manager thread.
2156 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
2158         * pthread.c (__pthread_initialize_manager): Initialize
2159         __pthread_manager_thread.p_tid.
2161 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
2163         * internals.h: Declare __pthread_last_event.
2164         * manager.c: Define __pthread_last_event.
2165         (pthread_handle_create): Set __pthread_last_event.
2166         (pthread_exited): Likewise.
2167         * join.c (pthread_exit): Likewise.
2169         * Makefile (libpthread-routines): Add events.
2170         * events.c: New file.
2171         * internals.h: Protect against multiple inclusion.
2172         Include thread_dbP.h header.
2173         (struct _pthread_descr_struct): Add new fields p_report_events and
2174         p_eventbuf.
2175         Declare event reporting functions.
2176         * join.c (pthread_exit): Signal event if this is wanted.
2177         * manager.c (__pthread_threads_events): New variable.
2178         (pthread_handle_create): Take new parameters with event information.
2179         Signal TD_CREATE event if wanted.
2180         (__pthread_manager): Adjust pthread_handle_create call.
2181         (pthread_start_thread_event): New function.  Block until manager is
2182         finished and then call pthread_start_thread.
2183         (pthread_exited): Signal TD_REAP event if wanted.
2185 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
2187         * restart.h (suspend_with_cancellation): Rewrite as a macro.
2189         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2191 1999-10-25  Andreas Jaeger  <aj@suse.de>
2193         * internals.h: Remove K&R compatibility.
2194         * no-tsd.c: Likewise.
2195         * semaphore.h: Likewise.
2196         * signals.c: Likewise.
2197         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2198         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2199         * weaks.c: Likewise.
2201 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
2203         * pthread.c: For i386, wrap pthread_handle_sigrestart and
2204         pthread_handle_sigcancel with functions that restore %gs from the
2205         signal context.  For each signal handling function, two wrappers
2206         are required, one for a non-RT signal and one for a RT signal.
2207         * signal.c: For i386, add code to restore %gs from the signal
2208         context in pthread_sighandler and pthread_sighandler_rt.
2210 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
2212         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2214 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
2216         * pthread.c (__pthread_initial_thread): Pass argument to
2217         PTHREAD_START_ARGS_INITIALIZER.
2218         (__pthread_manager_thread): Likewise.
2220         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2221         initialize function.
2223         * manager.c (pthread_handle_create): Remove p_startfct initialization.
2225         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2227 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
2229         * internals.h: Correct return types for __libc_read and __libc_write.
2231 1999-10-09  Andreas Jaeger  <aj@suse.de>
2233         * internals.h: Add __new_sem_post to get prototype in
2234         manager.c; include semaphore.h for needed types.
2236 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
2238         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2239         directly instead of calling sem_post which should not be necessary
2240         but is faster and might help in some case to work around problems.
2241         Patch by khendricks@ivey.uwo.ca [libc/1382].
2243 1999-10-08  Andreas Schwab  <schwab@suse.de>
2245         * sysdeps/pthread/Subdirs: New file.
2246         * Implies: Removed.
2248 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
2250         * Implies: New file.
2251         * internals.h (struct _pthread_descr_struct): Add p_startfct.
2252         * manager.c (pthread_handle_create): Initialize p_startfct.
2253         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2255 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
2257         * manager.c (__linuxthreads_pthread_threads_max): New variable.
2258         * specific.c (__linuxthreads_pthread_keys_max): New variable.
2259         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2261         * condvar.c (pthread_cond_timedwait_relative): Never return with
2262         EINTR.  Patch by Andreas Schwab.
2264 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
2266         * signals.c (sigaction): Correct last patch.  Don't select
2267         pthread_sighandler_rt based on the signal number but instead of
2268         the SA_SIGINFO flag.
2270 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
2272         * specific.c: Move definitions of struct pthread_key_struct and
2273         destr_function to ...
2274         * internals.h: ...here.
2276 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
2278         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
2279         this instead of pthread_handle_sigrestart if the signal is an RT
2280         signal.
2282         * signals.c: Handle passing through of sighandler arguments also
2283         for real-time signals.
2285 1999-09-03  Andreas Schwab  <schwab@suse.de>
2287         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
2288         fork as weak alias.
2289         (__vfork): New function, alias vfork.
2290         * Versions: Export __fork, vfork, and __vfork in libpthread.
2292 1999-08-23  Andreas Schwab  <schwab@suse.de>
2294         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2295         call to signal handler.
2297 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
2299         * pthread.c (__pthread_reset_main_thread): Undo last change.
2300         (__pthread_kill_other_threads_np): Reset signal handlers for the
2301         signals we used in the thread implementation here.
2303 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
2305         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2306         for the signals we used in the thread implementation [PR libc/1234].
2308         * Versions: Export __pthread_kill_other_threads_np from libpthread
2309         for GLIBC_2.1.2.
2311         * signals.c: Pass sigcontext through wrapper to the user function.
2313 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
2315         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2316         __libc_internal_tsd_set.
2318 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2320         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2321         needed anymore.
2323 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2325         * internals.h: Align _pthread_descr_struct to 32 bytes.
2326         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2327         libc/1206.
2329 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2331         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2332         swap function.
2334 1999-07-09  Cristian Gafton  <gafton@redhat.com>
2336         * Makefile (libpthread-routines): Add oldsemaphore routine.
2337         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2338         sem_trywait, and sem_wait to GLIBC_2.1.
2339         * oldsemaphore.c: New file.
2340         * semaphore.c: Add default_symbol_versions for the changed functions.
2341         (__new_sem_init): Rename from sem_init.
2342         (__new_sem_post): Rename from sem_post.
2343         (__new_sem_wait): Rename from sem_wait.
2344         (__new_sem_trywait): Rename from sem_trywait.
2345         (__new_sem_getvalue): Rename from sem_getvalue.
2346         (__new_sem_destroy): Rename from sem_destroy.
2348 1999-06-23  Robey Pointer  <robey@netscape.com>
2350         * internals.h: Added p_nextlock entry to separate queueing for a
2351         lock from queueing for a CV (sometimes a thread queues on a lock
2352         to serialize removing itself from a CV queue).
2353         * pthread.c: Added p_nextlock to initializers.
2354         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2356 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2358         * manager.c (pthread_handle_create): Free mmap region after stack
2359         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2361 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2363         * man/pthread_cond_init.man: Correct example.
2364         Reported by Tomas Berndtsson <tomas@nocrew.org>.
2366         * linuxthreads.texi (Condition Variables): Likewise.
2368 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
2370         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2371         casx not cas, also successful casx returns the old value in rd
2372         and not the new value.
2374 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
2376         * manager.c: If pthread_create() is given a NULL attribute
2377         and the thread manager runs with a realtime policy, set the
2378         scheduling policy of the newly created thread back to SCHED_OTHER.
2379         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2380         initialize the schedpolicy field of new_thread->p_start_args
2381         to that of the calling thread.
2383 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
2385         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2386         instruction does not allow memory element to use offset.
2388 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
2390         * manager.c (pthread_allocate_stack): Optimize initialization of new
2391         thread descriptor.
2393         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2394         Don't use initializer since it is all zeroes.
2395         (__libc_once_define): Likewise.
2397 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2399         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2400         doesn't exist anymore.
2401         * sysdeps/i386/Implies: Likewise.
2402         * sysdeps/m68k/Implies: Likewise.
2403         * sysdeps/mips/Implies: Likewise.
2404         * sysdeps/powerpc/Implies: Likewise.
2405         * sysdeps/sparc/sparc32/Implies: Likewise.
2406         * sysdeps/sparc/sparc64/Implies: Likewise.
2408 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
2410         * sysdeps/alpha/bits/semaphore.h: Removed.
2411         * sysdeps/powerpc/bits/semaphore.h: Removed.
2412         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2413         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2414         * Makefile (headers): Remove bits/semaphore.h.
2416         * semaphore.h: Define _pthread_descr if necessary.
2417         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2418         Define SEM_FAILED.
2419         (sem_t): Protect element names with leading __.
2420         Add declarations for sem_close, sem_open, and sem_unlink.
2421         * semaphore.c: Adjust all functions for new element names.
2422         Define sem_close, sem_open, and sem_unlink.
2423         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2424         GLIBC_2.1.1.
2425         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2426         necessary.
2428 1999-03-16  H.J. Lu  <hjl@gnu.org>
2430         * specific.c (pthread_key_delete): Check th->p_terminated to see
2431         if the thread is running.
2433         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2434         Added to GLIBC_2.0 for libc.so.
2436 1999-02-12  H.J. Lu  <hjl@gnu.org>
2438         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2439         __libc_allocate_rtsig): Added to GLIBC_2.1.
2441         * internals.h (DEFAULT_SIG_RESTART): Removed.
2442         (DEFAULT_SIG_CANCEL): Removed.
2444         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2445         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2446         (__pthread_sig_restart, __pthread_sig_cancel,
2447         __pthread_sig_debug): Initialized.
2448         (pthread_initialize): Call init_rtsigs () to initialize
2449         real-time signals.
2451 1999-02-03  H.J. Lu  <hjl@gnu.org>
2453         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2454         Don't restart the thread which sent REQ_DEBUG.
2455         (pthread_start_thread): Check if __pthread_sig_debug > 0
2456         before debugging.
2458         * pthread.c (__pthread_initialize_manager): Suspend ourself
2459         after sending __pthread_sig_debug to gdb instead of
2460         __pthread_sig_cancel.
2462 1999-01-24  H.J. Lu  <hjl@gnu.org>
2464         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2465         from mask if __pthread_sig_debug > 0.
2466         (pthread_handle_create): Increment __pthread_handles_num.
2468         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2469         * pthread.c (__pthread_initialize_manager): Likewise.
2471         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2472         instead of __libc_allocate_rtsig (2).
2473         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2474         instead of __pthread_sig_cancel.
2475         (pthread_handle_sigdebug): Fix comments.
2477 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2479         * manager.c (pthread_allocate_stack): Set
2480         __pthread_nonstandard_stacks if user-specified stack is used.
2482 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2484         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2485         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2487 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2489         * pthread.c: Use a third signal __pthread_sig_debug distinct
2490         from __pthread_sig_cancel to notify gdb when a thread is
2491         created
2492         * manager.c: Likewise.
2493         * internals.h: Likewise.
2494         * signals.c: The implementation of sigwait(s) assumed that
2495         all signals in s have signal handlers already attached.
2496         This is not required by the standard, so make it work
2497         also if some of the signals have no handlers.
2499 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2501         * linuxthreads.texi: Remove pointers from first @node.  Move old
2502         @node spec inside comment.
2504 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2506         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2507         _IO_lock_unlock.
2509 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2511         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2512         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2514 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2516         * manager.c: Threads now send __pthread_sig_cancel on termination.
2517         Change clone call and signal masks.
2518         * thread.c (pthread_handle_sigrestart): Remove special code for
2519         manager.
2520         (pthread_handle_sigcancel): In manager thread call
2521         __pthread_manager_sighandler.
2522         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2523         * sysdeps/i386/i686/pt-machine.h: Likewise.
2524         Patches by Xavier Leroy.
2526 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2528         * spinlock.c (__pthread_unlock): Don't crash if called for an
2529         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2531         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2532         overall runtime.
2534 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2536         * Examples/ex3.c: Wait until all threads are started before
2537         searching for the number to avoid race condition on very fast
2538         systems.
2540 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2542         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2543         declaration since it's not needed.
2545         * sysdeps/pthread/pthread.h: Move internal functions to ...
2546         * internals.h: ...here.
2548 1998-12-02  H.J. Lu  <hjl@gnu.org>
2550         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2551         SIGRTMIN is defined.
2552         (__pthread_sig_cancel): Likewise.
2554 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2556         * wrapsyscall.c: Include <sys/mman.h> for msync,
2557         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2558         Correct msync declaration.
2560 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2562         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2563         __libc_tsd_set): New macros for new interface.
2564         * no-tsd.c: New file, provide uninitialized defns of
2565         __libc_internal_tsd_get and __libc_internal_tsd_set.
2566         * Makefile (routines): Add no-tsd.
2568 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2570         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2571         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2572         __libc_internal_tsd_set): Move decls to ...
2573         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2574         declarations.
2576         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2577         __libc_internal_tsd_set): Make these pointers to functions, not
2578         functions; remove #pragma weak decls for them.
2579         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2580         Define static functions and initialized pointers to them.
2582 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2584         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2585         (CFLAGS-specific.c): Likewise.
2586         (CFLAGS-pthread.c): Likewise.
2587         (CFLAGS-ptfork.c): Likewise.
2588         (CFLAGS-cancel.c): Likewise.
2589         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2590         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2592         * mutex.c (pthread_mutex_init): Define as strong symbol.
2593         (pthread_mutex_destroy): Likewise.
2594         (pthread_mutex_trylock): Likewise.
2595         (pthread_mutex_lock): Likewise.
2596         (pthread_mutex_unlock): Likewise.
2597         (pthread_mutexattr_init): Likewise.
2598         (pthread_mutexattr_destroy): Likewise.
2599         (pthread_once): Likewise.
2600         * ptfork.c (pthread_atfork): Likewise.
2601         * specific.c (pthread_key_create): Likewise.
2602         (pthread_setspecific): Likewise.
2603         (pthread_getspecific): Likewise.
2605 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2607         * linuxthreads.texi: Fix punctuation after xref.
2609 1998-11-10  H.J. Lu  <hjl@gnu.org>
2611         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2612         if it is defined in <linux/limits.h>.
2614 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2616         * spinlock.h (__pthread_trylock): Define inline.
2617         (__pthread_lock): Add extra parameter to declaration.  Declare
2618         using internal_function.
2619         (__pthread_unlock): Declare using internal_function.
2620         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2621         of local variable self.  Avoid recomputing self.  Define using
2622         internal_function.
2623         (__pthread_trylock): Remove.
2624         (__pthread_unlock): Define using internal_function.
2625         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2626         computed self value is possible.
2627         * condvar.c: Likewise.
2628         * join.c: Likewise.
2629         * manager.c: Likewise.
2630         * mutex.c: Likewise.
2631         * pthread.c: Likewise.
2632         * rwlock.c: Likewise.
2633         * semaphore.c: Likewise.
2634         * signals.c: Likewise.
2636 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2638         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2639         __ to field names of the struct.
2640         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2641         Likewise.
2642         (pthread_attr_t): Likewise.
2643         (pthread_cond_t): Likewise.
2644         (pthread_condattr_t): Likewise.
2645         (pthread_mutex_t): Likewise.
2646         (pthread_mutexattr_t): Likewise.
2647         (pthread_rwlock_t): Likewise.
2648         (pthread_rwlockattr_t): Likewise.
2649         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2650         * cancel.c: Likewise.
2651         * condvar.c: Likewise.
2652         * manager.c: Likewise.
2653         * mutex.c: Likewise.
2654         * pthread.c: Likewise.
2655         * ptlongjmp.c: Likewise.
2656         * rwlock.c: Likewise.
2657         * spinlock.c: Likewise.
2659 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2661         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2662         also with PT_EI.
2664         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2665         definitions.
2667         * Makefile (libpthread-routines): Add pt-machine.
2668         * pt-machine.c: New file.
2669         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2670         yet defined.  Use PT_EI in extern inline definitions.
2671         * sysdeps/arm/pt-machine.h: Likewise.
2672         * sysdeps/i386/pt-machine.h: Likewise.
2673         * sysdeps/i386/i686/pt-machine.h: Likewise.
2674         * sysdeps/m68k/pt-machine.h: Likewise.
2675         * sysdeps/mips/pt-machine.h: Likewise.
2676         * sysdeps/powerpc/pt-machine.h: Likewise.
2677         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2678         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2680 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2682         * semaphore.h: Include <sys/types.h> so that _pthread_descr
2683         is declared.
2685 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
2687         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2688         argument.
2689         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2691 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2693         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2694         guard.
2696 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2698         * signals.c (sigaction): Check that sig is less than NSIG to avoid
2699         array index overflow.
2701 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
2703         * sysdeps/pthread/semaphore.h: New file.
2705 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
2707         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2708         _LIBC_TSD_KEY_DL_ERROR.
2710 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
2712         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2713         * sysdeps/i386/pt-machine.h: Likewise.
2714         Suggested by Roland McGrath.
2716 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
2718         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2719         access thread data with non-constant offsets.
2720         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2721         necessary.
2723         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
2724         THREAD_SETMEM_NC definitions.
2726         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2727         THREAD_SETMEM_NC.
2728         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2730 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
2732         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2733         not already defined.
2734         (struct _pthread_descr_struct): Add p_self and p_nr field.
2735         * manager.c (__pthread_handles): Define second element to point
2736         to manager thread.
2737         (__pthread_handles_num): Initialize to 2.
2738         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2739         (pthread_start_thread): Likewise.
2740         (pthread_handle_create): Start search for free slot at entry 2.
2741         Initialize new fields p_self and p_nr.
2742         Call __clone with CLONE_PTRACE if available.
2743         (pthread_free): Call FREE_THREAD_SELF if available.
2744         * pthread.c (__pthread_initial_thread): Initialize new fields.
2745         (__pthread_manager_thread): Likewise.
2746         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2748         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2749         elements of the thread descriptor.
2750         * condvar.c: Likewise.
2751         * errno.c: Likewise.
2752         * join.c: Likewise.
2753         * manager.c: Likewise.
2754         * pthread.c: Likewise.
2755         * ptlongjmp.c: Likewise.
2756         * semaphore.c: Likewise.
2757         * signals.c: Likewise.
2758         * specific.c: Likewise.
2759         * spinlock.c: Likewise.
2761         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2763         * sysdeps/i386/useldt.h: New file.
2764         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2766         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2767         THREAD_SETMEM using __thread_self.
2768         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2770 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
2772         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2773         turned out that we didn't need to queue after all.
2775 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
2777         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2778         and wastes space; correct types.
2780 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
2782         * signals.c (sigaction): Handle NULL argument.
2784 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
2786         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2787         of sigset_t.
2789 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2791         * Makefile (linuxthreads-version): Extract correct number from
2792         Banner.
2794 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
2796         * Banner: Bump version number to 0.8
2797         * FAQ.html: Many updates, in particular w.r.t. debugging.
2798         * manager.c: Support for non-default stacksize for
2799         LinuxThreads-allocated stacks;
2800         don't use guard pages for stacks with default size, rely on
2801         rlimit(RLIMIT_STACK) instead (it's cheaper).
2802         * attr.c: Likewise.
2803         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2804         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2805         * condvar.c: Likewise.
2806         * internals.h: Likewise.
2807         * restart.h: Likewise.
2808         * signals.c: Likewise.
2809         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2811 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2813         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2814         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
2815         * Versions: Put __pthread_mutexattr_settype under version
2816         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
2817         __pthread_mutexattr_gettype.
2819 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2821         * sysdeps/pthread/bits/libc-lock.h: Make
2822         __pthread_mutexattr_settype weak.  Don't make
2823         __pthread_mutexattr_setkind_np weak.
2825 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
2827         * manager.c (pthread_handle_create): Check whether sched_setscheduler
2828         call can succeed here.
2830         * mutex.c: Define __pthread_mutexattr_settype and make
2831         __pthread_mutexattr_setkind_np an alias.
2832         Likewise for __pthread_mutexattr_gettype.
2834 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2836         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2837         is root.
2839 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
2841         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2843 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2845         * Examples/ex6.c: Include <unistd.h> for usleep.
2847 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2849         * Examples/ex4.c (main): Use exit, not pthread_exit.
2851 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
2853         * Versions: Add __pthread_mutexattr_gettype and
2854         __pthread_mutexattr_settype.
2855         * lockfile.c: Use __pthread_mutexattr_settype instead of
2856         __pthread_mutexattr_setkind_np.
2857         * mutex.c: Define __pthread_mutexattr_gettype and
2858         __pthread_mutexattr_settype.
2859         * weak.c: Likewise.
2860         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2861         __pthread_mutexattr_settype.
2862         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2863         Use __pthread_mutexattr_settype.
2865 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
2867         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2868         * mutex.c: Define weak alias pthread_mutexattr_gettype and
2869         pthread_mutexattr_settype.
2870         * sysdeps/pthread/pthread.h: Declare these functions.
2871         Move pthread_sigmask and pthread_kill declaration in separate header.
2872         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2874 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
2876         * Makefile: Add rules to compile and run tests.
2877         * Examples/ex1.c: Little changes to fix warnings.
2878         * Examples/ex2.c: Likewise.
2879         * Examples/ex3.c: Likewise.
2880         * Examples/ex4.c: Likewise.
2881         * Examples/ex5.c: Likewise.
2882         * Examples/ex6.c: New file.
2884 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
2886         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2888 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2890         * attr.c: Include <string.h>.
2892 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
2894         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
2895         * internals.h: Include limits.h.
2896         * manager.c: Use memcpy to copy sched_param.
2897         * ptfork.c: Include errno.h.
2898         * pthread.c: Likewise.
2899         * semaphore.c: Likewise.
2900         * specific.c: Likewise.
2901         * spinlock.h: Likewise.
2902         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
2903         type definition to ...
2904         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
2906 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
2908         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2910         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2911         as macros as demanded in POSIX.1, Annex C.
2913 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
2915         * internals.h (struct pthread_request): For free use pthread_t
2916         instead of pthread_descr.
2917         * join.c (pthread_join): Pass thread_id, not th to manager.
2918         (pthread_detach): Likewise.
2919         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2920         (pthread_exited): Remove detached queue code.
2921         (pthread_handle_free): Expect thread ID parameter and use it to
2922         validate the thread decsriptor.  Don't use detached queue.
2923         Patches by Xavier Leroy.
2925 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2927         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2928         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2929         __pthread_atfork, __pthread_key_create, __pthread_once.
2930         * internals.h: Doc fix.
2931         * pthread.c (__pthread_initialize): Define again.
2933 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2935         * manager.c (pthread_exited): If thread is not detached put it on
2936         special list.
2937         (pthread_handle_free): If thread is not on list with living threads
2938         search on list with detached threads.
2940         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2941         for new definition of pthread_rwlock_t.
2943         * spinlock.c: Correct test whether to compile
2944         __pthread_compare_and_swap or not.
2946 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2948         * attr.c: Finish user stack support.  Change locking code to be safe
2949         in situations with different priorities.
2950         * cancel.c: Likewise.
2951         * condvar.c: Likewise.
2952         * internals.h: Likewise.
2953         * join.c: Likewise.
2954         * manager.c: Likewise.
2955         * mutex.c: Likewise.
2956         * pthread.c: Likewise.
2957         * ptlongjmp.c: Likewise.
2958         * queue.h: Likewise.
2959         * rwlock.c: Likewise.
2960         * semaphore.c: Likewise.
2961         * semaphore.h: Likewise.
2962         * signals.c: Likewise.
2963         * spinlock.c: Likewise.
2964         * spinlock.h: Likewise.
2965         * sysdeps/pthread/pthread.h: Likewise.
2966         Patches by Xavier Leroy.
2968         * sysdeps/i386/i686/pt-machine.h: New file.
2970 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
2972         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2973         [sg]et_stackaddr prototypes always available.
2975         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2976         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2978 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
2980         * manager.c (pthread_free): Undo patch from 980430.
2981         Reported by David Wragg <dpw@doc.ic.ac.uk>.
2983 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
2985         * manager.c: Define __pthread_manager_adjust_prio and use it to
2986         increase priority when needed.
2987         * internals.h: Add prototype for __pthread_manager_adjust_prio.
2988         * mutex.c: Optimize mutexes to wake up only one thread.
2989         * pthread.c: Move PID of manager for global variable in structure
2990         element.
2991         Patches by Xavier Leroy.
2993 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
2995         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2997 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2999         * attr.c: Correct typo.
3001 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
3003         * manager.c (pthread_free): Unmap guard before the stack.
3004         Patch by Matthias Urlichs.
3006 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
3008         * manager.c (pthread_free): Detect already free child.
3009         Patch by Xavier Leroy, reported by Matthias Urlichs.
3011 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3013         * Makefile (linuxthreads-version): Renamed back from
3014         libpthread-version.
3016 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
3018         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3019         __libc_longjmp.
3021 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
3023         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3024         * internals.h: Add definitions for new spinlock implementation.
3025         * ptlongjmp.c: New file.
3026         * spinlock.c: New file.
3027         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3028         new function __pthread_acquire to prevent deadlocks with thread
3029         with different priorities.
3030         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3032 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3034         * manager.c (__pthread_manager): Reduce first argument to select
3035         to include just the needed file descriptor.
3037 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
3039         * manager.c: Fix last patch which caused core dumps.
3041         * pthread.c: Correctly handle missing SIGRTMIN.
3043 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3045         * libpthread.map: Add __libc_internal_tsd_get and
3046         __libc_internal_tsd_set.  Add missing cancelable functions. Export
3047         libc internal versions of the cancelable functions.
3049 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
3051         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3053 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
3055         * attr.c: Implement pthread_attr_[gs]etguardsize,
3056         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3057         Change pthread_attr_init to have two interfaces.
3058         * internals.h (struct _pthread_descr_struct): Add new fields for
3059         above functions.
3060         * libpthread.map: Add names in GLIBC_2.1 section.
3061         * manager.c (pthread_handle_create): Implement guardsize and
3062         user stack.
3063         (pthread_free): Likewise.
3064         * pthread.c (pthread_create): Add new interface for changed
3065         pthread_attr_t.
3066         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3067         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3068         PTHREAD_STACK_MIN.
3070 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
3072         * manager.c: Enable resetting of the thread scheduling policy
3073         to SCHED_OTHER when the parent thread has a different one.
3075 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
3077         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3078         _POSIX_ASYNCHRONOUS_IO.
3080         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3081         mutexes.
3082         * mutex.c: Implement new mutex types.
3084         * internals.h: Include <signal.h>.
3086         * libpthread.map: Add __erno_location and __h_errno_location.
3088         * errno.c: Return pointer to variable actually in use.  This might
3089         not be the one in the thread structure.
3090         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3091         and p_h_errnop.
3092         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3093         of manager thread structure.
3094         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3095         thread.
3096         * pthread.c: Adapt initializer for thread structures.
3097         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3098         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3099         current thread to global variables.
3101 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
3103         * rwlock.c: New file.
3104         * Makefile (libpthread-routines): Add rwlock.
3105         * sysdeps/pthread/pthread.h: Define data structures and declare
3106         functions.
3107         * libpthread.map: Add new functions.
3109 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
3111         * sysdeps/arm/pt-machine.h: New file; add ARM support.
3112         * sysdeps/arm/Implies: likewise.
3113         * README: Document it.
3115 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3117         * signals.c: Remove unneeded initializer for sigwaited, saving a
3118         warning.
3120 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3122         * semaphore.c (sem_init): Set sem_spinlock only if available.
3124 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
3126         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3127         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3129         * Makefile: Update from LinuxThreads 0.7.
3130         * internals.h. Likewise.
3131         * manager.c: Likewise.
3132         * mutex.c: Likewise.
3133         * pthread.c: Likewise.
3134         * signals.c: Likewise.
3135         * specific.c: Likewise.
3136         * Examples/ex3.c: Likewise.
3138 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
3140         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3141         open.
3143 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
3145         * wrapsyscall.c: Add socket functions which are also cancelation
3146         points.
3148 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
3150         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3151         New functions for fast thread specific data within libc.
3153         * internals.h: Add new array p_libc_specific to struct
3154         _pthread_descr_struct.
3156         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3158 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
3160         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3161         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3163 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
3165         * internals.h (struct _pthread_descr_struct): Add definitions for
3166         two-level specific key handling.
3167         * manager.c (pthread_handle_create): Initialize specific memory array.
3168         * specific.c: Implement two-level key handling.
3169         * weaks.c: Don't provide dummy key handling.
3170         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3171         Add definition of __libc_key_t.
3172         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3173         as 1024.
3174         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3175         PTHREAD_DESTRUCTOR_ITERATIONS.
3177         * manager.c (pthread_handle_create): Compare mmap result with
3178         MAP_FAILED.
3180         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3181         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3183 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
3185         sysdeps/sparc -> sysdeps/sparc/sparc32
3186         sysdeps/sparc64 -> sysdeps/sparc/sparc64
3188         * internals.h: Change definition of THREAD_SELF to be an expression,
3189         not a statement that did a return.
3190         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3191         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3192         Follow Solaris and use a "system reserved" register (%g6) to hold
3193         the thread descriptor.
3194         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3196 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
3198         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
3199         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3200         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3202         * semaphore.c: Include spinlock.h only when needed.
3204         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3205         keys for entries not in use.
3207         * weaks.c: Implement key handling functions for real.
3209 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
3211         Initial sparc64-linux support:
3212         * sysdeps/sparc64/Implies: New file.
3213         * sysdeps/sparc64/pt-machine.h: Likewise.
3215 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
3217         * semaphore.c: Include spinlock.h at correct place.
3218         Patch by HJ Lu.
3220 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
3222         The Great Bit File Move:
3223         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3224         * sysdeps/powerpc/semaphorebits.h: Likewise.
3225         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3226         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3227         * sysdeps/pthread/libc-lock.h: -> bits/
3228         * sysdeps/pthread/stdio-lock.h: Likewise.
3229         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3230         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3231         * semaphore.h: Likewise.
3232         * sysdeps/pthread/pthread.h: Likewise.
3234         * lockfile.c: <foo.h> -> <bits/foo.h>.
3235         * semaphore.h: Likewise.
3237         * Makefile: (headers): foo.h -> bits/foo.h.
3238         * sysdeps/pthread/Makefile: Likewise.
3240 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3242         * semaphore.c (sem_init): Set sem_spinlock only if available.
3244         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3245         asm constraints.
3247 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
3249         Update from LinuxThreads 0.6.
3251         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3252         and __sched_get_priority_min instead of names without `__'.
3254         * manager.c: Rewrite large parts to implement opaque pthread_t.
3256         * cancel.c: Adapt for opaque pthread_t type.
3257         * condvar.c: Likewise.
3258         * errno.c: Likewise.
3259         * join.c: Likewise.
3260         * mutex.c: Likewise.
3261         * pthread.c: Likewise.
3262         * signals.c: Likewise.
3263         * specific.c: Likewise.
3264         * restart.h: Likewise.
3265         * queue.h: Likewise.
3266         * Examples/ex3.c: Likewise.
3267         * Examples/ex4.c: Likewise.
3268         * sysdeps/pthread/pthread.h: Likewise.
3270         * pthread.c: Accumulate time for all threads in thread manager.
3272         * semaphore.c: Implement fallback implementation for architectures
3273         sometimes missing compare-exchange operations.
3275         * cancel.c (pthread_cancel): Validate handle argument.
3276         * join.c (pthread_join): Likewise.
3277         (pthread_detach): Likewise.
3278         * signals.c (pthread_kill): Likewise.
3280         * spinlock.h (acquire): Use __sched_yield not sched_yield.
3282         * queue.h (enqueue): Enqueue thread according to priority.
3284         * internals.c (struct pthread_start_args): New struct for passing
3285         args to cloning function.
3286         (struct _pthread): Rename to _pthread_descr_struct and adapt for
3287         opaque pthread_t.
3289         * Examples/Makefile (clean): Pass -f option to rm.
3291         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3292         and define TEST_FOR_COMPARE_AND_SWAP.
3293         * sysdeps/i386/i486/pt-machine.h: Removed.
3295         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3296         to 1024.
3298 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
3300         * restart.h (suspend): Clear p_signal before suspending.
3301         (suspend_with_cancellation): Likewise.
3302         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3304         * weaks.c: Make __pthread_key_create return 1.
3305         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3306         __libc_getspecific, __libc_setspecific, and __libc_key_t.
3307         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3308         using libio.
3310 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
3312         * sysdeps/sparc/pt-machine (RELEASE): Fix.
3314 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
3316         * sysdeps/powerpc/Implies: Added.
3317         * sysdeps/powerpc/pt-machine.h: Added.
3318         * sysdeps/powerpc/semaphorebits.h: Added.
3320 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
3322         * pthread.c (__pthread_initial_thread): Correct
3323         initializer.
3324         (__pthread_manager_thread): Likewise.
3325         Reported by Andreas Jaeger.
3327 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
3329         Since sigset_t no longer fits in a register, we can't pass in the
3330         thread's initial mask so easily.  Take this opportunity to simplify
3331         the clone implementation by only accepting a single void* argument.
3333         * manager.c (__pthread_manager): Put thread vitals in the thread
3334         struct instead of as arguments through clone.
3335         (pthread_start_thread): Look for them there.
3336         * internals.h (struct _pthread): Add p_initial_fn,
3337         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
3338         * pthread.c (pthread_initialize_manager): Revise clone invocation.