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