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