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