Update.
[glibc.git] / linuxthreads / ChangeLog
blob9c45f6e7464eb24d2c221e3d6e72afc1f0649ba8
1 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
3         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
4         instruction does not allow memory element to use offset.
6 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
8         * manager.c (pthread_allocate_stack): Optimize initialization of new
9         thread descriptor.
11         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
12         Don't use initializer since it is all zeroes.
13         (__libc_once_define): Likewise.
15 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
17         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
18         doesn't exist anymore.
19         * sysdeps/i386/Implies: Likewise.
20         * sysdeps/m68k/Implies: Likewise.
21         * sysdeps/mips/Implies: Likewise.
22         * sysdeps/powerpc/Implies: Likewise.
23         * sysdeps/sparc/sparc32/Implies: Likewise.
24         * sysdeps/sparc/sparc64/Implies: Likewise.
26 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
28         * sysdeps/alpha/bits/semaphore.h: Removed.
29         * sysdeps/powerpc/bits/semaphore.h: Removed.
30         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
31         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
32         * Makefile (headers): Remove bits/semaphore.h.
34         * semaphore.h: Define _pthread_descr if necessary.
35         Don't include limits.h.  Define SEM_VALUE_MAX directly.
36         Define SEM_FAILED.
37         (sem_t): Protect element names with leading __.
38         Add declarations for sem_close, sem_open, and sem_unlink.
39         * semaphore.c: Adjust all functions for new element names.
40         Define sem_close, sem_open, and sem_unlink.
41         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
42         GLIBC_2.1.1.
43         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
44         necessary.
46 1999-03-16  H.J. Lu  <hjl@gnu.org>
48         * specific.c (pthread_key_delete): Check th->p_terminated to see
49         if the thread is running.
51         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
52         Added to GLIBC_2.0 for libc.so.
54 1999-02-12  H.J. Lu  <hjl@gnu.org>
56         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
57         __libc_allocate_rtsig): Added to GLIBC_2.1.
59         * internals.h (DEFAULT_SIG_RESTART): Removed.
60         (DEFAULT_SIG_CANCEL): Removed.
62         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
63         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
64         (__pthread_sig_restart, __pthread_sig_cancel,
65         __pthread_sig_debug): Initialized.
66         (pthread_initialize): Call init_rtsigs () to initialize
67         real-time signals.
69 1999-02-03  H.J. Lu  <hjl@gnu.org>
71         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
72         Don't restart the thread which sent REQ_DEBUG.
73         (pthread_start_thread): Check if __pthread_sig_debug > 0
74         before debugging.
76         * pthread.c (__pthread_initialize_manager): Suspend ourself
77         after sending __pthread_sig_debug to gdb instead of
78         __pthread_sig_cancel.
80 1999-01-24  H.J. Lu  <hjl@gnu.org>
82         * manager.c (__pthread_manager): Delete __pthread_sig_debug
83         from mask if __pthread_sig_debug > 0.
84         (pthread_handle_create): Increment __pthread_handles_num.
86         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
87         * pthread.c (__pthread_initialize_manager): Likewise.
89         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
90         instead of __libc_allocate_rtsig (2).
91         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
92         instead of __pthread_sig_cancel.
93         (pthread_handle_sigdebug): Fix comments.
95 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
97         * manager.c (pthread_allocate_stack): Set
98         __pthread_nonstandard_stacks if user-specified stack is used.
100 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
102         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
103         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
105 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
107         * pthread.c: Use a third signal __pthread_sig_debug distinct
108         from __pthread_sig_cancel to notify gdb when a thread is
109         created
110         * manager.c: Likewise.
111         * internals.h: Likewise.
112         * signals.c: The implementation of sigwait(s) assumed that
113         all signals in s have signal handlers already attached.
114         This is not required by the standard, so make it work
115         also if some of the signals have no handlers.
117 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
119         * linuxthreads.texi: Remove pointers from first @node.  Move old
120         @node spec inside comment.
122 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
124         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
125         _IO_lock_unlock.
127 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
129         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
130         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
132 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
134         * manager.c: Threads now send __pthread_sig_cancel on termination.
135         Change clone call and signal masks.
136         * thread.c (pthread_handle_sigrestart): Remove special code for
137         manager.
138         (pthread_handle_sigcancel): In manager thread call
139         __pthread_manager_sighandler.
140         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
141         * sysdeps/i386/i686/pt-machine.h: Likewise.
142         Patches by Xavier Leroy.
144 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
146         * spinlock.c (__pthread_unlock): Don't crash if called for an
147         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
149         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
150         overall runtime.
152 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
154         * Examples/ex3.c: Wait until all threads are started before
155         searching for the number to avoid race condition on very fast
156         systems.
158 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
160         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
161         declaration since it's not needed.
163         * sysdeps/pthread/pthread.h: Move internal functions to ...
164         * internals.h: ...here.
166 1998-12-02  H.J. Lu  <hjl@gnu.org>
168         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
169         SIGRTMIN is defined.
170         (__pthread_sig_cancel): Likewise.
172 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
174         * wrapsyscall.c: Include <sys/mman.h> for msync,
175         <stdlib.h> for system and <termios.h> for tcdrain prototype.
176         Correct msync declaration.
178 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
180         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
181         __libc_tsd_set): New macros for new interface.
182         * no-tsd.c: New file, provide uninitialized defns of
183         __libc_internal_tsd_get and __libc_internal_tsd_set.
184         * Makefile (routines): Add no-tsd.
186 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
188         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
189         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
190         __libc_internal_tsd_set): Move decls to ...
191         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
192         declarations.
194         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
195         __libc_internal_tsd_set): Make these pointers to functions, not
196         functions; remove #pragma weak decls for them.
197         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
198         Define static functions and initialized pointers to them.
200 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
202         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
203         (CFLAGS-specific.c): Likewise.
204         (CFLAGS-pthread.c): Likewise.
205         (CFLAGS-ptfork.c): Likewise.
206         (CFLAGS-cancel.c): Likewise.
207         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
208         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
210         * mutex.c (pthread_mutex_init): Define as strong symbol.
211         (pthread_mutex_destroy): Likewise.
212         (pthread_mutex_trylock): Likewise.
213         (pthread_mutex_lock): Likewise.
214         (pthread_mutex_unlock): Likewise.
215         (pthread_mutexattr_init): Likewise.
216         (pthread_mutexattr_destroy): Likewise.
217         (pthread_once): Likewise.
218         * ptfork.c (pthread_atfork): Likewise.
219         * specific.c (pthread_key_create): Likewise.
220         (pthread_setspecific): Likewise.
221         (pthread_getspecific): Likewise.
223 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
225         * linuxthreads.texi: Fix punctuation after xref.
227 1998-11-10  H.J. Lu  <hjl@gnu.org>
229         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
230         if it is defined in <linux/limits.h>.
232 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
234         * spinlock.h (__pthread_trylock): Define inline.
235         (__pthread_lock): Add extra parameter to declaration.  Declare
236         using internal_function.
237         (__pthread_unlock): Declare using internal_function.
238         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
239         of local variable self.  Avoid recomputing self.  Define using
240         internal_function.
241         (__pthread_trylock): Remove.
242         (__pthread_unlock): Define using internal_function.
243         * cancel.c: Adjust for __pthread_lock interface change.  Use already
244         computed self value is possible.
245         * condvar.c: Likewise.
246         * join.c: Likewise.
247         * manager.c: Likewise.
248         * mutex.c: Likewise.
249         * pthread.c: Likewise.
250         * rwlock.c: Likewise.
251         * semaphore.c: Likewise.
252         * signals.c: Likewise.
254 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
256         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
257         __ to field names of the struct.
258         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
259         Likewise.
260         (pthread_attr_t): Likewise.
261         (pthread_cond_t): Likewise.
262         (pthread_condattr_t): Likewise.
263         (pthread_mutex_t): Likewise.
264         (pthread_mutexattr_t): Likewise.
265         (pthread_rwlock_t): Likewise.
266         (pthread_rwlockattr_t): Likewise.
267         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
268         * cancel.c: Likewise.
269         * condvar.c: Likewise.
270         * manager.c: Likewise.
271         * mutex.c: Likewise.
272         * pthread.c: Likewise.
273         * ptlongjmp.c: Likewise.
274         * rwlock.c: Likewise.
275         * spinlock.c: Likewise.
277 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
279         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
280         also with PT_EI.
282         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
283         definitions.
285         * Makefile (libpthread-routines): Add pt-machine.
286         * pt-machine.c: New file.
287         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
288         yet defined.  Use PT_EI in extern inline definitions.
289         * sysdeps/arm/pt-machine.h: Likewise.
290         * sysdeps/i386/pt-machine.h: Likewise.
291         * sysdeps/i386/i686/pt-machine.h: Likewise.
292         * sysdeps/m68k/pt-machine.h: Likewise.
293         * sysdeps/mips/pt-machine.h: Likewise.
294         * sysdeps/powerpc/pt-machine.h: Likewise.
295         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
296         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
298 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
300         * semaphore.h: Include <sys/types.h> so that _pthread_descr
301         is declared.
303 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
305         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
306         argument.
307         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
309 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
311         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
312         multiple inclusion guard.
314 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
316         * signals.c (sigaction): Check that sig is less than NSIG to avoid
317         array index overflow.
319 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
321         * sysdeps/pthread/semaphore.h: New file.
323 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
325         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
326         _LIBC_TSD_KEY_DL_ERROR.
328 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
330         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
331         * sysdeps/i386/pt-machine.h: Likewise.
332         Suggested by Roland McGrath.
334 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
336         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
337         access thread data with non-constant offsets.
338         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
339         necessary.
341         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
342         THREAD_SETMEM_NC definitions.
344         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
345         THREAD_SETMEM_NC.
346         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
348 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
350         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
351         not already defined.
352         (struct _pthread_descr_struct): Add p_self and p_nr field.
353         * manager.c (__pthread_handles): Define second element to point
354         to manager thread.
355         (__pthread_handles_num): Initialize to 2.
356         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
357         (pthread_start_thread): Likewise.
358         (pthread_handle_create): Start search for free slot at entry 2.
359         Initialize new fields p_self and p_nr.
360         Call __clone with CLONE_PTRACE if available.
361         (pthread_free): Call FREE_THREAD_SELF if available.
362         * pthread.c (__pthread_initial_thread): Initialize new fields.
363         (__pthread_manager_thread): Likewise.
364         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
366         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
367         elements of the thread descriptor.
368         * condvar.c: Likewise.
369         * errno.c: Likewise.
370         * join.c: Likewise.
371         * manager.c: Likewise.
372         * pthread.c: Likewise.
373         * ptlongjmp.c: Likewise.
374         * semaphore.c: Likewise.
375         * signals.c: Likewise.
376         * specific.c: Likewise.
377         * spinlock.c: Likewise.
379         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
381         * sysdeps/i386/useldt.h: New file.
382         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
384         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
385         THREAD_SETMEM using __thread_self.
386         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
388 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
390         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
391         turned out that we didn't need to queue after all.
393 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
395         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
396         and wastes space; correct types.
398 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
400         * signals.c (sigaction): Handle NULL argument.
402 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
404         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
405         of sigset_t.
407 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
409         * Makefile (linuxthreads-version): Extract correct number from
410         Banner.
412 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
414         * Banner: Bump version number to 0.8
415         * FAQ.html: Many updates, in particular w.r.t. debugging.
416         * manager.c: Support for non-default stacksize for
417         LinuxThreads-allocated stacks;
418         don't use guard pages for stacks with default size, rely on
419         rlimit(RLIMIT_STACK) instead (it's cheaper).
420         * attr.c: Likewise.
421         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
422         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
423         * condvar.c: Likewise.
424         * internals.h: Likewise.
425         * restart.h: Likewise.
426         * signals.c: Likewise.
427         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
429 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
431         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
432         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
433         * Versions: Put __pthread_mutexattr_settype under version
434         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
435         __pthread_mutexattr_gettype.
437 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
439         * sysdeps/pthread/bits/libc-lock.h: Make
440         __pthread_mutexattr_settype weak.  Don't make
441         __pthread_mutexattr_setkind_np weak.
443 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
445         * manager.c (pthread_handle_create): Check whether sched_setscheduler
446         call can succeed here.
448         * mutex.c: Define __pthread_mutexattr_settype and make
449         __pthread_mutexattr_setkind_np an alias.
450         Likewise for __pthread_mutexattr_gettype.
452 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
454         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
455         is root.
457 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
459         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
461 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
463         * Examples/ex6.c: Include <unistd.h> for usleep.
465 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
467         * Examples/ex4.c (main): Use exit, not pthread_exit.
469 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
471         * Versions: Add __pthread_mutexattr_gettype and
472         __pthread_mutexattr_settype.
473         * lockfile.c: Use __pthread_mutexattr_settype instead of
474         __pthread_mutexattr_setkind_np.
475         * mutex.c: Define __pthread_mutexattr_gettype and
476         __pthread_mutexattr_settype.
477         * weak.c: Likewise.
478         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
479         __pthread_mutexattr_settype.
480         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
481         Use __pthread_mutexattr_settype.
483 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
485         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
486         * mutex.c: Define weak alias pthread_mutexattr_gettype and
487         pthread_mutexattr_settype.
488         * sysdeps/pthread/pthread.h: Declare these functions.
489         Move pthread_sigmask and pthread_kill declaration in separate header.
490         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
492 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
494         * Makefile: Add rules to compile and run tests.
495         * Examples/ex1.c: Little changes to fix warnings.
496         * Examples/ex2.c: Likewise.
497         * Examples/ex3.c: Likewise.
498         * Examples/ex4.c: Likewise.
499         * Examples/ex5.c: Likewise.
500         * Examples/ex6.c: New file.
502 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
504         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
506 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
508         * attr.c: Include <string.h>.
510 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
512         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
513         * internals.h: Include limits.h.
514         * manager.c: Use memcpy to copy sched_param.
515         * ptfork.c: Include errno.h.
516         * pthread.c: Likewise.
517         * semaphore.c: Likewise.
518         * specific.c: Likewise.
519         * spinlock.h: Likewise.
520         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
521         type definition to ...
522         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
524 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
526         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
528         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
529         as macros as demanded in POSIX.1, Annex C.
531 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
533         * internals.h (struct pthread_request): For free use pthread_t
534         instead of pthread_descr.
535         * join.c (pthread_join): Pass thread_id, not th to manager.
536         (pthread_detach): Likewise.
537         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
538         (pthread_exited): Remove detached queue code.
539         (pthread_handle_free): Expect thread ID parameter and use it to
540         validate the thread decsriptor.  Don't use detached queue.
541         Patches by Xavier Leroy.
543 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
545         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
546         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
547         __pthread_atfork, __pthread_key_create, __pthread_once.
548         * internals.h: Doc fix.
549         * pthread.c (__pthread_initialize): Define again.
551 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
553         * manager.c (pthread_exited): If thread is not detached put it on
554         special list.
555         (pthread_handle_free): If thread is not on list with living threads
556         search on list with detached threads.
558         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
559         for new definition of pthread_rwlock_t.
561         * spinlock.c: Correct test whether to compile
562         __pthread_compare_and_swap or not.
564 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
566         * attr.c: Finish user stack support.  Change locking code to be safe
567         in situations with different priorities.
568         * cancel.c: Likewise.
569         * condvar.c: Likewise.
570         * internals.h: Likewise.
571         * join.c: Likewise.
572         * manager.c: Likewise.
573         * mutex.c: Likewise.
574         * pthread.c: Likewise.
575         * ptlongjmp.c: Likewise.
576         * queue.h: Likewise.
577         * rwlock.c: Likewise.
578         * semaphore.c: Likewise.
579         * semaphore.h: Likewise.
580         * signals.c: Likewise.
581         * spinlock.c: Likewise.
582         * spinlock.h: Likewise.
583         * sysdeps/pthread/pthread.h: Likewise.
584         Patches by Xavier Leroy.
586         * sysdeps/i386/i686/pt-machine.h: New file.
588 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
590         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
591         [sg]et_stackaddr prototypes always available.
593         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
594         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
596 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
598         * manager.c (pthread_free): Undo patch from 980430.
599         Reported by David Wragg <dpw@doc.ic.ac.uk>.
601 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
603         * manager.c: Define __pthread_manager_adjust_prio and use it to
604         increase priority when needed.
605         * internals.h: Add prototype for __pthread_manager_adjust_prio.
606         * mutex.c: Optimize mutexes to wake up only one thread.
607         * pthread.c: Move PID of manager for global variable in structure
608         element.
609         Patches by Xavier Leroy.
611 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
613         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
615 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
617         * attr.c: Correct typo.
619 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
621         * manager.c (pthread_free): Unmap guard before the stack.
622         Patch by Matthias Urlichs.
624 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
626         * manager.c (pthread_free): Detect already free child.
627         Patch by Xavier Leroy, reported by Matthias Urlichs.
629 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
631         * Makefile (linuxthreads-version): Renamed back from
632         libpthread-version.
634 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
636         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
637         __libc_longjmp.
639 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
641         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
642         * internals.h: Add definitions for new spinlock implementation.
643         * ptlongjmp.c: New file.
644         * spinlock.c: New file.
645         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
646         new function __pthread_acquire to prevent deadlocks with thread
647         with different priorities.
648         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
650 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
652         * manager.c (__pthread_manager): Reduce first argument to select
653         to include just the needed file descriptor.
655 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
657         * manager.c: Fix last patch which caused core dumps.
659         * pthread.c: Correctly handle missing SIGRTMIN.
661 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
663         * libpthread.map: Add __libc_internal_tsd_get and
664         __libc_internal_tsd_set.  Add missing cancelable functions. Export
665         libc internal versions of the cancelable functions.
667 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
669         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
671 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
673         * attr.c: Implement pthread_attr_[gs]etguardsize,
674         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
675         Change pthread_attr_init to have two interfaces.
676         * internals.h (struct _pthread_descr_struct): Add new fields for
677         above functions.
678         * libpthread.map: Add names in GLIBC_2.1 section.
679         * manager.c (pthread_handle_create): Implement guardsize and
680         user stack.
681         (pthread_free): Likewise.
682         * pthread.c (pthread_create): Add new interface for changed
683         pthread_attr_t.
684         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
685         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
686         PTHREAD_STACK_MIN.
688 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
690         * manager.c: Enable resetting of the thread scheduling policy
691         to SCHED_OTHER when the parent thread has a different one.
693 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
695         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
696         _POSIX_ASYNCHRONOUS_IO.
698         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
699         mutexes.
700         * mutex.c: Implement new mutex types.
702         * internals.h: Include <signal.h>.
704         * libpthread.map: Add __erno_location and __h_errno_location.
706         * errno.c: Return pointer to variable actually in use.  This might
707         not be the one in the thread structure.
708         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
709         and p_h_errnop.
710         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
711         of manager thread structure.
712         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
713         thread.
714         * pthread.c: Adapt initializer for thread structures.
715         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
716         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
717         current thread to global variables.
719 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
721         * rwlock.c: New file.
722         * Makefile (libpthread-routines): Add rwlock.
723         * sysdeps/pthread/pthread.h: Define data structures and declare
724         functions.
725         * libpthread.map: Add new functions.
727 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
729         * sysdeps/arm/pt-machine.h: New file; add ARM support.
730         * sysdeps/arm/Implies: likewise.
731         * README: Document it.
733 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
735         * signals.c: Remove unneeded initializer for sigwaited, saving a
736         warning.
738 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
740         * semaphore.c (sem_init): Set sem_spinlock only if available.
742 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
744         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
745         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
747         * Makefile: Update from LinuxThreads 0.7.
748         * internals.h. Likewise.
749         * manager.c: Likewise.
750         * mutex.c: Likewise.
751         * pthread.c: Likewise.
752         * signals.c: Likewise.
753         * specific.c: Likewise.
754         * Examples/ex3.c: Likewise.
756 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
758         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
759         open.
761 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
763         * wrapsyscall.c: Add socket functions which are also cancelation
764         points.
766 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
768         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
769         New functions for fast thread specific data within libc.
771         * internals.h: Add new array p_libc_specific to struct
772         _pthread_descr_struct.
774         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
776 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
778         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
779         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
781 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
783         * internals.h (struct _pthread_descr_struct): Add definitions for
784         two-level specific key handling.
785         * manager.c (pthread_handle_create): Initialize specific memory array.
786         * specific.c: Implement two-level key handling.
787         * weaks.c: Don't provide dummy key handling.
788         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
789         Add definition of __libc_key_t.
790         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
791         as 1024.
792         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
793         PTHREAD_DESTRUCTOR_ITERATIONS.
795         * manager.c (pthread_handle_create): Compare mmap result with
796         MAP_FAILED.
798         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
799         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
801 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
803         sysdeps/sparc -> sysdeps/sparc/sparc32
804         sysdeps/sparc64 -> sysdeps/sparc/sparc64
806         * internals.h: Change definition of THREAD_SELF to be an expression,
807         not a statement that did a return.
808         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
809         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
810         Follow Solaris and use a "system reserved" register (%g6) to hold
811         the thread descriptor.
812         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
814 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
816         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
817         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
818         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
820         * semaphore.c: Include spinlock.h only when needed.
822         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
823         keys for entries not in use.
825         * weaks.c: Implement key handling functions for real.
827 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
829         Initial sparc64-linux support:
830         * linuxthreads/sysdeps/sparc64/Implies: New file.
831         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
833 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
835         * semaphore.c: Include spinlock.h at correct place.
836         Patch by HJ Lu.
838 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
840         The Great Bit File Move:
841         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
842         * sysdeps/powerpc/semaphorebits.h: Likewise.
843         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
844         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
845         * sysdeps/pthread/libc-lock.h: -> bits/
846         * sysdeps/pthread/stdio-lock.h: Likewise.
847         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
848         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
849         * semaphore.h: Likewise.
850         * sysdeps/pthread/pthread.h: Likewise.
852         * lockfile.c: <foo.h> -> <bits/foo.h>.
853         * semaphore.h: Likewise.
855         * Makefile: (headers): foo.h -> bits/foo.h.
856         * sysdeps/pthread/Makefile: Likewise.
858 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
860         * semaphore.c (sem_init): Set sem_spinlock only if available.
862         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
863         asm constraints.
865 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
867         Update from LinuxThreads 0.6.
869         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
870         and __sched_get_priority_min instead of names without `__'.
872         * manager.c: Rewrite large parts to implement opaque pthread_t.
874         * cancel.c: Adapt for opaque pthread_t type.
875         * condvar.c: Likewise.
876         * errno.c: Likewise.
877         * join.c: Likewise.
878         * mutex.c: Likewise.
879         * pthread.c: Likewise.
880         * signals.c: Likewise.
881         * specific.c: Likewise.
882         * restart.h: Likewise.
883         * queue.h: Likewise.
884         * Examples/ex3.c: Likewise.
885         * Examples/ex4.c: Likewise.
886         * sysdeps/pthread/pthread.h: Likewise.
888         * pthread.c: Accumulate time for all threads in thread manager.
890         * semaphore.c: Implement fallback implementation for architectures
891         sometimes missing compare-exchange operations.
893         * cancel.c (pthread_cancel): Validate handle argument.
894         * join.c (pthread_join): Likewise.
895         (pthread_detach): Likewise.
896         * signals.c (pthread_kill): Likewise.
898         * spinlock.h (acquire): Use __sched_yield not sched_yield.
900         * queue.h (enqueue): Enqueue thread according to priority.
902         * internals.c (struct pthread_start_args): New struct for passing
903         args to cloning function.
904         (struct _pthread): Rename to _pthread_descr_struct and adapt for
905         opaque pthread_t.
907         * Examples/Makefile (clean): Pass -f option to rm.
909         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
910         and define TEST_FOR_COMPARE_AND_SWAP.
911         * sysdeps/i386/i486/pt-machine.h: Removed.
913         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
914         to 1024.
916 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
918         * restart.h (suspend): Clear p_signal before suspending.
919         (suspend_with_cancellation): Likewise.
920         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
922         * weaks.c: Make __pthread_key_create return 1.
923         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
924         __libc_getspecific, __libc_setspecific, and __libc_key_t.
925         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
926         using libio.
928 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
930         * sysdeps/sparc/pt-machine (RELEASE): Fix.
932 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
934         * sysdeps/powerpc/Implies: Added.
935         * sysdeps/powerpc/pt-machine.h: Added.
936         * sysdeps/powerpc/semaphorebits.h: Added.
938 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
940         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
941         initializer.
942         (__pthread_manager_thread): Likewise.
943         Reported by Andreas Jaeger.
945 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
947         Since sigset_t no longer fits in a register, we can't pass in the
948         thread's initial mask so easily.  Take this opportunity to simplify
949         the clone implementation by only accepting a single void* argument.
951         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
952         in the thread struct instead of as arguments through clone.
953         (pthread_start_thread): Look for them there.
954         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
955         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
956         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
957         clone invocation.