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