Update.
[glibc.git] / linuxthreads / ChangeLog
blob1e39b001b820e4f0941ce47ea836e2a266cfeef8
1 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3         * man/pthread_cond_init.man: Correct example.
4         Reported by Tomas Berndtsson <tomas@nocrew.org>.
6         * linuxthreads.texi (Condition Variables): Likewise.
8 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
10         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
11         casx not cas, also successful casx returns the old value in rd
12         and not the new value.
14 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
16         * manager.c: If pthread_create() is given a NULL attribute
17         and the thread manager runs with a realtime policy, set the
18         scheduling policy of the newly created thread back to SCHED_OTHER.
19         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
20         initialize the schedpolicy field of new_thread->p_start_args
21         to that of the calling thread.
23 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
25         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
26         instruction does not allow memory element to use offset.
28 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
30         * manager.c (pthread_allocate_stack): Optimize initialization of new
31         thread descriptor.
33         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
34         Don't use initializer since it is all zeroes.
35         (__libc_once_define): Likewise.
37 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
39         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
40         doesn't exist anymore.
41         * sysdeps/i386/Implies: Likewise.
42         * sysdeps/m68k/Implies: Likewise.
43         * sysdeps/mips/Implies: Likewise.
44         * sysdeps/powerpc/Implies: Likewise.
45         * sysdeps/sparc/sparc32/Implies: Likewise.
46         * sysdeps/sparc/sparc64/Implies: Likewise.
48 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
50         * sysdeps/alpha/bits/semaphore.h: Removed.
51         * sysdeps/powerpc/bits/semaphore.h: Removed.
52         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
53         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
54         * Makefile (headers): Remove bits/semaphore.h.
56         * semaphore.h: Define _pthread_descr if necessary.
57         Don't include limits.h.  Define SEM_VALUE_MAX directly.
58         Define SEM_FAILED.
59         (sem_t): Protect element names with leading __.
60         Add declarations for sem_close, sem_open, and sem_unlink.
61         * semaphore.c: Adjust all functions for new element names.
62         Define sem_close, sem_open, and sem_unlink.
63         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
64         GLIBC_2.1.1.
65         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
66         necessary.
68 1999-03-16  H.J. Lu  <hjl@gnu.org>
70         * specific.c (pthread_key_delete): Check th->p_terminated to see
71         if the thread is running.
73         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
74         Added to GLIBC_2.0 for libc.so.
76 1999-02-12  H.J. Lu  <hjl@gnu.org>
78         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
79         __libc_allocate_rtsig): Added to GLIBC_2.1.
81         * internals.h (DEFAULT_SIG_RESTART): Removed.
82         (DEFAULT_SIG_CANCEL): Removed.
84         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
85         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
86         (__pthread_sig_restart, __pthread_sig_cancel,
87         __pthread_sig_debug): Initialized.
88         (pthread_initialize): Call init_rtsigs () to initialize
89         real-time signals.
91 1999-02-03  H.J. Lu  <hjl@gnu.org>
93         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
94         Don't restart the thread which sent REQ_DEBUG.
95         (pthread_start_thread): Check if __pthread_sig_debug > 0
96         before debugging.
98         * pthread.c (__pthread_initialize_manager): Suspend ourself
99         after sending __pthread_sig_debug to gdb instead of
100         __pthread_sig_cancel.
102 1999-01-24  H.J. Lu  <hjl@gnu.org>
104         * manager.c (__pthread_manager): Delete __pthread_sig_debug
105         from mask if __pthread_sig_debug > 0.
106         (pthread_handle_create): Increment __pthread_handles_num.
108         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
109         * pthread.c (__pthread_initialize_manager): Likewise.
111         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
112         instead of __libc_allocate_rtsig (2).
113         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
114         instead of __pthread_sig_cancel.
115         (pthread_handle_sigdebug): Fix comments.
117 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
119         * manager.c (pthread_allocate_stack): Set
120         __pthread_nonstandard_stacks if user-specified stack is used.
122 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
124         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
125         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
127 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
129         * pthread.c: Use a third signal __pthread_sig_debug distinct
130         from __pthread_sig_cancel to notify gdb when a thread is
131         created
132         * manager.c: Likewise.
133         * internals.h: Likewise.
134         * signals.c: The implementation of sigwait(s) assumed that
135         all signals in s have signal handlers already attached.
136         This is not required by the standard, so make it work
137         also if some of the signals have no handlers.
139 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
141         * linuxthreads.texi: Remove pointers from first @node.  Move old
142         @node spec inside comment.
144 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
146         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
147         _IO_lock_unlock.
149 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
151         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
152         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
154 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
156         * manager.c: Threads now send __pthread_sig_cancel on termination.
157         Change clone call and signal masks.
158         * thread.c (pthread_handle_sigrestart): Remove special code for
159         manager.
160         (pthread_handle_sigcancel): In manager thread call
161         __pthread_manager_sighandler.
162         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
163         * sysdeps/i386/i686/pt-machine.h: Likewise.
164         Patches by Xavier Leroy.
166 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
168         * spinlock.c (__pthread_unlock): Don't crash if called for an
169         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
171         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
172         overall runtime.
174 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
176         * Examples/ex3.c: Wait until all threads are started before
177         searching for the number to avoid race condition on very fast
178         systems.
180 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
182         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
183         declaration since it's not needed.
185         * sysdeps/pthread/pthread.h: Move internal functions to ...
186         * internals.h: ...here.
188 1998-12-02  H.J. Lu  <hjl@gnu.org>
190         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
191         SIGRTMIN is defined.
192         (__pthread_sig_cancel): Likewise.
194 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
196         * wrapsyscall.c: Include <sys/mman.h> for msync,
197         <stdlib.h> for system and <termios.h> for tcdrain prototype.
198         Correct msync declaration.
200 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
202         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
203         __libc_tsd_set): New macros for new interface.
204         * no-tsd.c: New file, provide uninitialized defns of
205         __libc_internal_tsd_get and __libc_internal_tsd_set.
206         * Makefile (routines): Add no-tsd.
208 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
210         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
211         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
212         __libc_internal_tsd_set): Move decls to ...
213         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
214         declarations.
216         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
217         __libc_internal_tsd_set): Make these pointers to functions, not
218         functions; remove #pragma weak decls for them.
219         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
220         Define static functions and initialized pointers to them.
222 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
224         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
225         (CFLAGS-specific.c): Likewise.
226         (CFLAGS-pthread.c): Likewise.
227         (CFLAGS-ptfork.c): Likewise.
228         (CFLAGS-cancel.c): Likewise.
229         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
230         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
232         * mutex.c (pthread_mutex_init): Define as strong symbol.
233         (pthread_mutex_destroy): Likewise.
234         (pthread_mutex_trylock): Likewise.
235         (pthread_mutex_lock): Likewise.
236         (pthread_mutex_unlock): Likewise.
237         (pthread_mutexattr_init): Likewise.
238         (pthread_mutexattr_destroy): Likewise.
239         (pthread_once): Likewise.
240         * ptfork.c (pthread_atfork): Likewise.
241         * specific.c (pthread_key_create): Likewise.
242         (pthread_setspecific): Likewise.
243         (pthread_getspecific): Likewise.
245 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
247         * linuxthreads.texi: Fix punctuation after xref.
249 1998-11-10  H.J. Lu  <hjl@gnu.org>
251         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
252         if it is defined in <linux/limits.h>.
254 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
256         * spinlock.h (__pthread_trylock): Define inline.
257         (__pthread_lock): Add extra parameter to declaration.  Declare
258         using internal_function.
259         (__pthread_unlock): Declare using internal_function.
260         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
261         of local variable self.  Avoid recomputing self.  Define using
262         internal_function.
263         (__pthread_trylock): Remove.
264         (__pthread_unlock): Define using internal_function.
265         * cancel.c: Adjust for __pthread_lock interface change.  Use already
266         computed self value is possible.
267         * condvar.c: Likewise.
268         * join.c: Likewise.
269         * manager.c: Likewise.
270         * mutex.c: Likewise.
271         * pthread.c: Likewise.
272         * rwlock.c: Likewise.
273         * semaphore.c: Likewise.
274         * signals.c: Likewise.
276 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
278         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
279         __ to field names of the struct.
280         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
281         Likewise.
282         (pthread_attr_t): Likewise.
283         (pthread_cond_t): Likewise.
284         (pthread_condattr_t): Likewise.
285         (pthread_mutex_t): Likewise.
286         (pthread_mutexattr_t): Likewise.
287         (pthread_rwlock_t): Likewise.
288         (pthread_rwlockattr_t): Likewise.
289         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
290         * cancel.c: Likewise.
291         * condvar.c: Likewise.
292         * manager.c: Likewise.
293         * mutex.c: Likewise.
294         * pthread.c: Likewise.
295         * ptlongjmp.c: Likewise.
296         * rwlock.c: Likewise.
297         * spinlock.c: Likewise.
299 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
301         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
302         also with PT_EI.
304         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
305         definitions.
307         * Makefile (libpthread-routines): Add pt-machine.
308         * pt-machine.c: New file.
309         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
310         yet defined.  Use PT_EI in extern inline definitions.
311         * sysdeps/arm/pt-machine.h: Likewise.
312         * sysdeps/i386/pt-machine.h: Likewise.
313         * sysdeps/i386/i686/pt-machine.h: Likewise.
314         * sysdeps/m68k/pt-machine.h: Likewise.
315         * sysdeps/mips/pt-machine.h: Likewise.
316         * sysdeps/powerpc/pt-machine.h: Likewise.
317         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
318         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
320 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
322         * semaphore.h: Include <sys/types.h> so that _pthread_descr
323         is declared.
325 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
327         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
328         argument.
329         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
331 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
333         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
334         multiple inclusion guard.
336 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
338         * signals.c (sigaction): Check that sig is less than NSIG to avoid
339         array index overflow.
341 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
343         * sysdeps/pthread/semaphore.h: New file.
345 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
347         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
348         _LIBC_TSD_KEY_DL_ERROR.
350 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
352         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
353         * sysdeps/i386/pt-machine.h: Likewise.
354         Suggested by Roland McGrath.
356 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
358         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
359         access thread data with non-constant offsets.
360         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
361         necessary.
363         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
364         THREAD_SETMEM_NC definitions.
366         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
367         THREAD_SETMEM_NC.
368         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
370 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
372         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
373         not already defined.
374         (struct _pthread_descr_struct): Add p_self and p_nr field.
375         * manager.c (__pthread_handles): Define second element to point
376         to manager thread.
377         (__pthread_handles_num): Initialize to 2.
378         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
379         (pthread_start_thread): Likewise.
380         (pthread_handle_create): Start search for free slot at entry 2.
381         Initialize new fields p_self and p_nr.
382         Call __clone with CLONE_PTRACE if available.
383         (pthread_free): Call FREE_THREAD_SELF if available.
384         * pthread.c (__pthread_initial_thread): Initialize new fields.
385         (__pthread_manager_thread): Likewise.
386         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
388         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
389         elements of the thread descriptor.
390         * condvar.c: Likewise.
391         * errno.c: Likewise.
392         * join.c: Likewise.
393         * manager.c: Likewise.
394         * pthread.c: Likewise.
395         * ptlongjmp.c: Likewise.
396         * semaphore.c: Likewise.
397         * signals.c: Likewise.
398         * specific.c: Likewise.
399         * spinlock.c: Likewise.
401         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
403         * sysdeps/i386/useldt.h: New file.
404         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
406         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
407         THREAD_SETMEM using __thread_self.
408         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
410 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
412         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
413         turned out that we didn't need to queue after all.
415 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
417         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
418         and wastes space; correct types.
420 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
422         * signals.c (sigaction): Handle NULL argument.
424 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
426         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
427         of sigset_t.
429 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
431         * Makefile (linuxthreads-version): Extract correct number from
432         Banner.
434 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
436         * Banner: Bump version number to 0.8
437         * FAQ.html: Many updates, in particular w.r.t. debugging.
438         * manager.c: Support for non-default stacksize for
439         LinuxThreads-allocated stacks;
440         don't use guard pages for stacks with default size, rely on
441         rlimit(RLIMIT_STACK) instead (it's cheaper).
442         * attr.c: Likewise.
443         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
444         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
445         * condvar.c: Likewise.
446         * internals.h: Likewise.
447         * restart.h: Likewise.
448         * signals.c: Likewise.
449         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
451 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
453         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
454         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
455         * Versions: Put __pthread_mutexattr_settype under version
456         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
457         __pthread_mutexattr_gettype.
459 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
461         * sysdeps/pthread/bits/libc-lock.h: Make
462         __pthread_mutexattr_settype weak.  Don't make
463         __pthread_mutexattr_setkind_np weak.
465 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
467         * manager.c (pthread_handle_create): Check whether sched_setscheduler
468         call can succeed here.
470         * mutex.c: Define __pthread_mutexattr_settype and make
471         __pthread_mutexattr_setkind_np an alias.
472         Likewise for __pthread_mutexattr_gettype.
474 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
476         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
477         is root.
479 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
481         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
483 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
485         * Examples/ex6.c: Include <unistd.h> for usleep.
487 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
489         * Examples/ex4.c (main): Use exit, not pthread_exit.
491 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
493         * Versions: Add __pthread_mutexattr_gettype and
494         __pthread_mutexattr_settype.
495         * lockfile.c: Use __pthread_mutexattr_settype instead of
496         __pthread_mutexattr_setkind_np.
497         * mutex.c: Define __pthread_mutexattr_gettype and
498         __pthread_mutexattr_settype.
499         * weak.c: Likewise.
500         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
501         __pthread_mutexattr_settype.
502         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
503         Use __pthread_mutexattr_settype.
505 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
507         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
508         * mutex.c: Define weak alias pthread_mutexattr_gettype and
509         pthread_mutexattr_settype.
510         * sysdeps/pthread/pthread.h: Declare these functions.
511         Move pthread_sigmask and pthread_kill declaration in separate header.
512         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
514 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
516         * Makefile: Add rules to compile and run tests.
517         * Examples/ex1.c: Little changes to fix warnings.
518         * Examples/ex2.c: Likewise.
519         * Examples/ex3.c: Likewise.
520         * Examples/ex4.c: Likewise.
521         * Examples/ex5.c: Likewise.
522         * Examples/ex6.c: New file.
524 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
526         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
528 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
530         * attr.c: Include <string.h>.
532 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
534         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
535         * internals.h: Include limits.h.
536         * manager.c: Use memcpy to copy sched_param.
537         * ptfork.c: Include errno.h.
538         * pthread.c: Likewise.
539         * semaphore.c: Likewise.
540         * specific.c: Likewise.
541         * spinlock.h: Likewise.
542         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
543         type definition to ...
544         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
546 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
548         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
550         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
551         as macros as demanded in POSIX.1, Annex C.
553 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
555         * internals.h (struct pthread_request): For free use pthread_t
556         instead of pthread_descr.
557         * join.c (pthread_join): Pass thread_id, not th to manager.
558         (pthread_detach): Likewise.
559         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
560         (pthread_exited): Remove detached queue code.
561         (pthread_handle_free): Expect thread ID parameter and use it to
562         validate the thread decsriptor.  Don't use detached queue.
563         Patches by Xavier Leroy.
565 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
567         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
568         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
569         __pthread_atfork, __pthread_key_create, __pthread_once.
570         * internals.h: Doc fix.
571         * pthread.c (__pthread_initialize): Define again.
573 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
575         * manager.c (pthread_exited): If thread is not detached put it on
576         special list.
577         (pthread_handle_free): If thread is not on list with living threads
578         search on list with detached threads.
580         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
581         for new definition of pthread_rwlock_t.
583         * spinlock.c: Correct test whether to compile
584         __pthread_compare_and_swap or not.
586 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
588         * attr.c: Finish user stack support.  Change locking code to be safe
589         in situations with different priorities.
590         * cancel.c: Likewise.
591         * condvar.c: Likewise.
592         * internals.h: Likewise.
593         * join.c: Likewise.
594         * manager.c: Likewise.
595         * mutex.c: Likewise.
596         * pthread.c: Likewise.
597         * ptlongjmp.c: Likewise.
598         * queue.h: Likewise.
599         * rwlock.c: Likewise.
600         * semaphore.c: Likewise.
601         * semaphore.h: Likewise.
602         * signals.c: Likewise.
603         * spinlock.c: Likewise.
604         * spinlock.h: Likewise.
605         * sysdeps/pthread/pthread.h: Likewise.
606         Patches by Xavier Leroy.
608         * sysdeps/i386/i686/pt-machine.h: New file.
610 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
612         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
613         [sg]et_stackaddr prototypes always available.
615         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
616         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
618 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
620         * manager.c (pthread_free): Undo patch from 980430.
621         Reported by David Wragg <dpw@doc.ic.ac.uk>.
623 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
625         * manager.c: Define __pthread_manager_adjust_prio and use it to
626         increase priority when needed.
627         * internals.h: Add prototype for __pthread_manager_adjust_prio.
628         * mutex.c: Optimize mutexes to wake up only one thread.
629         * pthread.c: Move PID of manager for global variable in structure
630         element.
631         Patches by Xavier Leroy.
633 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
635         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
637 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
639         * attr.c: Correct typo.
641 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
643         * manager.c (pthread_free): Unmap guard before the stack.
644         Patch by Matthias Urlichs.
646 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
648         * manager.c (pthread_free): Detect already free child.
649         Patch by Xavier Leroy, reported by Matthias Urlichs.
651 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
653         * Makefile (linuxthreads-version): Renamed back from
654         libpthread-version.
656 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
658         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
659         __libc_longjmp.
661 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
663         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
664         * internals.h: Add definitions for new spinlock implementation.
665         * ptlongjmp.c: New file.
666         * spinlock.c: New file.
667         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
668         new function __pthread_acquire to prevent deadlocks with thread
669         with different priorities.
670         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
672 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
674         * manager.c (__pthread_manager): Reduce first argument to select
675         to include just the needed file descriptor.
677 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
679         * manager.c: Fix last patch which caused core dumps.
681         * pthread.c: Correctly handle missing SIGRTMIN.
683 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
685         * libpthread.map: Add __libc_internal_tsd_get and
686         __libc_internal_tsd_set.  Add missing cancelable functions. Export
687         libc internal versions of the cancelable functions.
689 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
691         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
693 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
695         * attr.c: Implement pthread_attr_[gs]etguardsize,
696         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
697         Change pthread_attr_init to have two interfaces.
698         * internals.h (struct _pthread_descr_struct): Add new fields for
699         above functions.
700         * libpthread.map: Add names in GLIBC_2.1 section.
701         * manager.c (pthread_handle_create): Implement guardsize and
702         user stack.
703         (pthread_free): Likewise.
704         * pthread.c (pthread_create): Add new interface for changed
705         pthread_attr_t.
706         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
707         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
708         PTHREAD_STACK_MIN.
710 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
712         * manager.c: Enable resetting of the thread scheduling policy
713         to SCHED_OTHER when the parent thread has a different one.
715 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
717         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
718         _POSIX_ASYNCHRONOUS_IO.
720         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
721         mutexes.
722         * mutex.c: Implement new mutex types.
724         * internals.h: Include <signal.h>.
726         * libpthread.map: Add __erno_location and __h_errno_location.
728         * errno.c: Return pointer to variable actually in use.  This might
729         not be the one in the thread structure.
730         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
731         and p_h_errnop.
732         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
733         of manager thread structure.
734         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
735         thread.
736         * pthread.c: Adapt initializer for thread structures.
737         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
738         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
739         current thread to global variables.
741 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
743         * rwlock.c: New file.
744         * Makefile (libpthread-routines): Add rwlock.
745         * sysdeps/pthread/pthread.h: Define data structures and declare
746         functions.
747         * libpthread.map: Add new functions.
749 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
751         * sysdeps/arm/pt-machine.h: New file; add ARM support.
752         * sysdeps/arm/Implies: likewise.
753         * README: Document it.
755 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
757         * signals.c: Remove unneeded initializer for sigwaited, saving a
758         warning.
760 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
762         * semaphore.c (sem_init): Set sem_spinlock only if available.
764 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
766         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
767         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
769         * Makefile: Update from LinuxThreads 0.7.
770         * internals.h. Likewise.
771         * manager.c: Likewise.
772         * mutex.c: Likewise.
773         * pthread.c: Likewise.
774         * signals.c: Likewise.
775         * specific.c: Likewise.
776         * Examples/ex3.c: Likewise.
778 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
780         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
781         open.
783 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
785         * wrapsyscall.c: Add socket functions which are also cancelation
786         points.
788 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
790         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
791         New functions for fast thread specific data within libc.
793         * internals.h: Add new array p_libc_specific to struct
794         _pthread_descr_struct.
796         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
798 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
800         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
801         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
803 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
805         * internals.h (struct _pthread_descr_struct): Add definitions for
806         two-level specific key handling.
807         * manager.c (pthread_handle_create): Initialize specific memory array.
808         * specific.c: Implement two-level key handling.
809         * weaks.c: Don't provide dummy key handling.
810         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
811         Add definition of __libc_key_t.
812         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
813         as 1024.
814         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
815         PTHREAD_DESTRUCTOR_ITERATIONS.
817         * manager.c (pthread_handle_create): Compare mmap result with
818         MAP_FAILED.
820         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
821         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
823 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
825         sysdeps/sparc -> sysdeps/sparc/sparc32
826         sysdeps/sparc64 -> sysdeps/sparc/sparc64
828         * internals.h: Change definition of THREAD_SELF to be an expression,
829         not a statement that did a return.
830         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
831         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
832         Follow Solaris and use a "system reserved" register (%g6) to hold
833         the thread descriptor.
834         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
836 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
838         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
839         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
840         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
842         * semaphore.c: Include spinlock.h only when needed.
844         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
845         keys for entries not in use.
847         * weaks.c: Implement key handling functions for real.
849 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
851         Initial sparc64-linux support:
852         * linuxthreads/sysdeps/sparc64/Implies: New file.
853         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
855 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
857         * semaphore.c: Include spinlock.h at correct place.
858         Patch by HJ Lu.
860 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
862         The Great Bit File Move:
863         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
864         * sysdeps/powerpc/semaphorebits.h: Likewise.
865         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
866         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
867         * sysdeps/pthread/libc-lock.h: -> bits/
868         * sysdeps/pthread/stdio-lock.h: Likewise.
869         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
870         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
871         * semaphore.h: Likewise.
872         * sysdeps/pthread/pthread.h: Likewise.
874         * lockfile.c: <foo.h> -> <bits/foo.h>.
875         * semaphore.h: Likewise.
877         * Makefile: (headers): foo.h -> bits/foo.h.
878         * sysdeps/pthread/Makefile: Likewise.
880 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
882         * semaphore.c (sem_init): Set sem_spinlock only if available.
884         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
885         asm constraints.
887 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
889         Update from LinuxThreads 0.6.
891         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
892         and __sched_get_priority_min instead of names without `__'.
894         * manager.c: Rewrite large parts to implement opaque pthread_t.
896         * cancel.c: Adapt for opaque pthread_t type.
897         * condvar.c: Likewise.
898         * errno.c: Likewise.
899         * join.c: Likewise.
900         * mutex.c: Likewise.
901         * pthread.c: Likewise.
902         * signals.c: Likewise.
903         * specific.c: Likewise.
904         * restart.h: Likewise.
905         * queue.h: Likewise.
906         * Examples/ex3.c: Likewise.
907         * Examples/ex4.c: Likewise.
908         * sysdeps/pthread/pthread.h: Likewise.
910         * pthread.c: Accumulate time for all threads in thread manager.
912         * semaphore.c: Implement fallback implementation for architectures
913         sometimes missing compare-exchange operations.
915         * cancel.c (pthread_cancel): Validate handle argument.
916         * join.c (pthread_join): Likewise.
917         (pthread_detach): Likewise.
918         * signals.c (pthread_kill): Likewise.
920         * spinlock.h (acquire): Use __sched_yield not sched_yield.
922         * queue.h (enqueue): Enqueue thread according to priority.
924         * internals.c (struct pthread_start_args): New struct for passing
925         args to cloning function.
926         (struct _pthread): Rename to _pthread_descr_struct and adapt for
927         opaque pthread_t.
929         * Examples/Makefile (clean): Pass -f option to rm.
931         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
932         and define TEST_FOR_COMPARE_AND_SWAP.
933         * sysdeps/i386/i486/pt-machine.h: Removed.
935         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
936         to 1024.
938 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
940         * restart.h (suspend): Clear p_signal before suspending.
941         (suspend_with_cancellation): Likewise.
942         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
944         * weaks.c: Make __pthread_key_create return 1.
945         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
946         __libc_getspecific, __libc_setspecific, and __libc_key_t.
947         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
948         using libio.
950 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
952         * sysdeps/sparc/pt-machine (RELEASE): Fix.
954 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
956         * sysdeps/powerpc/Implies: Added.
957         * sysdeps/powerpc/pt-machine.h: Added.
958         * sysdeps/powerpc/semaphorebits.h: Added.
960 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
962         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
963         initializer.
964         (__pthread_manager_thread): Likewise.
965         Reported by Andreas Jaeger.
967 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
969         Since sigset_t no longer fits in a register, we can't pass in the
970         thread's initial mask so easily.  Take this opportunity to simplify
971         the clone implementation by only accepting a single void* argument.
973         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
974         in the thread struct instead of as arguments through clone.
975         (pthread_start_thread): Look for them there.
976         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
977         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
978         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
979         clone invocation.