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