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