Update.
[glibc.git] / linuxthreads / ChangeLog
blobb9d592c22a1888e01d6db452b45a28b83cff1988
1 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
4         returning successfully.
5         Patch by Gene Cooperman <gene@ccs.neu.edu>.
7 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
9         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
10         serious work try once whether the lock is uncontested.
11         Remove duplicate reading of __status before loop.
12         Change suggested by Hans Boehm <hans_boehm@hp.com>.
14         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
15         (__pthread_alt_trylock): Likewise.
17 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
19         Memory barrier overhaul following line by line inspection.
20         * mutex.c (pthread_once): Missing memory barriers added.
21         * pthread.c (__pthread_wait_for_restart_signal,
22         __pthread_timedsuspend_new, __pthread_restart_new): Added
23         memory barriers ``just in case'' and for documentary value.
24         * spinlock.c (__pthread_release): New inline function for releasing
25         spinlock, to complement __pthread_acquire.  Includes memory
26         barrier prior to assignment to spinlock, and __asm __volatile
27         dance to prevent reordering or optimization of the spinlock access.
28         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
29         __pthread_alt_timedlock, __pthread_alt_unlock,
30         __pthread_compare_and_swap): Updated to use new __pthread_release
31         instead of updating spinlock directly.
32         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
33         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
34         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
35         Memory barrier overhaul.  Lots of missing memory barriers added,
36         a couple needless ones removed.
37         * spinlock.c (__pthread_compare_and_swap): testandset optimization
38         removed, just calls __pthread_acquire, which has the new read
39         barrier in it before its testandset.
41 2001-05-20  Roland McGrath  <roland@frob.com>
43         * Makeconfig: New file, variables used to be in main libc Makeconfig.
45 2001-05-09  Geoff Keating  <geoffk@redhat.com>
47         * sysdeps/powerpc/pt-machine.h
48         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
49         (__compare_and_swap): Remove memory barriers.
50         (__compare_and_swap_with_release_semantics): New function.
52 2001-04-24  Andreas Jaeger  <aj@suse.de>
54         * wrapsyscall.c: send* and recv* return ssize_t.
56         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
57         mutex instead of double locking it.
58         Reported by Pierre Artaud <partaud@sodatec.com>.
60 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
62         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
63         using #ifdef whether the clock is available.
64         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
66         * sysdeps/ia64/Versions: New file.
68         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
69         have to call __gmon_start__ in the libpthread DSO.
70         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
72         * Makefile (libpthread-routines): Add ptclock_gettime and
73         ptclock_settime.
74         * internals.h: Don't use cpuclock-init.h definitions, use
75         hp-timing.h definitions.
76         * pthread.c: Likewise.
77         * manager.c: Likewise.
78         * ptclock_gettime.c: New file.
79         * ptclock_settime.c: New file.
80         * internals.h: Fix parameter type for __pthread_clock_gettime and
81         __pthread_clock_settime.
83         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
84         * sysdeps/i386/i586/ptclock_settime.c: Removed.
85         * sysdeps/i386/i586/Makefile: Removed.
87 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
89         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
90         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
92 2001-04-21  Andreas Jaeger  <aj@suse.de>
94         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
95         attribute, remove statements that will never be executed.
96         (thread_func): Remove mutex_unlock call since it's never executed.
97         (thread_func): Fix comment as suggested by Jakub Jelinek.
99         * manager.c (__pthread_manager): Add noreturn
100         attribute.
101         (pthread_start_thread): Likewise, remove return statement.
102         (pthread_start_thread_event): Likewise.
103         Add noreturn attribute for pthread_handle_exit.
104         * weaks.c: Add noreturn attribute for pthread_exit.
106         * internals.h: Add __pthread_clock_gettime and
107         __pthread_clock_settime prototypes.
109 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
111         * internals.h: Include <cpuclock-init.h>.
112         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
113         CPUCLOCK_VARDEF is defined.
114         * pthread.c (__pthread_initialize_minimal): Initialize
115         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
116         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
117         for new thread to current CPU clock value.
119         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
121         * sysdeps/i386/i586/Makefile: New file.
122         * sysdeps/i386/i586/Versions: New file.
123         * sysdeps/i386/i586/ptclock_gettime.c: New file.
124         * sysdeps/i386/i586/ptclock_settime.c: New file.
125         * sysdeps/i386/i686/Implies: New file.
127 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
129         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
130         $generated, not $postclean-generated.
132 2001-04-18  Andreas Jaeger  <aj@suse.de>
134         * Makefile (otherlibs): Added.
136 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
138         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
140 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
142         * signals.c (sigwait): NSIG is no signal number.  Block all
143         signals while in signal handler for signals in SET.
144         Patch by Manfred Spraul <manfred@colorfullife.com>.
146 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
148         * tst-cancel.c: Disable most tests.  Add new test where all
149         cleanup handlers must run.
150         * Makefile (tests): Add tst-cancel again.
152         * cancel.c (__pthread_perform_cleanup): Correct condition for
153         leaving cleanup loop early.
155         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
156         all the files which use CURRENT_STACK_FRAME.
157         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
158         __builtin_frame_address.
159         * sysdeps/i386/i686/pt-machine.h: Likewise.
161 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
163         * Makefile (tests): Comment out tst-cancel for now.
165         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
166         temporary file in object directory.
167         * Makefile: Don't allow inlining when compiling tst-cancel.c.
168         Pass $(objpfx) to tst-cancel.
170 2001-04-11  David S. Miller  <davem@redhat.com>
172         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
173         up closer to user local variables so that new cleanup heuristics work.
174         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
176 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
178         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
179         and remove it.
180         (_pthread_cleanup_push_defer): Likewise.
182         * tst-cancel.c (main): Fix loop printing cleanup output.
184 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
186         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
187         test.
188         (__pthread_spin_trylock): Likewise.
189         * sysdeps/sh/pt-machine.h (testandset): Likewise.
191 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
193         * join.c (pthread_exit): Move code to new function __pthread_do_exit
194         which takes an extra parameter with the current frame pointer.
195         Call new function with CURRENT_STACK_FRAME.
196         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
197         with the new parameter.
198         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
199         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
200         this parameter as the initial value the cleanup handler records are
201         compared against.  No active cleanup handler record must have an
202         address lower than the previous one and the initial record must be
203         above (below on PA) the frame address passed in.
204         (pthread_setcancelstate): Call __pthread_do_exit instead of
205         pthread_exit.
206         (pthread_setcanceltype): Likewise.
207         (pthread_testcancel): Likewise.
208         (_pthread_cleanup_pop_restore): Likewise.
209         * condvar.c (pthread_cond_wait): Likewise.
210         (pthread_cond_timedwait_relative): Likewise.
211         * manager.c (pthread_start_thread): Likewise.
212         * oldsemaphore.c (__old_sem_wait): Likewise.
213         * pthread.c (pthread_handle_sigcancel): Likewise.
214         * semaphore.c (__new_sem_wait): Likewise.
215         (sem_timedwait): Likewise.
216         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
217         to limit the cleanup handlers which get run.
218         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
219         for __pthread_perform_cleanup.
221         * Makefile (tests): Add tst-cancel.
222         * tst-cancel.c: New file.
224 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
226         * sysdeps/cris/pt-machine.h: New file.
227         * sysdeps/cris/pspinlock.c: New file.
229 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
231         * shlib-versions: Add case for Linux on CRIS.
233 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
235         * attr.c (pthread_getattr_np): Correct computation of stack size
236         for machiens with register stack.
238         * Examples/ex17.c (main): Correct detection of failed mmap call.
240 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
242         * pthread.c (__pthread_initialize_manager): Fix a typo.
244 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
246         * attr.c (__pthread_attr_setstack): Fix alignment check.
247         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
248         * Makefile (tests): Add ex17 test.
249         * Examples/ex17.c: New test.
251 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
253         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
254         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
255         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
257 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
259         * Makefile: When generating DSO link with libc_nonshared.a.
261 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
263         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
265 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
267         * internals.h (__pthread_init_max_stacksize): New prototype.
268         * attr.c (__pthread_attr_setstacksize): Call
269         __pthread_init_max_stacksize if not yet initialized.
270         * pthread.c (__pthread_init_max_stacksize): New function.
271         (__pthread_initialize_manager): Call it.
272         Patch by <dtc@cmucl.cons.org>.
274 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
276         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
278 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
280         * shlib-versions: Add rule for Linux on 64 bit S/390.
281         * sysdeps/s390/s390-64/pt-machine.h: New file.
282         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
284 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
286         * sysdeps/s390/pt-machine.h: Move to...
287         * sysdeps/s390/s390-32/pt-machine.h: ...here.
288         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
290 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
292         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
293         * attr.c: Implement pthread_getattr_np.
294         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
295         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
296         * manager.c (pthread_handle_create): Initialize p_inheritsched.
298 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
300         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
301         code alignment.
303 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
305         * manager.c (manager_mask): Removed static vesion.  Now always local
306         to __pthread_manager().
307         (manager_mask_all): Removed completely.
308         (__pthread_manager): Remove manager_mask_all initialization.
309         (pthread_handle_create): Remove code to set and reset signal mask
310         around __clone2() calls.
312 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
314         * spinlock.c (__pthread_lock): Force lock->__status to be read from
315         memory on every spin.
317 2001-02-10  Andreas Jaeger  <aj@suse.de>
319         * Makefile (extra-objs): New.
321 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
323         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
324         __pthread_initialize_minimal prototype.
326 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
328         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
330 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
332         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
334 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
336         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
337         broken code.  Patch by Jes Sorensen.
339 2001-02-06  Andreas Jaeger  <aj@suse.de>
341         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
342         to...
343         * internals.h: ...here.
345 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
347         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
349 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
351         * Versions: Remove __pthread_initialize_minimal.
353 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
355         * Makefile: Add rules to build crti.o and make it being used in
356         building libpthread.so.
357         * sysdeps/i386/Makefile: New file.
358         * sysdeps/pthread/pt-initfini.c: New file.
360         * pthread.c: Cleanups.
362 2001-01-28  Andreas Jaeger  <aj@suse.de>
364         * oldsemaphore.c (__old_sem_init): Adjust for last change.
365         * sysdeps/pthread/bits/libc-lock.h: Likewise.
366         * spinlock.c: Likewise.
368 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
370         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
371         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
372         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
373         * pthread.c: Likewise.
374         * spinlock.h: Likewise.
375         * sysdeps/pthread/pthread.h: Likewise.
377 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
379         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
380         as struct __pthread_attr_s.
382         * semaphore.h (sem_t): Cleanup namespace, rename status and
383         spinlock elements.
385 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
387         * pthread.c (pthread_onexit_process): Clear
388         __pthread_manager_thread_bos after freeing it.
389         * Makefile (tests): Add ex16.
390         * Examples/ex16.c: New file.
392 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
394         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
395         -z nodelete.
396         * pthread.c (pthread_exit_process): Rename to...
397         (pthread_onexit_process): ...this.
398         (pthread_atexit_process, pthread_atexit_retcode): New.
399         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
400         and only if HAVE_Z_NODELETE is not defined.
401         (__pthread_initialize_manager): Register pthread_atexit_retcode
402         with __cxa_atexit.
404 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
406         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
408 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
410         * Makefile (tests): Add ex15.
411         * Examples/ex15.c: New test.
413 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
415         * pthread.c (pthread_exit_process): Free memory allocated for
416         manager stack.
418 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
420         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
421         (pthread_free): Always unmap the stack.  It's safe now that we don't
422         use MAP_FIXED to allocate stacks.
424 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
426         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
428         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
430 2000-11-15  Wolfram Gloger  <wg@malloc.de>
432         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
433         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
435 2000-12-27  Andreas Jaeger  <aj@suse.de>
437         * Examples/ex13.c: Make local functions static.
438         * ecmutex.c: Likewise.
439         * joinrace.c: Likewise.
440         * Examples/ex14.c: Likewise.
442         * Examples/ex2.c: Make local functions static; reformat.
443         * Examples/ex1.c: Likewise.
444         * Examples/ex4.c: Likewise.
445         * Examples/ex5.c: Likewise.
446         * Examples/ex7.c: Likewise.
448         * oldsemaphore.c: Add prototypes to shut up GCC.
449         * pt-machine.c: Likewise.
451         * weaks.c: Add prototype for pthread_exit.
453         * internals.h: Add some prototypes, format prototypes and add
454         missing externs.
455         Move __libc_waitpid prototype to include/sys/wait.h.
457         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
458         * mutex.c: Likewise.
459         * specific.c: Likewise.
460         * ptfork.c: Likewise.
462         * lockfile.c: Include internals.h to get prototypes.
463         * events.c: Likewise.
464         * sysdeps/alpha/pspinlock.c: Likewise.
465         * sysdeps/arm/pspinlock.c: Likewise.
466         * sysdeps/hppa/pspinlock.c: Likewise.
467         * sysdeps/i386/pspinlock.c: Likewise.
468         * sysdeps/ia64/pspinlock.c: Likewise.
469         * sysdeps/m68k/pspinlock.c: Likewise.
470         * sysdeps/mips/pspinlock.c: Likewise.
471         * sysdeps/powerpc/pspinlock.c: Likewise.
472         * sysdeps/s390/pspinlock.c: Likewise.
473         * sysdeps/sh/pspinlock.c: Likewise.
474         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
475         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
476         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
478 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
480         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
481         (__pthread_attr_getstack): Return correct address.
482         Add warnings for using pthread_attr_getstackaddr and
483         pthread_attr_setstackaddr.
485 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
487         * Examples/ex6.c (test_thread): Make static.
488         * Examples/ex12.c (test_thread): Make static and add noreturn
489         attribute.
491 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
493         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
494         and compare_and_swap_with_release_semantics returns int not long.
496 2000-12-17  Andreas Jaeger  <aj@suse.de>
498         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
499         value.
500         * sysdeps/arm/pt-machine.h (testandset): Likewise.
501         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
502         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
503         * sysdeps/sh/pt-machine.h (testandset): Likewise.
504         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
505         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
507 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
509         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
510         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
512 2000-12-17  Andreas Jaeger  <aj@suse.de>
514         * internals.h: Add prototypes for testandset and
515         __compare_and_swap to shut up gcc warnings.
517 2000-12-06  Wolfram Gloger  <wg@malloc.de>
519         * join.c (pthread_detach): Allow case where the thread has already
520         terminated.
522 2000-12-05  Andreas Jaeger  <aj@suse.de>
524         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
525         * sysdeps/mips/pt-machine.h (testandset): Likewise.
526         (__compare_and_swap): Likewise.
527         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
529 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
531         * Examples/ex3.c (main): Cast int to long before casting to void *.
532         (search): Cast void * to long, not int.
533         * Examples/ex8.c (main, thread): Similarly.
534         * Examples/ex11.c (main): Similarly.
535         * Examples/ex14.c (worker, do_test): Similarly.
536         * ecmutex.c (worker, do_test): Similarly.
537         (nlocks): Cast to int.
539 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
541         * linuxthreads.texi:  Add documentation for pthreads attributes
542         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
543         patch.  Document pthread_[sg]etconcurrency().  Mark
544         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
546 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
548         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
549         Don't define it.
550         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
551         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
553 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
555         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
556         not doing it right now.
557         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
559 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
561         * Examples/ex4.c (main): Don't use exit() to avoid warning with
562         broken compilers.
564 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
566         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
567         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
569         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
570         discussing mutexes. (As per the Unix98 name for the API.)
571         Changes documentation for pthread_mutexattr_setkind_np() and
572         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
573         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
574         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
575         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
576         Begins to introduce discussion of the ``timed'' mutex type.  This
577         discussion is currently incomplete.
578         Patch by Bruce Mitchener <bruce@cubik.org>.
580 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
581             Yutaka Niibe  <gniibe@chroot.org>
583         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
584         has restrictions, use register.
586 2000-10-23  Andreas Schwab  <schwab@suse.de>
588         * Examples/ex14.c (TIMEOUT): Override default timeout.
590 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
592         * specific.c: Protect tsd array modification in thread data
593         structures by getting the thread lock in pthread_key_delete and
594         __pthread_destroy_specifics.
595         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
597 2000-10-12  Alan Modra <alan@linuxcare.com.au>
599         * sysdeps/pthread/bits/initspin.h: New file.
600         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
601         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
602         (__pthread_alt_init_lock): Likewise.
603         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
605 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
607         * oldsemaphore.c (__old_sem_init): Release lock with
608         LT_SPINLOCK_INIT, not zero.
609         * spinlock.c (__pthread_unlock): Likewise.
610         (__pthread_alt_lock): Likewise.
611         (__pthread_alt_timedlock): Likewise.
612         (__pthread_alt_unlock): Likewise.
613         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
614         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
615         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
616         LT_SPINLOCK_INIT do initialize spinlocks not 0.
618 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
620         * shlib-versions: Add version definitions for hppa-linux.
622 2000-10-12  Alan Modra <alan@linuxcare.com.au>
624         * sysdeps/hppa/pspinlock.c: New file.
625         * sysdeps/hppa/pt-machine.h: New file.
626         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
628 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
630         * mutex.c (__pthread_mutex_destroy): Correct test of
631         busy mutex for mutexes using alternate fastlocks.
632         Patch by dtc@cmucl.cons.org.
634 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
636         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
638 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
640         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
641         test for owner first.
642         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
644         * cancel.c (pthread_cancel): Don't do anything if cancelation is
645         disabled.
647 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
649         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
650         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
652         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
653         _POSIX_MONOTONIC_CLOCK.
655         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
656         and explain why.
658 2000-09-20  Andreas Jaeger  <aj@suse.de>
660         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
661         "testrtsig.h" conditional.
663 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
665         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
666         pthread_attr_setstack.
667         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
668         pthread_attr_setstack.
669         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
671 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
673         * Examples/ex14.c: New file.
674         * Makefile (tests): Add ex14.
676         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
677         mutex.  Patch by dtc@cmucl.cons.org.
679         * ecmutex.c: New file.
680         * Makefile (tests): Add ecmutex.
682 2000-09-04  H.J. Lu  <hjl@gnu.org>
684         * attr.c (__pthread_attr_setguardsize): Use page_roundup
685         instead of roundup to round up to the page size.
687 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
689         * manager.c (pthread_exited): Correctly report event as TD_REAP
690         instead of TD_DEATH.  Fix comments.
692 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
694         * spinlock.h (testandset): Add cast to avoid warning.
695         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
697 2000-09-02  Andreas Jaeger  <aj@suse.de>
699         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
700         prototype.
702 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
704         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
705         Fix typo in last patch (_mode -> _flags).
707         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
708         Provide definition which respects _IO_USER_LOCK flag.
710 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
712         * manager.c (pthread_allocate_stack): Clear descriptor only if not
713         mmaped.
715 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
717         * Makefile: Add rules to build and run unload.
718         * unload.c: New file.
720         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
722         * sysdeps/pthread/pthread.h
723         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
724         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
726 2000-08-24  Andreas Jaeger  <aj@suse.de>
728         * Examples/ex13.c: Include <string.h> for strerror prototype and
729         <stdlib.h> for abort prototype.
730         (pthr_cond_signal_mutex): Rewrite to silence GCC.
731         (thread_start): Remove unused variable err.
732         (main): Silence GCC warnings.
734 2000-08-22  Andreas Jaeger  <aj@suse.de>
736         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
738         * Makefile (tests): Add ex13.
740 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
742         * semaphore.h: Add restrict where required by AGd4.
743         * sysdeps/pthread/pthread.h: Likewise.
744         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
746 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
748         * Makefile (tests): Add ex12.  Add rule to build it.
749         * Examples/ex12.c: New file.
751 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
753         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
754         even though the implementation is not quite complete (but it reports
755         it).  Define _POSIX_MESSAGE_PASSING to -1.
756         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
758 2000-08-12  Andreas Jaeger  <aj@suse.de>
760         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
761         assembler.
762         (__compare_and_swap): Likewise.
763         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
765 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
767         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
768         p_h_errnop correctly and not to NULL.
770 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
772         * Banner: Bump version number to 0.9.
774 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
776         * Makefile (tests): Add tststack.  Add rule to build the program.
777         * tststack.c: New file.
779         * internals.h: Declare __pthread_max_stacksize.
780         * pthread.c (__pthread_max_stacksize): New variable.
781         (__pthread_initialize_manager): Determine __pthread_initialize_manager
782         value.
783         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
784         (pthread_allocate_stack): Allow kernel to choose stack address if
785         FLOATING_STACKS.  This also handles variable-sized stacks.
786         Always allocate stack and guardpage together.  Use mprotect to
787         change guardpage access.
788         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
789         ARCH_STACK_MAX_SIZE.
791         * attr.c (__pthread_attr_setstacksize): Also test value against
792         upper limit.
794         * manager.c (__pthread_nonstandard_stacks): Define only if
795         THREAD_SELF is not defined.
796         (pthread_allocate_stack): Always initialize gardaddr to a correct
797         value.
798         (pthread_handle_create): Unmap thread with one call.
799         (pthread_free): Remove test for initial thread before removing stack.
800         Unmap stack with one call.
802         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
803         1 to avoid removing the stack.
805 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
807         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
808         load of spin lock to prime the cache before the atomic compare and
809         exchange operation (cmpxchg4). This avoids the spinning on the
810         cmpxchg4 instruction and reduces movement of the cache line back
811         and forth between the processors (explanation by Asis K. Mallick
812         from Intel). This basically makes the implementation operate the
813         same as the Linux kernel implementation.
815         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
816         * sysdeps/ia64/pspinlock.c: New file.
818 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
820         * pthread.c: Move definition of __pthread_set_own_extricate_if...
821         * spinlock.h: ...here.  Remove locking.
822         * internals.h: Remove __pthread_set_own_extricate_if prototype.
824         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
825         (rwlock_rd_extricate_func): Don't determine self, let
826         __pthread_lock do it.
827         (rwlock_wr_extricate_func): Likewise.
828         (rwlock_have_already): Optimize *pself handling a bit.
830         * mutex.c: Use __builtin_expect.
831         * pthread.c: Likewise.
833 2000-08-02  Andreas Jaeger  <aj@suse.de>
835         * sysdeps/s390/pspinlock.c: New file.
836         * sysdeps/s390/pt-machine.h: New file.
837         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
839 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
841         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
842         R3K.
843         * sysdeps/mips/pt-machine.h (testandset): Likewise.
845 2000-07-26  Andreas Jaeger  <aj@suse.de>
847         * pthread.c: Initialize p_sem_avail.
849 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
851         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
852         * semaphore.c: Handle spurious wakeups.
854         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
855         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
857         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
858         (__pthread_wait_for_restart): Likewise.
860         * condvar.c (pthread_cond_wait): Also check whether thread is
861         cancelable before aborting loop.
862         (pthread_cond_timedwait): Likewise.
864         * signals.c (pthread_sighandler): Remove special code to restrore
865         %gs on x86.
866         (pthread_sighandler_t): Likewise.
868 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
870         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
871         * pthread.c: Include <resolv.h>.
872         (_res): Undefine.  Add extern declaration.
874 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
876         * pthread.c (__pthread_initial_thread): Update initializer.
877         (__pthread_manager_thread): Likewise.
878         (pthread_initialize): Move setrlimit call to...
879         (__pthread_initialize_manager): ...here.
880         (__pthread_reset_main_thread): Reset also soft limit on stack size.
882         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
883         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
885 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
887         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
888         __compare_and_swap to define testandset.
889         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
890         Define IMPLEMENT_TAS_WITH_CAS.
892 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
894         * Makefile: Pass -z nodelete to linker for libpthread.so
895         generation if it understand this option.
897 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
899         * manager.c (pthread_handle_create): Remove initialization of
900         new_thread->p_res._sock.
902 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
904         Bugfixes to the variant of the code for machines with no compare
905         and swap.
907         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
908         node was not being properly enqueued, due to failing to update
909         the lock->__status field.
911         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
912         being set inappropriately, causing the suspend function to be called
913         with a null self pointer and crash.
915 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
917         * spinlock.h (__pthread_alt_trylock): Fix code used if no
918         compare&swap is available.
920         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
921         compare_and_swap.
923         * pthread.c (pthread_initialize): Don't use sysconf to determine
924         whether the machine has more than one processor.
926         * spinlock.c (__pthread_alt_timedlock): Add back one of the
927         removed thread_self calls.
929 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
931         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
932         __compare_and_swap to compare_and_swap in code which assumes
933         compare swap is available.
935 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
937         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
938         bug whereby thr field of waitnode structure would not be correctly
939         set unless a null self pointer is passed to the functions.
940         Eliminated redundant calls to thread_self().
942 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
944         * pthread.c (__pthread_initialize_manager): Lock
945         __pthread_manager_thread.p_lock before calling clone.
947 2000-05-05  H.J. Lu  <hjl@gnu.org>
949         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
950         have acquire semantics.
951         (__compare_and_swap_with_release_semantics): New inline
952         function.
953         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
955 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
957         * manager.c: Fix the problem with signals at startup.
958         Change the way that thread stacks are allocated on IA64.
959         Clean up some of the guard page allocation stuff.
961 1999-12-19  H.J. Lu  <hjl@gnu.org>
963         * internals.h (page_roundup): New.
964         * attr.c (__pthread_attr_setguardsize); Use page_roundup
965         instead of roundup.
966         * manager.c (pthread_allocate_stack): Make sure guardaddr is
967         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
968         is define.
970 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
972         * manager.c (pthread_allocate_stack): Unmap the stack top
973         if failed to map the stack bottom.
974         Fix the guard page.
975         (pthread_free): Fix the guard page.
977         * pthread.c (pthread_initialize): Set rlimit correctly for
978         NEED_SEPARATE_REGISTER_STACK.
980 1999-12-16  H.J. Lu  <hjl@gnu.org>
982         * pthread.c (__pthread_initialize_manager): Pass
983         __pthread_manager_thread_bos instead of
984         __pthread_manager_thread_tos to __clone2.
986 1999-12-16  H.J. Lu  <hjl@gnu.org>
988         * manager.c (pthread_allocate_stack): Correct the calculation
989         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
990         stack bottom.
992 1999-12-13  H.J. Lu  <hjl@gnu.org>
994         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
995         bit after setting ar.ccv.
997 1999-12-12  H.J. Lu  <hjl@gnu.org>
999         * manager.c (pthread_allocate_stack): Make the starting
1000         address of the stack bottom page aligned. FIXME: it may
1001         need changes in other places.
1002         (pthread_handle_create): Likewise.
1004 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
1006         * manager.c (pthread_allocate_stack): Handle
1007         NEED_SEPARATE_REGISTER_STACK.
1008         (pthread_handle_create): Likewise.
1009         * pthread.c (__pthread_initialize_manager): Likewise.
1011         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1013 1999-12-02  H.J. Lu  <hjl@gnu.org>
1015         * sysdeps/ia64/pt-machine.h: New.
1017 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
1019         * wrapsyscall.c: Mark non-__ protected names as weak.
1020         PR libc/1466.
1022 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
1024         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1026 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
1028         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1029         Add tests also to new alternative spinlock implementation.
1030         * spinlock.h: Likewise.
1031         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1033 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
1035         * Version: Export __sigaction.
1036         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
1037         of __sigaction.
1038         * pthread.c: Use __libc_sigaction instead of __sigaction.
1040         * condvar.c: Implement pthread_condattr_getpshared and
1041         pthread_condattr_setpshared.
1042         * mutex.c: Implement pthread_mutexattr_getpshared and
1043          pthread_mutexattr_setpshared.
1044         * Versions: Export new functions.
1045         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1047         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1048         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1049         is not selected.
1051 2000-07-04  Greg McGary  <greg@mcgary.org>
1053         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1054         pragmas.  Include bp-sym.h only if _LIBC.
1056 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
1058         * spinlock.c (__pthread_unlock): Properly place write barrier.
1059         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1061 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
1063         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1064         faster on SMP systems.  No more emulation of compare&swap for adaptive
1065         spinlocks.
1066         * spinlock.h: Likewise.
1067         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1068         Replace fast with adaptive mutex.
1069         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1070         * condvar.c: Likewise.
1071         * pthread.c: Define and initialize __pthread_smp_kernel variable.
1072         * internals.h: Declare __pthread_smp_kernel.
1073         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1074         _pthread_fastlock structure.
1075         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1077         * pthread.c: Remove initialization to zero from global variables.
1079 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
1081         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1083 2000-06-28  Greg McGary  <greg@mcgary.org>
1085         * weaks.c: Wrap BP_SYM () around weak extern declarations of
1086         pthread functions that have pointers in their return+arg signatures.
1088 2000-06-27  Greg McGary  <greg@mcgary.org>
1090         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1091         extern declarations of pthread functions that have pointers in
1092         their return+arg signatures.
1094 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
1096         * Makefile (tests): Add ex11.  Add rules to build it.
1097         * Examples/ex11.c: New file.
1098         * rwlock.c: Fix complete braindamaged previous try to implement
1099         timedout functions.
1101         * spinlock.c: Pretty print.
1103 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
1105         * Makefile (tests): Add ex10.  Add rules to build it.
1106         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1107         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1108         * condvar.c (pthread_cond_wait): Allow mutex of kind
1109         PTHREAD_MUTEX_TIMED_NP.
1110         (pthread_cond_timedwait_relative): Likewise.
1111         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1112         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1113         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1114         (__pthread_mutex_lock): Use __pthread_alt_lock for
1115         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1116         (__pthread_mutex_timedlock): New function.
1117         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1118         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1119         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1120         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1121         * spinlock.c: Implement alternate fastlocks.
1122         * spinlock.h: Add prototypes.
1123         * Examples/ex10.c: New file.
1124         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1125         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1127         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1128         (__pthread_rwlock_timedrdlock): New function.
1129         (__pthread_rwlock_timedwrlock): New function.
1130         Use laternate fastlock function everywhere.
1132 2000-06-21  Andreas Jaeger  <aj@suse.de>
1134         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1135         prototype.
1137         * join.c: Include <stdlib.h> for exit prototype.
1139 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
1141         * sysdeps/i386/useldt.h: Include <stdlib.h>.
1143         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1144         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1146         * Makefile (libpthread-routines): Add barrier.
1147         (tests): Add ex9.  Add rule to build ex9.
1148         * Versions: Export barrier functions.
1149         * barrier.c: New file.
1150         * Examples/ex9.c: New file.
1151         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1152         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1153         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1155 2000-06-19  H.J. Lu  <hjl@gnu.org>
1157         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1158         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1159         (compare_and_swap_with_release_semantics): New. Default to
1160         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1161         is not defined.
1163         * spinlock.c (__pthread_unlock): Call
1164         compare_and_swap_with_release_semantics () instead of
1165         compare_and_swap ().
1167 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
1169         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1170         to errno directly.
1171         * sysdeps/pthread/timer_delete.c: Likewise.
1172         * sysdeps/pthread/timer_getoverr.c: Likewise.
1173         * sysdeps/pthread/timer_gettime.c: Likewise.
1174         * sysdeps/pthread/timer_settime.c: Likewise.
1176 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1178         Timer nodes are now reference counted, and can be marked
1179         as deleted. This allows for the safe release of the global mutex
1180         in the middle without losing the timer being operated on.
1182         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
1183         member is now an enum with three values, so that an intermediate
1184         state can be represented (deleted but not free for reuse yet).
1185         New refcount member added.
1186         * sysdeps/pthread/timer_routines.c: Likewise.
1188         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1189         timer_valid): New inline functions added.
1191         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1192         restructured, recursive deadlock bug fixed.
1194         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1195         timer_addref to ensure that timer won't be deleted while mutex is not
1196         held. Also uses timer_invalid to perform validation of timer handle.
1197         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1198         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1200 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
1202         * shlib-versions: Add entry for SH.
1203         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1205 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1207         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
1208         tightened up some critical regions and micro-optimized some list
1209         manipulation code.
1211         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1212         Returns int value now to indicate whether timer was queued at head.
1213         * sysdeps/pthread/posix-timer.h: Likewise.
1214         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1215         new return value from __timer_thread_queue_timer to avoid waking
1216         up timer thread unnecessarily.
1218         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1219         inuse flag, because this requires mutex to be held.  Callers updated
1220         to do the check when they have the mutex.
1221         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1223         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1224         regions: avoids making system calls while holding timer mutex, and
1225         a few computations were moved outside of the mutex as well.
1226         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1228         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1229         to list_unlink_ip, meaning idempotent.  Pointer manipulation
1230         changed to get better better code out of gcc.
1231         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1232         version of list_unlink added here.
1233         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1234         function in all places: idempotent one for timers, non-idempotent
1235         one for thread nodes.
1236         * sysdeps/pthread/timer_settime: Likewise.
1237         * sysdeps/pthread/timer_routines.c: Likewise.
1239 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
1241         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1242         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1244         * sysdeps/pthread/Makefile: Remove tests definition.
1246 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1247             Yutaka Niibe  <gniibe@chroot.org>
1249         * sysdeps/sh/pspinlock.c: New file.
1250         * sysdeps/sh/pt-machine.h: New file.
1252 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
1254         * Makefile (tests): Add joinrace.
1256         * Examples/ex6.c: Test return value of pthread_join.
1258 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
1260         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1261         (__pthread_spin_trylock): Implement.
1262         (__pthread_spin_unlock): Implement.
1263         (__pthread_spin_init): Implement.
1264         (__pthread_spin_destroy): Implement.
1266 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1268         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1269         really append the entry.
1271 2000-06-10  Andreas Jaeger  <aj@suse.de>
1273         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1275 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1277         * sysdeps/pthread/timer_create.c: Thread matching now done on
1278         clock type as well as thread attributes.
1279         There are individual global signal-delivering threads for
1280         different clock types.
1281         * sysdeps/pthread/posix-timer.h: Likewise.
1282         * sysdeps/pthread/timer_routines.c: Likewise.
1284         * sysdeps/pthread/timer_routines.c: Thread allocation and
1285         deallocation function now remembers to put thread on active
1286         list and remove from active list.
1287         Thus now the feature of binding multiple timers
1288         to a single thread actually works.
1290 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1292         * pthread.c (__pthread_create_2_1): Optimize a bit.
1294         * internals.h (invalid_handle): Also test for p_terminated != 0.
1295         (nonexisting_handle): New function.  Same as old invalid_handle.
1296         * join.c (pthread_join): Use nonexisting_handle instead of
1297         invalid_handle to test for acceptable thread handle.
1298         * manager.c (pthread_handle_free): Likewise.
1299         * joinrace.c: New file.
1300         Reported by Permaine Cheung <pcheung@cygnus.com>.
1302 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1304         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1305         Correct handling of matching variable.
1307         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1308         avoid warnings.
1310         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1311         Be prepared for empty timer list.
1313         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1314         CPUTIME clock ID.  Add support for thread clocks.
1316         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1317         subtraction were switched.
1319         * sysdeps/pthread/timer_routines.c (init_module): Use
1320         THREAD_MAXNODES threads.
1322         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1323         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1324         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1325         with sigqueueinfo is this system call is available.
1327         * sysdeps/pthread/timer_create.c (timer_create): Allow
1328         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1330         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1331         functionality.
1332         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1334 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1336         * sysdeps/pthread/posix-timer.h: New file.
1337         * sysdeps/pthread/timer_create.c: New file.
1338         * sysdeps/pthread/timer_delete.c: New file.
1339         * sysdeps/pthread/timer_getoverr.c: New file.
1340         * sysdeps/pthread/timer_gettime.c: New file.
1341         * sysdeps/pthread/timer_routines.c: New file.
1342         * sysdeps/pthread/timer_settime.c: New file.
1343         * sysdeps/pthread/tst-timer.c: New file.
1345 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1347         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1348         LINK_MAX definitions if necessary.
1350 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1352         Added missing fork time handling of global libio lock.
1354         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1355         not just the individual stream locks. Rewritten to use new
1356         iterator interface provided by libio rather than accessing
1357         global variable.
1359         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1360         which lock and unlock the stream list using the new interface
1361         provied by libio.
1362         * internals.h: Likewise.
1364         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1365         and __funlockfilelist in the parent after the fork.
1366         Child still calls __fresetlockfiles as before.
1368         * linuxthreads.texi: Now explains what happens to streams at
1369         fork time. Also whole new section on forking and thread added.
1370         Definition of pthread_atfork moved out of Miscellaneous Functions
1371         to this new section.
1373 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1375         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1376         Add missing register.
1377         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1379 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1381         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1382         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1383         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1385 2000-05-31  Andreas Jaeger  <aj@suse.de>
1387         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1389 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1391         * spinlock.c (__pthread_lock): Remove ASSERT.
1393         * Makefile (tests): Add ex8.
1394         * Examples/ex8.c: New file.
1396 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1398         Bugfix: The pthread_atfork mechanism now takes care of its
1399         own internal mutex at fork time.
1401         * ptfork.c (__fork): Revised so that the mutex is held across
1402         the fork operation and while the handlers are called, and so that
1403         the child resets the mutex.
1405         * linuxthreads.texi: Updated pthread_atfork documentation to make
1406         it clear that fork and pthread_atfork can't be reentered from
1407         atfork handlers, that pthread_atfork and fork are mutually atomic,
1408         and that the handlers are inherited by the child process.
1410 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1412         * Makefile (libpthread-routines): Add pspinlock.
1413         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1414         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1415         * condvar.c: Likewise.
1416         * internals.h: Likewise.
1417         * join.c: Likewise.
1418         * manager.c: Likewise.
1419         * mutex.c: Likewise.
1420         * pthread.c: Likewise.
1421         * rwlock.c: Likewise.
1422         * semaphore.c: Likewise.
1423         * signals.c: Likewise.
1424         * spinlock.h: Likewise.
1425         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1426         * sysdeps/alpha/pspinlock.c: New file.
1427         * sysdeps/arm/pspinlock.c: New file.
1428         * sysdeps/i386/pspinlock.c: New file.
1429         * sysdeps/m68k/pspinlock.c: New file.
1430         * sysdeps/mips/pspinlock.c: New file.
1431         * sysdeps/powerpc/pspinlock.c: New file.
1432         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1433         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1434         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1435         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1437 2000-05-24  Andreas Jaeger  <aj@suse.de>
1439         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1441 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1443         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1445 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1447         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1449 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1451         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1452         object state is represented with additional bits which distinguish
1453         whether that state was set up in the current process, or
1454         in an ancestor process. If that state was set in an ancestor,
1455         it means that a fork happened while thread was executing the init
1456         function. In that case, the state is reset to NEVER.
1457         * mutex.c (__pthread_once_fork_prepare): New function.
1458         (__pthread_once_fork_child): Likewise
1459         (__pthread_once_fork_parent): Likewise
1460         (__pthread_reset_pthread_once): Removed.
1461         * ptfork.c (__fork): Call new handlers in mutex.c.
1462         * internals.h: Declarations of new mutex.c functions added.
1463         Declaration of removed function deleted.
1464         * linuxthreads.texi: Updated documentation about pthread_once
1465         to clarify what happens under cancellation and forking.
1467 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1469         * internals.h: New thread manager request type, REQ_KICK.
1470         * join.c (pthread_exit): main thread now calls exit() instead
1471         of _exit() in order to proper process cleanup.
1472         * manager.c (__pthread_manager): Do not terminate manager
1473         after unblocking main thread; wait for main thread's
1474         REQ_PROCESS_EXIT request instead.
1475         Also, added REQ_KICK case to handle new request; this just does
1476         nothing.
1477         * manager.c (pthread_exited): Do not terminate manager after
1478         unblocking main thread.
1479         * manager.c (__pthread_manager_sighandler): If the main thread
1480         is waiting for all other threads to die, send a REQ_KICK into
1481         the thread manager request pipe to get it to clean out the threads
1482         and unblock the main thread as soon as possible. This fixes
1483         the 2000 millisecond hang on shutdown bug.
1484         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1485         including the main one call pthread_exit(), or implicitly do so.
1486         * Makefile (tests): Add ex7.
1488 2000-05-05  Andreas Jaeger  <aj@suse.de>
1490         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1491         (pthread_getcpuclockid): Correct test for ourselves.
1493 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1495         * internals.h (struct _pthread_descr_struct): Reorganization.
1496         Allocate room for 16 pointers at head of the structure for future
1497         thread-local data handling.  Move p_self member in this area.
1498         * manager.c (pthread_handle_create): Adjust use of p_self.
1499         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1500         * pthread.c (__pthread_initial_thread): Adjust initialization.
1501         (__pthread_manager_thread): Likewise.
1503 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1505         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1506         for eventmask larger than 1 word.
1508 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1510         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1511         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1512         minimal initialization.
1513         (pthread_initialize): Remove this code here.
1514         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1515         are working around the problem in glibc.
1517 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
1519         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1520         now.  First gcc must be fixed (more concrete: libgcc).
1522 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
1524         * pthread.c: Remove special treatement for interrupt handlers on x86.
1525         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1526         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1527         necessary.
1528         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1530 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
1532         * join.c (pthread_exit): Set p_terminated after reporting the
1533         termination event instead of before.
1535 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
1537         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1538         if __USE_UNIX98.
1540 2000-04-18  Andreas Jaeger  <aj@suse.de>
1542         * Versions: Use ld instead of ld.so.
1544 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1546         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1547         Remove the typedef keyword.
1549 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1551         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1552         not stbar.
1553         (READ_MEMORY_BARRIER): Define.
1554         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1555         MEMORY_BARRIER.
1556         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1557         headers.
1559 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
1561         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1562         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1563         use thread_handle().
1565 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
1567         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1568         if fast mutex is used.  Don't initialize `already_canceled' twice.
1569         Correctly test for return value of timedsuspend.
1571         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
1572         therefore don't need the _rt versions of the signal handlers.
1574 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1576         * pthread.c (pthread_yield): New function.
1577         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1578         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1579         * internals.h: Declare __pthread_yield.
1581         * pthread.c (pthread_initialize): Avoid a bit more code if
1582         realtime signals are known to exist.
1584         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1585         to dynamically detect RT signals and avoid generating compatibility
1586         functions with old kernel.
1587         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1588         __pthread_restart_new directly.
1589         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1590         __pthread_wait_for_restart_signal directly.
1591         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1592         __pthread_timedsuspend_new directly.
1594 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1596         * condvar.c: Remove all the special code to handle cond_timedwait.
1597         Use timedsuspend instead.
1598         * internals.h: Declare __pthread_timedsuspend_old,
1599         __pthread_timedsuspend_new, and __pthread_timedsuspend.
1600         Remove declaration of __pthread_init_condvar.
1601         * pthread.c: Define __pthread_timedsuspend variable.
1602         (__pthread_timedsuspend_old): New function.  Timed suspension
1603         implementation for old Linux kernels.
1604         (__pthread_timedsuspend_new): New function.  Timed suspension
1605         implementation for new Linux kernels.
1606         * restart.h (timedsuspend): New function.  Call appropriate
1607         suspension function through __pthread_timedsuspend.
1608         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1609         the code.
1610         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1612         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1613         undefined.
1614         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1615         where possible.
1616         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1617         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1619         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1620         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1622 2000-04-14  Andreas Jaeger  <aj@suse.de>
1624         * weaks.c: Fix typo.
1626         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1627         2.2 for linuxthreads.
1629 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
1631         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1632         (pthread_getcpuclockid): Fix typo.
1634 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
1636         * Makefile (libpthread-routines): Add getcpuclockid.
1637         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1638         * sysdeps/pthread/getcpuclockid.c: New file.
1639         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1640         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1642         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1643         Defined.
1644         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1646         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1647         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1648         and pthread_spin_unlock.
1649         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1650         into pthread_spinlock_t.  Change all uses.
1651         * spinlock.c: Implement pthread_spin_lock.
1652         Rename __pthread_unlock to __pthread_spin_unlock and define weak
1653         alias for real name.
1654         Define pthread_spin_trylock, pthread_spin_init, and
1655         pthread_spin_destroy.
1656         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1657         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1658         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1659         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1660         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1661         and pthread_spin_unlock.
1662         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1663         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1664         * condvar.c: Likewise.
1665         * internals.h: Likewise.
1666         * join.c: Likewise.
1667         * manager.c: Likewise.
1668         * mutex.c: Likewise.
1669         * pthread.c: Likewise.
1670         * rwlock.c: Likewise.
1671         * semaphore.c: Likewise.
1672         * signals.c: Likewise.
1674         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1675         macros.
1676         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1678 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1680         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1681         _POSIX_SHARED_MEMORY_OBJECTS.
1683 2000-04-11  Andreas Jaeger  <aj@suse.de>
1685         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1686         (__compare_and_swap): Mark as modifying memory.
1688 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
1690         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1691         __volatile__.
1692         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1693         Don't have the 'asm' __volatile__.
1695 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1697         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1698         * spinlock.c (__pthread_lock): Add memory barriers.
1699         (__pthread_unlock): Likewise.
1700         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1701         instruction.
1702         (RELEASE): Not needed anymore.
1703         (__compare_and_swap): Mark asm as modifying memory.
1704         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
1705         of MEMORY_BARRIER.
1706         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1707         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1708         (MEMORY_BARRIER): Define using stbar.
1709         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1710         stbar.
1711         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1712         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1713         Mike Burrows <m3b@pa.dec.com>.
1715 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
1717         * signals.c (sigaction): Fix return value for the case SIG is one
1718         of the signals the implementation uses.
1719         Patch by Xavier.Leroy@inria.fr.
1721 2000-04-01  Andreas Jaeger  <aj@suse.de>
1723         * attr.c: Use shlib-compat macros.
1724         * oldsemaphore.c: Likewise.
1725         * pthread.c: Likewise.
1726         * weaks.c: Likewise.
1728 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
1730         * semaphore.c (sem_timedwait): New function.
1731         Patch by Carl Mailloux <carlm@oricom.ca>.
1732         * semaphore.h: Declare sem_timedwait.
1733         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1735 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
1737         * sysdeps/pthread/Makefile: File removed.
1739 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
1741         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1742         * internals.h (__pthread_reset_pthread_once): Add prototype.
1743         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1745         * manager.c (pthread_handle_create): Store ID of new thread before
1746         clone call.
1748 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
1750         * attr.c: Use new macros from shlib-compat.h to define versions.
1751         * oldsemaphore.c: Likewise.
1752         * semaphore.c: Likewise.
1753         * weaks.c: Likewise.
1755         * pthread.c: Update for new SHLIB_COMPAT definition.
1757         * manager.c (__pthread_manager): Unmask debug signal.
1759         * pthread.c (pthread_initialize): Test for address of __dso_handle
1760         being NULL, not value.  Use __on_exit, not on_exit.
1761         Patch by Andreas Jaeger <aj@suse.de>.
1763         * pthread.c: Use new macros from shlib-compat.h to define versions.
1765 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1767         * pthread.c (pthread_initialize): Instead of on_exit use
1768         __cxa_atexit if __dso_label is available to allow unloading the
1769         libpthread shared library.
1771 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1773         * condvar.c: Make tests for ownership of mutex less strict.
1775 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1777         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1778         current thread and return error if not.
1779         (pthread_cond_timedwait_relative_old): Likewise.
1780         (pthread_cond_timedwait_relative_new): Likewise.
1782         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1783         (pthread_once_cancelhandler): New function.
1784         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1786 2000-03-14  Andreas Jaeger  <aj@suse.de>
1788         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1789         REG_GS.
1790         (pthread_handle_sigrestart_rt): Likewise.
1791         * signals.c (pthread_sighandler_rt): Likewise.
1793 2000-03-02  Andreas Jaeger  <aj@suse.de>
1795         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1796         Reported by Sean Chen <sean.chen@turbolinux.com>.
1798 2000-02-28  Andreas Jaeger  <aj@suse.de>
1800         * rwlock.c: Fix typo.
1802 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1804         * rwlock.c: Define __* variants of the functions and make old names
1805         aliases.
1806         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1807         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1809 2000-02-25  Andreas Jaeger  <aj@suse.de>
1811         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1812         pwrite64, lseek64, open64, and __open64 with version 2.2.
1814 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
1816         * semaphore.h (SEM_FAILED): Use 0 not NULL.
1818 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
1820         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1821         nanosleep does not work either.  Get absolute time inside the
1822         loop.
1823         (pthread_cond_timedwait_relative_new): Likewise.
1824         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1826 2000-02-13  Andreas Jaeger  <aj@suse.de>
1828         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1829         (pthread_cond_timedwait_relative_old): Likewise.
1831 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
1833         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1834         but keep the code around.  A bug in the kernel prevent us from
1835         using the code.
1836         (pthread_cond_timedwait_relative_new): Likewise.
1837         (PR libc/1597 and libc/1598).
1839 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1841         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1842         loop around nanosleep calls instead of around most of the function
1843         (pthread_cond_timedwait_relative_new): Likewise.
1844         body.  Got rid of backwards goto and one local.
1846 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1848         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1849         before every nanosleep call to account for time spent in the rest
1850         of the function.
1851         (pthread_cond_timedwait_relative_new): Likewise.
1852         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1854 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
1856         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1857         from nanosleep call so that in case we restart we only wait for the
1858         remaining time.
1859         (pthread_cond_timedwait_relative_new): Likewise.
1860         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1862 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
1864         * manager.c (pthread_allocate_stack): Compute guard page address
1865         correctly.  Patch by HJ Lu.
1867         * sysdeps/pthread/pthread.h: Define
1868         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1870 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1872         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1873         preference handling.
1874         (pthread_rwlockattr_setkind_np): Allow
1875         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1876         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1878 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1880         * internals.h (pthread_readlock_info): New structure.
1881         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1882         p_untracked_readlock_count.
1883         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1884         Add initializers for new fields.
1885         * manager.c (pthread_free): Free read/write lock lists.
1886         * queue.h (queue_is_empty): New function.
1887         * rwlock.c: Implement requirements about when readers should get
1888         locks assigned.
1889         * sysdeps/pthread/pthread.h
1890         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1891         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1892         Define this name as well.
1893         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1895 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1897         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1898         Adjust initializers for struct _pthread_descr_struct change.
1899         * internals.h (struct _pthread_descr_struct): Move new elements to
1900         the end.
1902 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1904         Redesigned how cancellation unblocks a thread from internal
1905         cancellation points (sem_wait, pthread_join,
1906         pthread_cond_{wait,timedwait}).
1907         Cancellation won't eat a signal in any of these functions
1908         (*required* by POSIX and Single Unix Spec!).
1909         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1910         simultaneous condition variable signal (not required by POSIX
1911         or Single Unix Spec, but nice).
1912         * spinlock.c: __pthread_lock queues back any received restarts
1913         that don't belong to it instead of assuming ownership of lock
1914         upon any restart; fastlock can no longer be acquired by two threads
1915         simultaneously.
1916         * restart.h: Restarts queue even on kernels that don't have
1917         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1918         avoiding a rare race condition in pthread_cond_timedwait.
1920 1999-12-31  Andreas Jaeger  <aj@suse.de>
1922         * internals.h: Remove duplicate prototype declarations.
1924         * weaks.c: Remove __THROW from prototypes since the file is not
1925         compiled by a C++ compiler.
1926         * internals.h: Likewise.
1928 1999-12-30  Andreas Jaeger  <aj@suse.de>
1930         * sysdeps/pthread/pthread.h: Move internal functions to...
1931         * sysdeps/pthread/bits/libc-lock.h: ...here.
1933 1999-12-29  Andreas Jaeger  <aj@suse.de>
1935         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1937 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1939         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1940         beginning.
1942         * manager.c (__pthread_start): Add one more cast to prevent
1943         warning on 64bit machines.
1945 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1947         * manager.c (pthread_handle_create): Set p_pid of new thread
1948         before calling the callback function to report a new thread.
1950 1999-12-20  Andreas Jaeger  <aj@suse.de>
1952         * pthread.c (pthread_initialize): Move getrlimit call after
1953         setting of errno.
1955 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1957         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1958         pwrite64, lseek64, open64, and __open64.
1959         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1960         pwrite64, lseek64, open64, and __open64.
1962         * manager.c (pthread_allocate_stack): Correct computation of
1963         new_thread_bottom.  Correct handling of stack size and when the
1964         rlimit method to guard for stack growth is used.
1965         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1966         minus one pagesize (not two).
1968 1999-12-03  Andreas Jaeger  <aj@suse.de>
1970         * Versions: Add __res_state with version GLIBC_2.2.
1972         * errno.c (__res_state): New function to return thread specific
1973         resolver state.
1975         * pthread.c (pthread_initialize): Initialize p_resp.
1976         (__pthread_reset_main_thread): Also set p_resp.
1978         * manager.c (pthread_handle_create): Initialize p_resp.
1980         * internals.h: Add thread specific resolver state.
1981         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1983 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
1985         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1986         beginning.
1987         * sysdeps/i386/i686/pt-machine.h: Likewise.
1988         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1990 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
1992         * manager.c (pthread_start_thread_event): Initialize p_pid already
1993         here.
1995 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
1997         * internals.h: Add prototype for __pthread_manager_event.
1998         * manager.c (__pthread_manager_event): New function.
1999         (pthread_start_thread_event): Correct computation of self.
2000         Use INIT_THREAD_SELF.
2001         * pthread.c (__pthread_manager_thread): Initialize p_lock.
2002         (__pthread_initialize_manager): Respect event flags also for creation
2003         of the manager thread.
2005 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
2007         * pthread.c (__pthread_initialize_manager): Initialize
2008         __pthread_manager_thread.p_tid.
2010 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
2012         * internals.h: Declare __pthread_last_event.
2013         * manager.c: Define __pthread_last_event.
2014         (pthread_handle_create): Set __pthread_last_event.
2015         (pthread_exited): Likewise.
2016         * join.c (pthread_exit): Likewise.
2018         * Makefile (libpthread-routines): Add events.
2019         * events.c: New file.
2020         * internals.h: Protect against multiple inclusion.
2021         Include thread_dbP.h header.
2022         (struct _pthread_descr_struct): Add new fields p_report_events and
2023         p_eventbuf.
2024         Declare event reporting functions.
2025         * join.c (pthread_exit): Signal event if this is wanted.
2026         * manager.c (__pthread_threads_events): New variable.
2027         (pthread_handle_create): Take new parameters with event information.
2028         Signal TD_CREATE event if wanted.
2029         (__pthread_manager): Adjust pthread_handle_create call.
2030         (pthread_start_thread_event): New function.  Block until manager is
2031         finished and then call pthread_start_thread.
2032         (pthread_exited): Signal TD_REAP event if wanted.
2034 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
2036         * restart.h (suspend_with_cancellation): Rewrite as a macro.
2038         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2040 1999-10-25  Andreas Jaeger  <aj@suse.de>
2042         * internals.h: Remove K&R compatibility.
2043         * no-tsd.c: Likewise.
2044         * semaphore.h: Likewise.
2045         * signals.c: Likewise.
2046         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2047         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2048         * weaks.c: Likewise.
2050 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
2052         * pthread.c: For i386, wrap pthread_handle_sigrestart and
2053         pthread_handle_sigcancel with functions that restore %gs from the
2054         signal context.  For each signal handling function, two wrappers
2055         are required, one for a non-RT signal and one for a RT signal.
2056         * signal.c: For i386, add code to restore %gs from the signal
2057         context in pthread_sighandler and pthread_sighandler_rt.
2059 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
2061         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2063 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
2065         * pthread.c (__pthread_initial_thread): Pass argument to
2066         PTHREAD_START_ARGS_INITIALIZER.
2067         (__pthread_manager_thread): Likewise.
2069         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2070         initialize function.
2072         * manager.c (pthread_handle_create): Remove p_startfct initialization.
2074         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2076 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
2078         * internals.h: Correct return types for __libc_read and __libc_write.
2080 1999-10-09  Andreas Jaeger  <aj@suse.de>
2082         * internals.h: Add __new_sem_post to get prototype in
2083         manager.c; include semaphore.h for needed types.
2085 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
2087         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2088         directly instead of calling sem_post which should not be necessary
2089         but is faster and might help in some case to work around problems.
2090         Patch by khendricks@ivey.uwo.ca [libc/1382].
2092 1999-10-08  Andreas Schwab  <schwab@suse.de>
2094         * sysdeps/pthread/Subdirs: New file.
2095         * Implies: Removed.
2097 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
2099         * Implies: New file.
2100         * internals.h (struct _pthread_descr_struct): Add p_startfct.
2101         * manager.c (pthread_handle_create): Initialize p_startfct.
2102         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2104 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
2106         * manager.c (__linuxthreads_pthread_threads_max): New variable.
2107         * specific.c (__linuxthreads_pthread_keys_max): New variable.
2108         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2110         * condvar.c (pthread_cond_timedwait_relative): Never return with
2111         EINTR.  Patch by Andreas Schwab.
2113 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
2115         * signals.c (sigaction): Correct last patch.  Don't select
2116         pthread_sighandler_rt based on the signal number but instead of
2117         the SA_SIGINFO flag.
2119 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
2121         * specific.c: Move definitions of struct pthread_key_struct and
2122         destr_function to ...
2123         * internals.h: ...here.
2125 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
2127         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
2128         this instead of pthread_handle_sigrestart if the signal is an RT
2129         signal.
2131         * signals.c: Handle passing through of sighandler arguments also
2132         for real-time signals.
2134 1999-09-03  Andreas Schwab  <schwab@suse.de>
2136         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
2137         fork as weak alias.
2138         (__vfork): New function, alias vfork.
2139         * Versions: Export __fork, vfork, and __vfork in libpthread.
2141 1999-08-23  Andreas Schwab  <schwab@suse.de>
2143         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2144         call to signal handler.
2146 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
2148         * pthread.c (__pthread_reset_main_thread): Undo last change.
2149         (__pthread_kill_other_threads_np): Reset signal handlers for the
2150         signals we used in the thread implementation here.
2152 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
2154         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2155         for the signals we used in the thread implementation [PR libc/1234].
2157         * Versions: Export __pthread_kill_other_threads_np from libpthread
2158         for GLIBC_2.1.2.
2160         * signals.c: Pass sigcontext through wrapper to the user function.
2162 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
2164         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2165         __libc_internal_tsd_set.
2167 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2169         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2170         needed anymore.
2172 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2174         * internals.h: Align _pthread_descr_struct to 32 bytes.
2175         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2176         libc/1206.
2178 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2180         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2181         swap function.
2183 1999-07-09  Cristian Gafton  <gafton@redhat.com>
2185         * Makefile (libpthread-routines): Add oldsemaphore routine.
2186         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2187         sem_trywait, and sem_wait to GLIBC_2.1.
2188         * oldsemaphore.c: New file.
2189         * semaphore.c: Add default_symbol_versions for the changed functions.
2190         (__new_sem_init): Rename from sem_init.
2191         (__new_sem_post): Rename from sem_post.
2192         (__new_sem_wait): Rename from sem_wait.
2193         (__new_sem_trywait): Rename from sem_trywait.
2194         (__new_sem_getvalue): Rename from sem_getvalue.
2195         (__new_sem_destroy): Rename from sem_destroy.
2197 1999-06-23  Robey Pointer  <robey@netscape.com>
2199         * internals.h: Added p_nextlock entry to separate queueing for a
2200         lock from queueing for a CV (sometimes a thread queues on a lock
2201         to serialize removing itself from a CV queue).
2202         * pthread.c: Added p_nextlock to initializers.
2203         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2205 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2207         * manager.c (pthread_handle_create): Free mmap region after stack
2208         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2210 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2212         * man/pthread_cond_init.man: Correct example.
2213         Reported by Tomas Berndtsson <tomas@nocrew.org>.
2215         * linuxthreads.texi (Condition Variables): Likewise.
2217 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
2219         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2220         casx not cas, also successful casx returns the old value in rd
2221         and not the new value.
2223 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
2225         * manager.c: If pthread_create() is given a NULL attribute
2226         and the thread manager runs with a realtime policy, set the
2227         scheduling policy of the newly created thread back to SCHED_OTHER.
2228         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2229         initialize the schedpolicy field of new_thread->p_start_args
2230         to that of the calling thread.
2232 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
2234         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2235         instruction does not allow memory element to use offset.
2237 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
2239         * manager.c (pthread_allocate_stack): Optimize initialization of new
2240         thread descriptor.
2242         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2243         Don't use initializer since it is all zeroes.
2244         (__libc_once_define): Likewise.
2246 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2248         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2249         doesn't exist anymore.
2250         * sysdeps/i386/Implies: Likewise.
2251         * sysdeps/m68k/Implies: Likewise.
2252         * sysdeps/mips/Implies: Likewise.
2253         * sysdeps/powerpc/Implies: Likewise.
2254         * sysdeps/sparc/sparc32/Implies: Likewise.
2255         * sysdeps/sparc/sparc64/Implies: Likewise.
2257 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
2259         * sysdeps/alpha/bits/semaphore.h: Removed.
2260         * sysdeps/powerpc/bits/semaphore.h: Removed.
2261         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2262         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2263         * Makefile (headers): Remove bits/semaphore.h.
2265         * semaphore.h: Define _pthread_descr if necessary.
2266         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2267         Define SEM_FAILED.
2268         (sem_t): Protect element names with leading __.
2269         Add declarations for sem_close, sem_open, and sem_unlink.
2270         * semaphore.c: Adjust all functions for new element names.
2271         Define sem_close, sem_open, and sem_unlink.
2272         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2273         GLIBC_2.1.1.
2274         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2275         necessary.
2277 1999-03-16  H.J. Lu  <hjl@gnu.org>
2279         * specific.c (pthread_key_delete): Check th->p_terminated to see
2280         if the thread is running.
2282         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2283         Added to GLIBC_2.0 for libc.so.
2285 1999-02-12  H.J. Lu  <hjl@gnu.org>
2287         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2288         __libc_allocate_rtsig): Added to GLIBC_2.1.
2290         * internals.h (DEFAULT_SIG_RESTART): Removed.
2291         (DEFAULT_SIG_CANCEL): Removed.
2293         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2294         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2295         (__pthread_sig_restart, __pthread_sig_cancel,
2296         __pthread_sig_debug): Initialized.
2297         (pthread_initialize): Call init_rtsigs () to initialize
2298         real-time signals.
2300 1999-02-03  H.J. Lu  <hjl@gnu.org>
2302         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2303         Don't restart the thread which sent REQ_DEBUG.
2304         (pthread_start_thread): Check if __pthread_sig_debug > 0
2305         before debugging.
2307         * pthread.c (__pthread_initialize_manager): Suspend ourself
2308         after sending __pthread_sig_debug to gdb instead of
2309         __pthread_sig_cancel.
2311 1999-01-24  H.J. Lu  <hjl@gnu.org>
2313         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2314         from mask if __pthread_sig_debug > 0.
2315         (pthread_handle_create): Increment __pthread_handles_num.
2317         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2318         * pthread.c (__pthread_initialize_manager): Likewise.
2320         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2321         instead of __libc_allocate_rtsig (2).
2322         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2323         instead of __pthread_sig_cancel.
2324         (pthread_handle_sigdebug): Fix comments.
2326 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2328         * manager.c (pthread_allocate_stack): Set
2329         __pthread_nonstandard_stacks if user-specified stack is used.
2331 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2333         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2334         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2336 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2338         * pthread.c: Use a third signal __pthread_sig_debug distinct
2339         from __pthread_sig_cancel to notify gdb when a thread is
2340         created
2341         * manager.c: Likewise.
2342         * internals.h: Likewise.
2343         * signals.c: The implementation of sigwait(s) assumed that
2344         all signals in s have signal handlers already attached.
2345         This is not required by the standard, so make it work
2346         also if some of the signals have no handlers.
2348 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2350         * linuxthreads.texi: Remove pointers from first @node.  Move old
2351         @node spec inside comment.
2353 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2355         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2356         _IO_lock_unlock.
2358 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2360         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2361         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2363 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2365         * manager.c: Threads now send __pthread_sig_cancel on termination.
2366         Change clone call and signal masks.
2367         * thread.c (pthread_handle_sigrestart): Remove special code for
2368         manager.
2369         (pthread_handle_sigcancel): In manager thread call
2370         __pthread_manager_sighandler.
2371         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2372         * sysdeps/i386/i686/pt-machine.h: Likewise.
2373         Patches by Xavier Leroy.
2375 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2377         * spinlock.c (__pthread_unlock): Don't crash if called for an
2378         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2380         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2381         overall runtime.
2383 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2385         * Examples/ex3.c: Wait until all threads are started before
2386         searching for the number to avoid race condition on very fast
2387         systems.
2389 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2391         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2392         declaration since it's not needed.
2394         * sysdeps/pthread/pthread.h: Move internal functions to ...
2395         * internals.h: ...here.
2397 1998-12-02  H.J. Lu  <hjl@gnu.org>
2399         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2400         SIGRTMIN is defined.
2401         (__pthread_sig_cancel): Likewise.
2403 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2405         * wrapsyscall.c: Include <sys/mman.h> for msync,
2406         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2407         Correct msync declaration.
2409 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2411         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2412         __libc_tsd_set): New macros for new interface.
2413         * no-tsd.c: New file, provide uninitialized defns of
2414         __libc_internal_tsd_get and __libc_internal_tsd_set.
2415         * Makefile (routines): Add no-tsd.
2417 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2419         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2420         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2421         __libc_internal_tsd_set): Move decls to ...
2422         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2423         declarations.
2425         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2426         __libc_internal_tsd_set): Make these pointers to functions, not
2427         functions; remove #pragma weak decls for them.
2428         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2429         Define static functions and initialized pointers to them.
2431 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2433         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2434         (CFLAGS-specific.c): Likewise.
2435         (CFLAGS-pthread.c): Likewise.
2436         (CFLAGS-ptfork.c): Likewise.
2437         (CFLAGS-cancel.c): Likewise.
2438         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2439         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2441         * mutex.c (pthread_mutex_init): Define as strong symbol.
2442         (pthread_mutex_destroy): Likewise.
2443         (pthread_mutex_trylock): Likewise.
2444         (pthread_mutex_lock): Likewise.
2445         (pthread_mutex_unlock): Likewise.
2446         (pthread_mutexattr_init): Likewise.
2447         (pthread_mutexattr_destroy): Likewise.
2448         (pthread_once): Likewise.
2449         * ptfork.c (pthread_atfork): Likewise.
2450         * specific.c (pthread_key_create): Likewise.
2451         (pthread_setspecific): Likewise.
2452         (pthread_getspecific): Likewise.
2454 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2456         * linuxthreads.texi: Fix punctuation after xref.
2458 1998-11-10  H.J. Lu  <hjl@gnu.org>
2460         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2461         if it is defined in <linux/limits.h>.
2463 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2465         * spinlock.h (__pthread_trylock): Define inline.
2466         (__pthread_lock): Add extra parameter to declaration.  Declare
2467         using internal_function.
2468         (__pthread_unlock): Declare using internal_function.
2469         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2470         of local variable self.  Avoid recomputing self.  Define using
2471         internal_function.
2472         (__pthread_trylock): Remove.
2473         (__pthread_unlock): Define using internal_function.
2474         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2475         computed self value is possible.
2476         * condvar.c: Likewise.
2477         * join.c: Likewise.
2478         * manager.c: Likewise.
2479         * mutex.c: Likewise.
2480         * pthread.c: Likewise.
2481         * rwlock.c: Likewise.
2482         * semaphore.c: Likewise.
2483         * signals.c: Likewise.
2485 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2487         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2488         __ to field names of the struct.
2489         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2490         Likewise.
2491         (pthread_attr_t): Likewise.
2492         (pthread_cond_t): Likewise.
2493         (pthread_condattr_t): Likewise.
2494         (pthread_mutex_t): Likewise.
2495         (pthread_mutexattr_t): Likewise.
2496         (pthread_rwlock_t): Likewise.
2497         (pthread_rwlockattr_t): Likewise.
2498         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2499         * cancel.c: Likewise.
2500         * condvar.c: Likewise.
2501         * manager.c: Likewise.
2502         * mutex.c: Likewise.
2503         * pthread.c: Likewise.
2504         * ptlongjmp.c: Likewise.
2505         * rwlock.c: Likewise.
2506         * spinlock.c: Likewise.
2508 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2510         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2511         also with PT_EI.
2513         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2514         definitions.
2516         * Makefile (libpthread-routines): Add pt-machine.
2517         * pt-machine.c: New file.
2518         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2519         yet defined.  Use PT_EI in extern inline definitions.
2520         * sysdeps/arm/pt-machine.h: Likewise.
2521         * sysdeps/i386/pt-machine.h: Likewise.
2522         * sysdeps/i386/i686/pt-machine.h: Likewise.
2523         * sysdeps/m68k/pt-machine.h: Likewise.
2524         * sysdeps/mips/pt-machine.h: Likewise.
2525         * sysdeps/powerpc/pt-machine.h: Likewise.
2526         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2527         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2529 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2531         * semaphore.h: Include <sys/types.h> so that _pthread_descr
2532         is declared.
2534 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
2536         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2537         argument.
2538         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2540 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2542         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2543         guard.
2545 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2547         * signals.c (sigaction): Check that sig is less than NSIG to avoid
2548         array index overflow.
2550 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
2552         * sysdeps/pthread/semaphore.h: New file.
2554 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
2556         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2557         _LIBC_TSD_KEY_DL_ERROR.
2559 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
2561         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2562         * sysdeps/i386/pt-machine.h: Likewise.
2563         Suggested by Roland McGrath.
2565 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
2567         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2568         access thread data with non-constant offsets.
2569         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2570         necessary.
2572         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
2573         THREAD_SETMEM_NC definitions.
2575         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2576         THREAD_SETMEM_NC.
2577         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2579 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
2581         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2582         not already defined.
2583         (struct _pthread_descr_struct): Add p_self and p_nr field.
2584         * manager.c (__pthread_handles): Define second element to point
2585         to manager thread.
2586         (__pthread_handles_num): Initialize to 2.
2587         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2588         (pthread_start_thread): Likewise.
2589         (pthread_handle_create): Start search for free slot at entry 2.
2590         Initialize new fields p_self and p_nr.
2591         Call __clone with CLONE_PTRACE if available.
2592         (pthread_free): Call FREE_THREAD_SELF if available.
2593         * pthread.c (__pthread_initial_thread): Initialize new fields.
2594         (__pthread_manager_thread): Likewise.
2595         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2597         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2598         elements of the thread descriptor.
2599         * condvar.c: Likewise.
2600         * errno.c: Likewise.
2601         * join.c: Likewise.
2602         * manager.c: Likewise.
2603         * pthread.c: Likewise.
2604         * ptlongjmp.c: Likewise.
2605         * semaphore.c: Likewise.
2606         * signals.c: Likewise.
2607         * specific.c: Likewise.
2608         * spinlock.c: Likewise.
2610         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2612         * sysdeps/i386/useldt.h: New file.
2613         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2615         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2616         THREAD_SETMEM using __thread_self.
2617         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2619 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
2621         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2622         turned out that we didn't need to queue after all.
2624 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
2626         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2627         and wastes space; correct types.
2629 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
2631         * signals.c (sigaction): Handle NULL argument.
2633 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
2635         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2636         of sigset_t.
2638 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2640         * Makefile (linuxthreads-version): Extract correct number from
2641         Banner.
2643 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
2645         * Banner: Bump version number to 0.8
2646         * FAQ.html: Many updates, in particular w.r.t. debugging.
2647         * manager.c: Support for non-default stacksize for
2648         LinuxThreads-allocated stacks;
2649         don't use guard pages for stacks with default size, rely on
2650         rlimit(RLIMIT_STACK) instead (it's cheaper).
2651         * attr.c: Likewise.
2652         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2653         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2654         * condvar.c: Likewise.
2655         * internals.h: Likewise.
2656         * restart.h: Likewise.
2657         * signals.c: Likewise.
2658         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2660 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2662         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2663         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
2664         * Versions: Put __pthread_mutexattr_settype under version
2665         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
2666         __pthread_mutexattr_gettype.
2668 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2670         * sysdeps/pthread/bits/libc-lock.h: Make
2671         __pthread_mutexattr_settype weak.  Don't make
2672         __pthread_mutexattr_setkind_np weak.
2674 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
2676         * manager.c (pthread_handle_create): Check whether sched_setscheduler
2677         call can succeed here.
2679         * mutex.c: Define __pthread_mutexattr_settype and make
2680         __pthread_mutexattr_setkind_np an alias.
2681         Likewise for __pthread_mutexattr_gettype.
2683 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2685         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2686         is root.
2688 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
2690         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2692 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2694         * Examples/ex6.c: Include <unistd.h> for usleep.
2696 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2698         * Examples/ex4.c (main): Use exit, not pthread_exit.
2700 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
2702         * Versions: Add __pthread_mutexattr_gettype and
2703         __pthread_mutexattr_settype.
2704         * lockfile.c: Use __pthread_mutexattr_settype instead of
2705         __pthread_mutexattr_setkind_np.
2706         * mutex.c: Define __pthread_mutexattr_gettype and
2707         __pthread_mutexattr_settype.
2708         * weak.c: Likewise.
2709         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2710         __pthread_mutexattr_settype.
2711         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2712         Use __pthread_mutexattr_settype.
2714 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
2716         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2717         * mutex.c: Define weak alias pthread_mutexattr_gettype and
2718         pthread_mutexattr_settype.
2719         * sysdeps/pthread/pthread.h: Declare these functions.
2720         Move pthread_sigmask and pthread_kill declaration in separate header.
2721         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2723 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
2725         * Makefile: Add rules to compile and run tests.
2726         * Examples/ex1.c: Little changes to fix warnings.
2727         * Examples/ex2.c: Likewise.
2728         * Examples/ex3.c: Likewise.
2729         * Examples/ex4.c: Likewise.
2730         * Examples/ex5.c: Likewise.
2731         * Examples/ex6.c: New file.
2733 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
2735         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2737 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2739         * attr.c: Include <string.h>.
2741 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
2743         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
2744         * internals.h: Include limits.h.
2745         * manager.c: Use memcpy to copy sched_param.
2746         * ptfork.c: Include errno.h.
2747         * pthread.c: Likewise.
2748         * semaphore.c: Likewise.
2749         * specific.c: Likewise.
2750         * spinlock.h: Likewise.
2751         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
2752         type definition to ...
2753         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
2755 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
2757         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2759         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2760         as macros as demanded in POSIX.1, Annex C.
2762 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
2764         * internals.h (struct pthread_request): For free use pthread_t
2765         instead of pthread_descr.
2766         * join.c (pthread_join): Pass thread_id, not th to manager.
2767         (pthread_detach): Likewise.
2768         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2769         (pthread_exited): Remove detached queue code.
2770         (pthread_handle_free): Expect thread ID parameter and use it to
2771         validate the thread decsriptor.  Don't use detached queue.
2772         Patches by Xavier Leroy.
2774 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2776         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2777         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2778         __pthread_atfork, __pthread_key_create, __pthread_once.
2779         * internals.h: Doc fix.
2780         * pthread.c (__pthread_initialize): Define again.
2782 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2784         * manager.c (pthread_exited): If thread is not detached put it on
2785         special list.
2786         (pthread_handle_free): If thread is not on list with living threads
2787         search on list with detached threads.
2789         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2790         for new definition of pthread_rwlock_t.
2792         * spinlock.c: Correct test whether to compile
2793         __pthread_compare_and_swap or not.
2795 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2797         * attr.c: Finish user stack support.  Change locking code to be safe
2798         in situations with different priorities.
2799         * cancel.c: Likewise.
2800         * condvar.c: Likewise.
2801         * internals.h: Likewise.
2802         * join.c: Likewise.
2803         * manager.c: Likewise.
2804         * mutex.c: Likewise.
2805         * pthread.c: Likewise.
2806         * ptlongjmp.c: Likewise.
2807         * queue.h: Likewise.
2808         * rwlock.c: Likewise.
2809         * semaphore.c: Likewise.
2810         * semaphore.h: Likewise.
2811         * signals.c: Likewise.
2812         * spinlock.c: Likewise.
2813         * spinlock.h: Likewise.
2814         * sysdeps/pthread/pthread.h: Likewise.
2815         Patches by Xavier Leroy.
2817         * sysdeps/i386/i686/pt-machine.h: New file.
2819 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
2821         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2822         [sg]et_stackaddr prototypes always available.
2824         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2825         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2827 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
2829         * manager.c (pthread_free): Undo patch from 980430.
2830         Reported by David Wragg <dpw@doc.ic.ac.uk>.
2832 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
2834         * manager.c: Define __pthread_manager_adjust_prio and use it to
2835         increase priority when needed.
2836         * internals.h: Add prototype for __pthread_manager_adjust_prio.
2837         * mutex.c: Optimize mutexes to wake up only one thread.
2838         * pthread.c: Move PID of manager for global variable in structure
2839         element.
2840         Patches by Xavier Leroy.
2842 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
2844         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2846 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2848         * attr.c: Correct typo.
2850 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
2852         * manager.c (pthread_free): Unmap guard before the stack.
2853         Patch by Matthias Urlichs.
2855 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
2857         * manager.c (pthread_free): Detect already free child.
2858         Patch by Xavier Leroy, reported by Matthias Urlichs.
2860 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2862         * Makefile (linuxthreads-version): Renamed back from
2863         libpthread-version.
2865 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2867         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2868         __libc_longjmp.
2870 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2872         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2873         * internals.h: Add definitions for new spinlock implementation.
2874         * ptlongjmp.c: New file.
2875         * spinlock.c: New file.
2876         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2877         new function __pthread_acquire to prevent deadlocks with thread
2878         with different priorities.
2879         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2881 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2883         * manager.c (__pthread_manager): Reduce first argument to select
2884         to include just the needed file descriptor.
2886 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2888         * manager.c: Fix last patch which caused core dumps.
2890         * pthread.c: Correctly handle missing SIGRTMIN.
2892 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2894         * libpthread.map: Add __libc_internal_tsd_get and
2895         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2896         libc internal versions of the cancelable functions.
2898 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2900         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2902 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2904         * attr.c: Implement pthread_attr_[gs]etguardsize,
2905         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2906         Change pthread_attr_init to have two interfaces.
2907         * internals.h (struct _pthread_descr_struct): Add new fields for
2908         above functions.
2909         * libpthread.map: Add names in GLIBC_2.1 section.
2910         * manager.c (pthread_handle_create): Implement guardsize and
2911         user stack.
2912         (pthread_free): Likewise.
2913         * pthread.c (pthread_create): Add new interface for changed
2914         pthread_attr_t.
2915         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2916         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2917         PTHREAD_STACK_MIN.
2919 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2921         * manager.c: Enable resetting of the thread scheduling policy
2922         to SCHED_OTHER when the parent thread has a different one.
2924 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2926         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2927         _POSIX_ASYNCHRONOUS_IO.
2929         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2930         mutexes.
2931         * mutex.c: Implement new mutex types.
2933         * internals.h: Include <signal.h>.
2935         * libpthread.map: Add __erno_location and __h_errno_location.
2937         * errno.c: Return pointer to variable actually in use.  This might
2938         not be the one in the thread structure.
2939         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2940         and p_h_errnop.
2941         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2942         of manager thread structure.
2943         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2944         thread.
2945         * pthread.c: Adapt initializer for thread structures.
2946         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2947         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2948         current thread to global variables.
2950 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2952         * rwlock.c: New file.
2953         * Makefile (libpthread-routines): Add rwlock.
2954         * sysdeps/pthread/pthread.h: Define data structures and declare
2955         functions.
2956         * libpthread.map: Add new functions.
2958 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2960         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2961         * sysdeps/arm/Implies: likewise.
2962         * README: Document it.
2964 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2966         * signals.c: Remove unneeded initializer for sigwaited, saving a
2967         warning.
2969 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2971         * semaphore.c (sem_init): Set sem_spinlock only if available.
2973 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2975         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2976         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2978         * Makefile: Update from LinuxThreads 0.7.
2979         * internals.h. Likewise.
2980         * manager.c: Likewise.
2981         * mutex.c: Likewise.
2982         * pthread.c: Likewise.
2983         * signals.c: Likewise.
2984         * specific.c: Likewise.
2985         * Examples/ex3.c: Likewise.
2987 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
2989         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2990         open.
2992 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
2994         * wrapsyscall.c: Add socket functions which are also cancelation
2995         points.
2997 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
2999         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3000         New functions for fast thread specific data within libc.
3002         * internals.h: Add new array p_libc_specific to struct
3003         _pthread_descr_struct.
3005         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3007 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
3009         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3010         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3012 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
3014         * internals.h (struct _pthread_descr_struct): Add definitions for
3015         two-level specific key handling.
3016         * manager.c (pthread_handle_create): Initialize specific memory array.
3017         * specific.c: Implement two-level key handling.
3018         * weaks.c: Don't provide dummy key handling.
3019         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3020         Add definition of __libc_key_t.
3021         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3022         as 1024.
3023         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3024         PTHREAD_DESTRUCTOR_ITERATIONS.
3026         * manager.c (pthread_handle_create): Compare mmap result with
3027         MAP_FAILED.
3029         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3030         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3032 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
3034         sysdeps/sparc -> sysdeps/sparc/sparc32
3035         sysdeps/sparc64 -> sysdeps/sparc/sparc64
3037         * internals.h: Change definition of THREAD_SELF to be an expression,
3038         not a statement that did a return.
3039         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3040         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3041         Follow Solaris and use a "system reserved" register (%g6) to hold
3042         the thread descriptor.
3043         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3045 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
3047         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
3048         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3049         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3051         * semaphore.c: Include spinlock.h only when needed.
3053         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3054         keys for entries not in use.
3056         * weaks.c: Implement key handling functions for real.
3058 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
3060         Initial sparc64-linux support:
3061         * sysdeps/sparc64/Implies: New file.
3062         * sysdeps/sparc64/pt-machine.h: Likewise.
3064 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
3066         * semaphore.c: Include spinlock.h at correct place.
3067         Patch by HJ Lu.
3069 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
3071         The Great Bit File Move:
3072         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3073         * sysdeps/powerpc/semaphorebits.h: Likewise.
3074         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3075         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3076         * sysdeps/pthread/libc-lock.h: -> bits/
3077         * sysdeps/pthread/stdio-lock.h: Likewise.
3078         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3079         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3080         * semaphore.h: Likewise.
3081         * sysdeps/pthread/pthread.h: Likewise.
3083         * lockfile.c: <foo.h> -> <bits/foo.h>.
3084         * semaphore.h: Likewise.
3086         * Makefile: (headers): foo.h -> bits/foo.h.
3087         * sysdeps/pthread/Makefile: Likewise.
3089 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3091         * semaphore.c (sem_init): Set sem_spinlock only if available.
3093         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3094         asm constraints.
3096 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
3098         Update from LinuxThreads 0.6.
3100         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3101         and __sched_get_priority_min instead of names without `__'.
3103         * manager.c: Rewrite large parts to implement opaque pthread_t.
3105         * cancel.c: Adapt for opaque pthread_t type.
3106         * condvar.c: Likewise.
3107         * errno.c: Likewise.
3108         * join.c: Likewise.
3109         * mutex.c: Likewise.
3110         * pthread.c: Likewise.
3111         * signals.c: Likewise.
3112         * specific.c: Likewise.
3113         * restart.h: Likewise.
3114         * queue.h: Likewise.
3115         * Examples/ex3.c: Likewise.
3116         * Examples/ex4.c: Likewise.
3117         * sysdeps/pthread/pthread.h: Likewise.
3119         * pthread.c: Accumulate time for all threads in thread manager.
3121         * semaphore.c: Implement fallback implementation for architectures
3122         sometimes missing compare-exchange operations.
3124         * cancel.c (pthread_cancel): Validate handle argument.
3125         * join.c (pthread_join): Likewise.
3126         (pthread_detach): Likewise.
3127         * signals.c (pthread_kill): Likewise.
3129         * spinlock.h (acquire): Use __sched_yield not sched_yield.
3131         * queue.h (enqueue): Enqueue thread according to priority.
3133         * internals.c (struct pthread_start_args): New struct for passing
3134         args to cloning function.
3135         (struct _pthread): Rename to _pthread_descr_struct and adapt for
3136         opaque pthread_t.
3138         * Examples/Makefile (clean): Pass -f option to rm.
3140         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3141         and define TEST_FOR_COMPARE_AND_SWAP.
3142         * sysdeps/i386/i486/pt-machine.h: Removed.
3144         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3145         to 1024.
3147 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
3149         * restart.h (suspend): Clear p_signal before suspending.
3150         (suspend_with_cancellation): Likewise.
3151         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3153         * weaks.c: Make __pthread_key_create return 1.
3154         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3155         __libc_getspecific, __libc_setspecific, and __libc_key_t.
3156         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3157         using libio.
3159 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
3161         * sysdeps/sparc/pt-machine (RELEASE): Fix.
3163 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
3165         * sysdeps/powerpc/Implies: Added.
3166         * sysdeps/powerpc/pt-machine.h: Added.
3167         * sysdeps/powerpc/semaphorebits.h: Added.
3169 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
3171         * pthread.c (__pthread_initial_thread): Correct
3172         initializer.
3173         (__pthread_manager_thread): Likewise.
3174         Reported by Andreas Jaeger.
3176 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
3178         Since sigset_t no longer fits in a register, we can't pass in the
3179         thread's initial mask so easily.  Take this opportunity to simplify
3180         the clone implementation by only accepting a single void* argument.
3182         * manager.c (__pthread_manager): Put thread vitals in the thread
3183         struct instead of as arguments through clone.
3184         (pthread_start_thread): Look for them there.
3185         * internals.h (struct _pthread): Add p_initial_fn,
3186         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
3187         * pthread.c (pthread_initialize_manager): Revise clone invocation.