Update.
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
2
3         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4         p_h_errnop correctly and not to NULL.
5
6 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
7
8         * Banner: Bump version number to 0.9.
9
10 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
11
12         * Makefile (tests): Add tststack.  Add rule to build the program.
13         * tststack.c: New file.
14
15         * internals.h: Declare __pthread_max_stacksize.
16         * pthread.c (__pthread_max_stacksize): New variable.
17         (__pthread_initialize_manager): Determine __pthread_initialize_manager
18         value.
19         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
20         (pthread_allocate_stack): Allow kernel to choose stack address if
21         FLOATING_STACKS.  This also handles variable-sized stacks.
22         Always allocate stack and guardpage together.  Use mprotect to
23         change guardpage access.
24         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
25         ARCH_STACK_MAX_SIZE.
26
27         * attr.c (__pthread_attr_setstacksize): Also test value against
28         upper limit.
29
30         * manager.c (__pthread_nonstandard_stacks): Define only if
31         THREAD_SELF is not defined.
32         (pthread_allocate_stack): Always initialize gardaddr to a correct
33         value.
34         (pthread_handle_create): Unmap thread with one call.
35         (pthread_free): Remove test for initial thread before removing stack.
36         Unmap stack with one call.
37
38         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
39         1 to avoid removing the stack.
40
41 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
42
43         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
44         load of spin lock to prime the cache before the atomic compare and
45         exchange operation (cmpxchg4). This avoids the spinning on the
46         cmpxchg4 instruction and reduces movement of the cache line back
47         and forth between the processors (explanation by Asis K. Mallick
48         from Intel). This basically makes the implementation operate the
49         same as the Linux kernel implementation.
50
51         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
52         * sysdeps/ia64/pspinlock.c: New file.
53
54 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
55
56         * pthread.c: Move definition of __pthread_set_own_extricate_if...
57         * spinlock.h: ...here.  Remove locking.
58         * internals.h: Remove __pthread_set_own_extricate_if prototype.
59
60         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
61         (rwlock_rd_extricate_func): Don't determine self, let
62         __pthread_lock do it.
63         (rwlock_wr_extricate_func): Likewise.
64         (rwlock_have_already): Optimize *pself handling a bit.
65
66         * mutex.c: Use __builtin_expect.
67         * pthread.c: Likewise.
68
69 2000-08-02  Andreas Jaeger  <aj@suse.de>
70
71         * sysdeps/s390/pspinlock.c: New file.
72         * sysdeps/s390/pt-machine.h: New file.
73         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
74
75 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
76
77         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
78         R3K.
79         * sysdeps/mips/pt-machine.h (testandset): Likewise.
80
81 2000-07-26  Andreas Jaeger  <aj@suse.de>
82
83         * pthread.c: Initialize p_sem_avail.
84
85 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
86
87         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
88         * semaphore.c: Handle spurious wakeups.
89
90         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
91         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
92
93         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
94         (__pthread_wait_for_restart): Likewise.
95
96         * condvar.c (pthread_cond_wait): Also check whether thread is
97         cancelable before aborting loop.
98         (pthread_cond_timedwait): Likewise.
99
100         * signals.c (pthread_sighandler): Remove special code to restrore
101         %gs on x86.
102         (pthread_sighandler_t): Likewise.
103
104 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
105
106         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
107         * pthread.c: Include <resolv.h>.
108         (_res): Undefine.  Add extern declaration.
109
110 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
111
112         * pthread.c (__pthread_initial_thread): Update initializer.
113         (__pthread_manager_thread): Likewise.
114         (pthread_initialize): Move setrlimit call to...
115         (__pthread_initialize_manager): ...here.
116         (__pthread_reset_main_thread): Reset also soft limit on stack size.
117
118         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
119         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
120
121 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
122
123         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
124         __compare_and_swap to define testandset.
125         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
126         Define IMPLEMENT_TAS_WITH_CAS.
127
128 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
129
130         * Makefile: Pass -z nodelete to linker for libpthread.so
131         generation if it understand this option.
132
133 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
134
135         * manager.c (pthread_handle_create): Remove initialization of
136         new_thread->p_res._sock.
137
138 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
139
140         Bugfixes to the variant of the code for machines with no compare
141         and swap.
142
143         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
144         node was not being properly enqueued, due to failing to update
145         the lock->__status field.
146
147         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
148         being set inappropriately, causing the suspend function to be called
149         with a null self pointer and crash.
150
151 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
152
153         * spinlock.h (__pthread_alt_trylock): Fix code used if no
154         compare&swap is available.
155
156         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
157         compare_and_swap.
158
159         * pthread.c (pthread_initialize): Don't use sysconf to determine
160         whether the machine has more than one processor.
161
162         * spinlock.c (__pthread_alt_timedlock): Add back one of the
163         removed thread_self calls.
164
165 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
166
167         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
168         __compare_and_swap to compare_and_swap in code which assumes
169         compare swap is available.
170
171 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
172
173         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
174         bug whereby thr field of waitnode structure would not be correctly
175         set unless a null self pointer is passed to the functions.
176         Eliminated redundant calls to thread_self().
177
178 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
179
180         * pthread.c (__pthread_initialize_manager): Lock
181         __pthread_manager_thread.p_lock before calling clone.
182
183 2000-05-05  H.J. Lu  <hjl@gnu.org>
184
185         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
186         have acquire semantics.
187         (__compare_and_swap_with_release_semantics): New inline
188         function.
189         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
190
191 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
192
193         * manager.c: Fix the problem with signals at startup.
194         Change the way that thread stacks are allocated on IA64.
195         Clean up some of the guard page allocation stuff.
196
197 1999-12-19  H.J. Lu  <hjl@gnu.org>
198
199         * internals.h (page_roundup): New.
200         * attr.c (__pthread_attr_setguardsize); Use page_roundup
201         instead of roundup.
202         * manager.c (pthread_allocate_stack): Make sure guardaddr is
203         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
204         is define.
205
206 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
207
208         * manager.c (pthread_allocate_stack): Unmap the stack top
209         if failed to map the stack bottom.
210         Fix the guard page.
211         (pthread_free): Fix the guard page.
212
213         * pthread.c (pthread_initialize): Set rlimit correctly for
214         NEED_SEPARATE_REGISTER_STACK.
215
216 1999-12-16  H.J. Lu  <hjl@gnu.org>
217
218         * pthread.c (__pthread_initialize_manager): Pass
219         __pthread_manager_thread_bos instead of
220         __pthread_manager_thread_tos to __clone2.
221
222 1999-12-16  H.J. Lu  <hjl@gnu.org>
223
224         * manager.c (pthread_allocate_stack): Correct the calculation
225         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
226         stack bottom.
227
228 1999-12-13  H.J. Lu  <hjl@gnu.org>
229
230         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
231         bit after setting ar.ccv.
232
233 1999-12-12  H.J. Lu  <hjl@gnu.org>
234
235         * manager.c (pthread_allocate_stack): Make the starting
236         address of the stack bottom page aligned. FIXME: it may
237         need changes in other places.
238         (pthread_handle_create): Likewise.
239
240 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
241
242         * manager.c (pthread_allocate_stack): Handle
243         NEED_SEPARATE_REGISTER_STACK.
244         (pthread_handle_create): Likewise.
245         * pthread.c (__pthread_initialize_manager): Likewise.
246
247         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
248
249 1999-12-02  H.J. Lu  <hjl@gnu.org>
250
251         * sysdeps/ia64/pt-machine.h: New.
252
253 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
254
255         * wrapsyscall.c: Mark non-__ protected names as weak.
256         PR libc/1466.
257
258 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
259
260         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
261
262 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
263
264         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
265         Add tests also to new alternative spinlock implementation.
266         * spinlock.h: Likewise.
267         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
268
269 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
270
271         * Version: Export __sigaction.
272         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
273         of __sigaction.
274         * pthread.c: Use __libc_sigaction instead of __sigaction.
275
276         * condvar.c: Implement pthread_condattr_getpshared and
277         pthread_condattr_setpshared.
278         * mutex.c: Implement pthread_mutexattr_getpshared and
279          pthread_mutexattr_setpshared.
280         * Versions: Export new functions.
281         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
282
283         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
284         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
285         is not selected.
286
287 2000-07-04  Greg McGary  <greg@mcgary.org>
288
289         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
290         pragmas.  Include bp-sym.h only if _LIBC.
291
292 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
293
294         * spinlock.c (__pthread_unlock): Properly place write barrier.
295         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
296
297 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
298
299         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
300         faster on SMP systems.  No more emulation of compare&swap for adaptive
301         spinlocks.
302         * spinlock.h: Likewise.
303         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
304         Replace fast with adaptive mutex.
305         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
306         * condvar.c: Likewise.
307         * pthread.c: Define and initialize __pthread_smp_kernel variable.
308         * internals.h: Declare __pthread_smp_kernel.
309         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
310         _pthread_fastlock structure.
311         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
312
313         * pthread.c: Remove initialization to zero from global variables.
314
315 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
316
317         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
318
319 2000-06-28  Greg McGary  <greg@mcgary.org>
320
321         * weaks.c: Wrap BP_SYM () around weak extern declarations of
322         pthread functions that have pointers in their return+arg signatures.
323
324 2000-06-27  Greg McGary  <greg@mcgary.org>
325
326         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
327         extern declarations of pthread functions that have pointers in
328         their return+arg signatures.
329
330 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
331
332         * Makefile (tests): Add ex11.  Add rules to build it.
333         * Examples/ex11.c: New file.
334         * rwlock.c: Fix complete braindamaged previous try to implement
335         timedout functions.
336
337         * spinlock.c: Pretty print.
338
339 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
340
341         * Makefile (tests): Add ex10.  Add rules to build it.
342         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
343         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
344         * condvar.c (pthread_cond_wait): Allow mutex of kind
345         PTHREAD_MUTEX_TIMED_NP.
346         (pthread_cond_timedwait_relative): Likewise.
347         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
348         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
349         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
350         (__pthread_mutex_lock): Use __pthread_alt_lock for
351         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
352         (__pthread_mutex_timedlock): New function.
353         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
354         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
355         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
356         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
357         * spinlock.c: Implement alternate fastlocks.
358         * spinlock.h: Add prototypes.
359         * Examples/ex10.c: New file.
360         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
361         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
362
363         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
364         (__pthread_rwlock_timedrdlock): New function.
365         (__pthread_rwlock_timedwrlock): New function.
366         Use laternate fastlock function everywhere.
367
368 2000-06-21  Andreas Jaeger  <aj@suse.de>
369
370         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
371         prototype.
372
373         * join.c: Include <stdlib.h> for exit prototype.
374
375 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
376
377         * sysdeps/i386/useldt.h: Include <stdlib.h>.
378
379         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
380         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
381
382         * Makefile (libpthread-routines): Add barrier.
383         (tests): Add ex9.  Add rule to build ex9.
384         * Versions: Export barrier functions.
385         * barrier.c: New file.
386         * Examples/ex9.c: New file.
387         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
388         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
389         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
390
391 2000-06-19  H.J. Lu  <hjl@gnu.org>
392
393         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
394         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
395         (compare_and_swap_with_release_semantics): New. Default to
396         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
397         is not defined.
398
399         * spinlock.c (__pthread_unlock): Call
400         compare_and_swap_with_release_semantics () instead of
401         compare_and_swap ().
402
403 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
404
405         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
406         to errno directly.
407         * sysdeps/pthread/timer_delete.c: Likewise.
408         * sysdeps/pthread/timer_getoverr.c: Likewise.
409         * sysdeps/pthread/timer_gettime.c: Likewise.
410         * sysdeps/pthread/timer_settime.c: Likewise.
411
412 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
413
414         Timer nodes are now reference counted, and can be marked
415         as deleted. This allows for the safe release of the global mutex
416         in the middle without losing the timer being operated on.
417
418         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
419         member is now an enum with three values, so that an intermediate
420         state can be represented (deleted but not free for reuse yet).
421         New refcount member added.
422         * sysdeps/pthread/timer_routines.c: Likewise.
423
424         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
425         timer_valid): New inline functions added.
426
427         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
428         restructured, recursive deadlock bug fixed.
429
430         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
431         timer_addref to ensure that timer won't be deleted while mutex is not
432         held. Also uses timer_invalid to perform validation of timer handle.
433         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
434         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
435
436 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
437
438         * shlib-versions: Add entry for SH.
439         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
440
441 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
442
443         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
444         tightened up some critical regions and micro-optimized some list
445         manipulation code.
446
447         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
448         Returns int value now to indicate whether timer was queued at head.
449         * sysdeps/pthread/posix-timer.h: Likewise.
450         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
451         new return value from __timer_thread_queue_timer to avoid waking
452         up timer thread unnecessarily.
453
454         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
455         inuse flag, because this requires mutex to be held.  Callers updated
456         to do the check when they have the mutex.
457         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
458
459         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
460         regions: avoids making system calls while holding timer mutex, and
461         a few computations were moved outside of the mutex as well.
462         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
463
464         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
465         to list_unlink_ip, meaning idempotent.  Pointer manipulation
466         changed to get better better code out of gcc.
467         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
468         version of list_unlink added here.
469         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
470         function in all places: idempotent one for timers, non-idempotent
471         one for thread nodes.
472         * sysdeps/pthread/timer_settime: Likewise.
473         * sysdeps/pthread/timer_routines.c: Likewise.
474
475 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
476
477         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
478         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
479
480         * sysdeps/pthread/Makefile: Remove tests definition.
481
482 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
483             Yutaka Niibe  <gniibe@chroot.org>
484
485         * sysdeps/sh/pspinlock.c: New file.
486         * sysdeps/sh/pt-machine.h: New file.
487
488 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
489
490         * Makefile (tests): Add joinrace.
491
492         * Examples/ex6.c: Test return value of pthread_join.
493
494 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
495
496         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
497         (__pthread_spin_trylock): Implement.
498         (__pthread_spin_unlock): Implement.
499         (__pthread_spin_init): Implement.
500         (__pthread_spin_destroy): Implement.
501
502 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
503
504         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
505         really append the entry.
506
507 2000-06-10  Andreas Jaeger  <aj@suse.de>
508
509         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
510
511 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
512
513         * sysdeps/pthread/timer_create.c: Thread matching now done on
514         clock type as well as thread attributes.
515         There are individual global signal-delivering threads for
516         different clock types.
517         * sysdeps/pthread/posix-timer.h: Likewise.
518         * sysdeps/pthread/timer_routines.c: Likewise.
519
520         * sysdeps/pthread/timer_routines.c: Thread allocation and
521         deallocation function now remembers to put thread on active
522         list and remove from active list.
523         Thus now the feature of binding multiple timers
524         to a single thread actually works.
525
526 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
527
528         * pthread.c (__pthread_create_2_1): Optimize a bit.
529
530         * internals.h (invalid_handle): Also test for p_terminated != 0.
531         (nonexisting_handle): New function.  Same as old invalid_handle.
532         * join.c (pthread_join): Use nonexisting_handle instead of
533         invalid_handle to test for acceptable thread handle.
534         * manager.c (pthread_handle_free): Likewise.
535         * joinrace.c: New file.
536         Reported by Permaine Cheung <pcheung@cygnus.com>.
537
538 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
539
540         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
541         Correct handling of matching variable.
542
543         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
544         avoid warnings.
545
546         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
547         Be prepared for empty timer list.
548
549         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
550         CPUTIME clock ID.  Add support for thread clocks.
551
552         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
553         subtraction were switched.
554
555         * sysdeps/pthread/timer_routines.c (init_module): Use
556         THREAD_MAXNODES threads.
557
558         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
559         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
560         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
561         with sigqueueinfo is this system call is available.
562
563         * sysdeps/pthread/timer_create.c (timer_create): Allow
564         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
565
566         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
567         functionality.
568         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
569
570 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
571
572         * sysdeps/pthread/posix-timer.h: New file.
573         * sysdeps/pthread/timer_create.c: New file.
574         * sysdeps/pthread/timer_delete.c: New file.
575         * sysdeps/pthread/timer_getoverr.c: New file.
576         * sysdeps/pthread/timer_gettime.c: New file.
577         * sysdeps/pthread/timer_routines.c: New file.
578         * sysdeps/pthread/timer_settime.c: New file.
579         * sysdeps/pthread/tst-timer.c: New file.
580
581 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
582
583         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
584         LINK_MAX definitions if necessary.
585
586 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
587
588         Added missing fork time handling of global libio lock.
589
590         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
591         not just the individual stream locks. Rewritten to use new
592         iterator interface provided by libio rather than accessing
593         global variable.
594
595         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
596         which lock and unlock the stream list using the new interface
597         provied by libio.
598         * internals.h: Likewise.
599
600         * ptfork.c (__fork): Now calls __flockfilelist before fork,
601         and __funlockfilelist in the parent after the fork.
602         Child still calls __fresetlockfiles as before.
603
604         * linuxthreads.texi: Now explains what happens to streams at
605         fork time. Also whole new section on forking and thread added.
606         Definition of pthread_atfork moved out of Miscellaneous Functions
607         to this new section.
608
609 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
610
611         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
612         Add missing register.
613         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
614
615 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
616
617         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
618         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
619         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
620
621 2000-05-31  Andreas Jaeger  <aj@suse.de>
622
623         * sysdeps/mips/pspinlock.c: Implement spinlocks.
624
625 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
626
627         * spinlock.c (__pthread_lock): Remove ASSERT.
628
629         * Makefile (tests): Add ex8.
630         * Examples/ex8.c: New file.
631
632 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
633
634         Bugfix: The pthread_atfork mechanism now takes care of its
635         own internal mutex at fork time.
636
637         * ptfork.c (__fork): Revised so that the mutex is held across
638         the fork operation and while the handlers are called, and so that
639         the child resets the mutex.
640
641         * linuxthreads.texi: Updated pthread_atfork documentation to make
642         it clear that fork and pthread_atfork can't be reentered from
643         atfork handlers, that pthread_atfork and fork are mutually atomic,
644         and that the handlers are inherited by the child process.
645
646 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
647
648         * Makefile (libpthread-routines): Add pspinlock.
649         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
650         Use struct _pthread_fastlock instead of pthread_spinlock_t.
651         * condvar.c: Likewise.
652         * internals.h: Likewise.
653         * join.c: Likewise.
654         * manager.c: Likewise.
655         * mutex.c: Likewise.
656         * pthread.c: Likewise.
657         * rwlock.c: Likewise.
658         * semaphore.c: Likewise.
659         * signals.c: Likewise.
660         * spinlock.h: Likewise.
661         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
662         * sysdeps/alpha/pspinlock.c: New file.
663         * sysdeps/arm/pspinlock.c: New file.
664         * sysdeps/i386/pspinlock.c: New file.
665         * sysdeps/m68k/pspinlock.c: New file.
666         * sysdeps/mips/pspinlock.c: New file.
667         * sysdeps/powerpc/pspinlock.c: New file.
668         * sysdeps/sparc/sparc32/pspinlock.c: New file.
669         * sysdeps/sparc/sparc64/pspinlock.c: New file.
670         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
671         back to _pthread_fastlock.  Define new pthread_spinlock_t.
672
673 2000-05-24  Andreas Jaeger  <aj@suse.de>
674
675         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
676
677 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
678
679         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
680
681 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
682
683         * internals.h (__RES_PTHREAD_INTERNAL): Define.
684
685 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
686
687         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
688         object state is represented with additional bits which distinguish
689         whether that state was set up in the current process, or
690         in an ancestor process. If that state was set in an ancestor,
691         it means that a fork happened while thread was executing the init
692         function. In that case, the state is reset to NEVER.
693         * mutex.c (__pthread_once_fork_prepare): New function.
694         (__pthread_once_fork_child): Likewise
695         (__pthread_once_fork_parent): Likewise
696         (__pthread_reset_pthread_once): Removed.
697         * ptfork.c (__fork): Call new handlers in mutex.c.
698         * internals.h: Declarations of new mutex.c functions added.
699         Declaration of removed function deleted.
700         * linuxthreads.texi: Updated documentation about pthread_once
701         to clarify what happens under cancellation and forking.
702
703 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
704
705         * internals.h: New thread manager request type, REQ_KICK.
706         * join.c (pthread_exit): main thread now calls exit() instead
707         of _exit() in order to proper process cleanup.
708         * manager.c (__pthread_manager): Do not terminate manager
709         after unblocking main thread; wait for main thread's
710         REQ_PROCESS_EXIT request instead.
711         Also, added REQ_KICK case to handle new request; this just does
712         nothing.
713         * manager.c (pthread_exited): Do not terminate manager after
714         unblocking main thread.
715         * manager.c (__pthread_manager_sighandler): If the main thread
716         is waiting for all other threads to die, send a REQ_KICK into
717         the thread manager request pipe to get it to clean out the threads
718         and unblock the main thread as soon as possible. This fixes
719         the 2000 millisecond hang on shutdown bug.
720         * Examples/ex7.c: New file, tests shutdown behavior when all threads
721         including the main one call pthread_exit(), or implicitly do so.
722         * Makefile (tests): Add ex7.
723
724 2000-05-05  Andreas Jaeger  <aj@suse.de>
725
726         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
727         (pthread_getcpuclockid): Correct test for ourselves.
728
729 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
730
731         * internals.h (struct _pthread_descr_struct): Reorganization.
732         Allocate room for 16 pointers at head of the structure for future
733         thread-local data handling.  Move p_self member in this area.
734         * manager.c (pthread_handle_create): Adjust use of p_self.
735         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
736         * pthread.c (__pthread_initial_thread): Adjust initialization.
737         (__pthread_manager_thread): Likewise.
738
739 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
740
741         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
742         for eventmask larger than 1 word.
743
744 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
745
746         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
747         * pthread.c (__pthread_initialize_minimal): New function.  Perform
748         minimal initialization.
749         (pthread_initialize): Remove this code here.
750         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
751         are working around the problem in glibc.
752
753 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
754
755         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
756         now.  First gcc must be fixed (more concrete: libgcc).
757
758 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
759
760         * pthread.c: Remove special treatement for interrupt handlers on x86.
761         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
762         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
763         necessary.
764         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
765
766 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
767
768         * join.c (pthread_exit): Set p_terminated after reporting the
769         termination event instead of before.
770
771 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
772
773         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
774         if __USE_UNIX98.
775
776 2000-04-18  Andreas Jaeger  <aj@suse.de>
777
778         * Versions: Use ld instead of ld.so.
779
780 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
781
782         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
783         Remove the typedef keyword.
784
785 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
786
787         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
788         not stbar.
789         (READ_MEMORY_BARRIER): Define.
790         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
791         MEMORY_BARRIER.
792         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
793         headers.
794
795 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
796
797         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
798         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
799         use thread_handle().
800
801 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
802
803         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
804         if fast mutex is used.  Don't initialize `already_canceled' twice.
805         Correctly test for return value of timedsuspend.
806
807         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
808         therefore don't need the _rt versions of the signal handlers.
809
810 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
811
812         * pthread.c (pthread_yield): New function.
813         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
814         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
815         * internals.h: Declare __pthread_yield.
816
817         * pthread.c (pthread_initialize): Avoid a bit more code if
818         realtime signals are known to exist.
819
820         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
821         to dynamically detect RT signals and avoid generating compatibility
822         functions with old kernel.
823         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
824         __pthread_restart_new directly.
825         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
826         __pthread_wait_for_restart_signal directly.
827         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
828         __pthread_timedsuspend_new directly.
829
830 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
831
832         * condvar.c: Remove all the special code to handle cond_timedwait.
833         Use timedsuspend instead.
834         * internals.h: Declare __pthread_timedsuspend_old,
835         __pthread_timedsuspend_new, and __pthread_timedsuspend.
836         Remove declaration of __pthread_init_condvar.
837         * pthread.c: Define __pthread_timedsuspend variable.
838         (__pthread_timedsuspend_old): New function.  Timed suspension
839         implementation for old Linux kernels.
840         (__pthread_timedsuspend_new): New function.  Timed suspension
841         implementation for new Linux kernels.
842         * restart.h (timedsuspend): New function.  Call appropriate
843         suspension function through __pthread_timedsuspend.
844         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
845         the code.
846         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
847
848         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
849         undefined.
850         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
851         where possible.
852         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
853         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
854
855         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
856         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
857
858 2000-04-14  Andreas Jaeger  <aj@suse.de>
859
860         * weaks.c: Fix typo.
861
862         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
863         2.2 for linuxthreads.
864
865 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
866
867         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
868         (pthread_getcpuclockid): Fix typo.
869
870 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
871
872         * Makefile (libpthread-routines): Add getcpuclockid.
873         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
874         * sysdeps/pthread/getcpuclockid.c: New file.
875         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
876         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
877
878         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
879         Defined.
880         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
881
882         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
883         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
884         and pthread_spin_unlock.
885         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
886         into pthread_spinlock_t.  Change all uses.
887         * spinlock.c: Implement pthread_spin_lock.
888         Rename __pthread_unlock to __pthread_spin_unlock and define weak
889         alias for real name.
890         Define pthread_spin_trylock, pthread_spin_init, and
891         pthread_spin_destroy.
892         Change all uses of _pthread_fastlock to pthread_spinlock_t.
893         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
894         Change all uses of _pthread_fastlock to pthread_spinlock_t.
895         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
896         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
897         and pthread_spin_unlock.
898         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
899         Change all uses of _pthread_fastlock to pthread_spinlock_t.
900         * condvar.c: Likewise.
901         * internals.h: Likewise.
902         * join.c: Likewise.
903         * manager.c: Likewise.
904         * mutex.c: Likewise.
905         * pthread.c: Likewise.
906         * rwlock.c: Likewise.
907         * semaphore.c: Likewise.
908         * signals.c: Likewise.
909
910         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
911         macros.
912         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
913
914 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
915
916         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
917         _POSIX_SHARED_MEMORY_OBJECTS.
918
919 2000-04-11  Andreas Jaeger  <aj@suse.de>
920
921         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
922         (__compare_and_swap): Mark as modifying memory.
923
924 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
925
926         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
927         __volatile__.
928         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
929         Don't have the 'asm' __volatile__.
930
931 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
932
933         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
934         * spinlock.c (__pthread_lock): Add memory barriers.
935         (__pthread_unlock): Likewise.
936         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
937         instruction.
938         (RELEASE): Not needed anymore.
939         (__compare_and_swap): Mark asm as modifying memory.
940         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
941         of MEMORY_BARRIER.
942         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
943         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
944         (MEMORY_BARRIER): Define using stbar.
945         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
946         stbar.
947         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
948         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
949         Mike Burrows <m3b@pa.dec.com>.
950
951 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
952
953         * signals.c (sigaction): Fix return value for the case SIG is one
954         of the signals the implementation uses.
955         Patch by Xavier.Leroy@inria.fr.
956
957 2000-04-01  Andreas Jaeger  <aj@suse.de>
958
959         * attr.c: Use shlib-compat macros.
960         * oldsemaphore.c: Likewise.
961         * pthread.c: Likewise.
962         * weaks.c: Likewise.
963
964 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
965
966         * semaphore.c (sem_timedwait): New function.
967         Patch by Carl Mailloux <carlm@oricom.ca>.
968         * semaphore.h: Declare sem_timedwait.
969         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
970
971 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
972
973         * sysdeps/pthread/Makefile: File removed.
974
975 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
976
977         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
978         * internals.h (__pthread_reset_pthread_once): Add prototype.
979         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
980
981         * manager.c (pthread_handle_create): Store ID of new thread before
982         clone call.
983
984 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
985
986         * attr.c: Use new macros from shlib-compat.h to define versions.
987         * oldsemaphore.c: Likewise.
988         * semaphore.c: Likewise.
989         * weaks.c: Likewise.
990
991         * pthread.c: Update for new SHLIB_COMPAT definition.
992
993         * manager.c (__pthread_manager): Unmask debug signal.
994
995         * pthread.c (pthread_initialize): Test for address of __dso_handle
996         being NULL, not value.  Use __on_exit, not on_exit.
997         Patch by Andreas Jaeger <aj@suse.de>.
998
999         * pthread.c: Use new macros from shlib-compat.h to define versions.
1000
1001 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1002
1003         * pthread.c (pthread_initialize): Instead of on_exit use
1004         __cxa_atexit if __dso_label is available to allow unloading the
1005         libpthread shared library.
1006
1007 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1008
1009         * condvar.c: Make tests for ownership of mutex less strict.
1010
1011 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1012
1013         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1014         current thread and return error if not.
1015         (pthread_cond_timedwait_relative_old): Likewise.
1016         (pthread_cond_timedwait_relative_new): Likewise.
1017
1018         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1019         (pthread_once_cancelhandler): New function.
1020         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1021
1022 2000-03-14  Andreas Jaeger  <aj@suse.de>
1023
1024         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1025         REG_GS.
1026         (pthread_handle_sigrestart_rt): Likewise.
1027         * signals.c (pthread_sighandler_rt): Likewise.
1028
1029 2000-03-02  Andreas Jaeger  <aj@suse.de>
1030
1031         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1032         Reported by Sean Chen <sean.chen@turbolinux.com>.
1033
1034 2000-02-28  Andreas Jaeger  <aj@suse.de>
1035
1036         * rwlock.c: Fix typo.
1037
1038 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1039
1040         * rwlock.c: Define __* variants of the functions and make old names
1041         aliases.
1042         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1043         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1044
1045 2000-02-25  Andreas Jaeger  <aj@suse.de>
1046
1047         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1048         pwrite64, lseek64, open64, and __open64 with version 2.2.
1049
1050 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
1051
1052         * semaphore.h (SEM_FAILED): Use 0 not NULL.
1053
1054 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
1055
1056         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1057         nanosleep does not work either.  Get absolute time inside the
1058         loop.
1059         (pthread_cond_timedwait_relative_new): Likewise.
1060         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1061
1062 2000-02-13  Andreas Jaeger  <aj@suse.de>
1063
1064         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1065         (pthread_cond_timedwait_relative_old): Likewise.
1066
1067 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
1068
1069         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1070         but keep the code around.  A bug in the kernel prevent us from
1071         using the code.
1072         (pthread_cond_timedwait_relative_new): Likewise.
1073         (PR libc/1597 and libc/1598).
1074
1075 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1076
1077         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1078         loop around nanosleep calls instead of around most of the function
1079         (pthread_cond_timedwait_relative_new): Likewise.
1080         body.  Got rid of backwards goto and one local.
1081
1082 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1083
1084         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1085         before every nanosleep call to account for time spent in the rest
1086         of the function.
1087         (pthread_cond_timedwait_relative_new): Likewise.
1088         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1089
1090 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
1091
1092         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1093         from nanosleep call so that in case we restart we only wait for the
1094         remaining time.
1095         (pthread_cond_timedwait_relative_new): Likewise.
1096         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1097
1098 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
1099
1100         * manager.c (pthread_allocate_stack): Compute guard page address
1101         correctly.  Patch by HJ Lu.
1102
1103         * sysdeps/pthread/pthread.h: Define
1104         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1105
1106 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1107
1108         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1109         preference handling.
1110         (pthread_rwlockattr_setkind_np): Allow
1111         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1112         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1113
1114 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1115
1116         * internals.h (pthread_readlock_info): New structure.
1117         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1118         p_untracked_readlock_count.
1119         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1120         Add initializers for new fields.
1121         * manager.c (pthread_free): Free read/write lock lists.
1122         * queue.h (queue_is_empty): New function.
1123         * rwlock.c: Implement requirements about when readers should get
1124         locks assigned.
1125         * sysdeps/pthread/pthread.h
1126         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1127         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1128         Define this name as well.
1129         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1130
1131 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1132
1133         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1134         Adjust initializers for struct _pthread_descr_struct change.
1135         * internals.h (struct _pthread_descr_struct): Move new elements to
1136         the end.
1137
1138 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1139
1140         Redesigned how cancellation unblocks a thread from internal
1141         cancellation points (sem_wait, pthread_join,
1142         pthread_cond_{wait,timedwait}).
1143         Cancellation won't eat a signal in any of these functions
1144         (*required* by POSIX and Single Unix Spec!).
1145         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1146         simultaneous condition variable signal (not required by POSIX
1147         or Single Unix Spec, but nice).
1148         * spinlock.c: __pthread_lock queues back any received restarts
1149         that don't belong to it instead of assuming ownership of lock
1150         upon any restart; fastlock can no longer be acquired by two threads
1151         simultaneously.
1152         * restart.h: Restarts queue even on kernels that don't have
1153         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1154         avoiding a rare race condition in pthread_cond_timedwait.
1155
1156 1999-12-31  Andreas Jaeger  <aj@suse.de>
1157
1158         * internals.h: Remove duplicate prototype declarations.
1159
1160         * weaks.c: Remove __THROW from prototypes since the file is not
1161         compiled by a C++ compiler.
1162         * internals.h: Likewise.
1163
1164 1999-12-30  Andreas Jaeger  <aj@suse.de>
1165
1166         * sysdeps/pthread/pthread.h: Move internal functions to...
1167         * sysdeps/pthread/bits/libc-lock.h: ...here.
1168
1169 1999-12-29  Andreas Jaeger  <aj@suse.de>
1170
1171         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1172
1173 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1174
1175         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1176         beginning.
1177
1178         * manager.c (__pthread_start): Add one more cast to prevent
1179         warning on 64bit machines.
1180
1181 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1182
1183         * manager.c (pthread_handle_create): Set p_pid of new thread
1184         before calling the callback function to report a new thread.
1185
1186 1999-12-20  Andreas Jaeger  <aj@suse.de>
1187
1188         * pthread.c (pthread_initialize): Move getrlimit call after
1189         setting of errno.
1190
1191 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1192
1193         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1194         pwrite64, lseek64, open64, and __open64.
1195         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1196         pwrite64, lseek64, open64, and __open64.
1197
1198         * manager.c (pthread_allocate_stack): Correct computation of
1199         new_thread_bottom.  Correct handling of stack size and when the
1200         rlimit method to guard for stack growth is used.
1201         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1202         minus one pagesize (not two).
1203
1204 1999-12-03  Andreas Jaeger  <aj@suse.de>
1205
1206         * Versions: Add __res_state with version GLIBC_2.2.
1207
1208         * errno.c (__res_state): New function to return thread specific
1209         resolver state.
1210
1211         * pthread.c (pthread_initialize): Initialize p_resp.
1212         (__pthread_reset_main_thread): Also set p_resp.
1213
1214         * manager.c (pthread_handle_create): Initialize p_resp.
1215
1216         * internals.h: Add thread specific resolver state.
1217         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1218
1219 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
1220
1221         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1222         beginning.
1223         * sysdeps/i386/i686/pt-machine.h: Likewise.
1224         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1225
1226 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
1227
1228         * manager.c (pthread_start_thread_event): Initialize p_pid already
1229         here.
1230
1231 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
1232
1233         * internals.h: Add prototype for __pthread_manager_event.
1234         * manager.c (__pthread_manager_event): New function.
1235         (pthread_start_thread_event): Correct computation of self.
1236         Use INIT_THREAD_SELF.
1237         * pthread.c (__pthread_manager_thread): Initialize p_lock.
1238         (__pthread_initialize_manager): Respect event flags also for creation
1239         of the manager thread.
1240
1241 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
1242
1243         * pthread.c (__pthread_initialize_manager): Initialize
1244         __pthread_manager_thread.p_tid.
1245
1246 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
1247
1248         * internals.h: Declare __pthread_last_event.
1249         * manager.c: Define __pthread_last_event.
1250         (pthread_handle_create): Set __pthread_last_event.
1251         (pthread_exited): Likewise.
1252         * join.c (pthread_exit): Likewise.
1253
1254         * Makefile (libpthread-routines): Add events.
1255         * events.c: New file.
1256         * internals.h: Protect against multiple inclusion.
1257         Include thread_dbP.h header.
1258         (struct _pthread_descr_struct): Add new fields p_report_events and
1259         p_eventbuf.
1260         Declare event reporting functions.
1261         * join.c (pthread_exit): Signal event if this is wanted.
1262         * manager.c (__pthread_threads_events): New variable.
1263         (pthread_handle_create): Take new parameters with event information.
1264         Signal TD_CREATE event if wanted.
1265         (__pthread_manager): Adjust pthread_handle_create call.
1266         (pthread_start_thread_event): New function.  Block until manager is
1267         finished and then call pthread_start_thread.
1268         (pthread_exited): Signal TD_REAP event if wanted.
1269
1270 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
1271
1272         * restart.h (suspend_with_cancellation): Rewrite as a macro.
1273
1274         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1275
1276 1999-10-25  Andreas Jaeger  <aj@suse.de>
1277
1278         * internals.h: Remove K&R compatibility.
1279         * no-tsd.c: Likewise.
1280         * semaphore.h: Likewise.
1281         * signals.c: Likewise.
1282         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1283         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1284         * weaks.c: Likewise.
1285
1286 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
1287
1288         * pthread.c: For i386, wrap pthread_handle_sigrestart and
1289         pthread_handle_sigcancel with functions that restore %gs from the
1290         signal context.  For each signal handling function, two wrappers
1291         are required, one for a non-RT signal and one for a RT signal.
1292         * signal.c: For i386, add code to restore %gs from the signal
1293         context in pthread_sighandler and pthread_sighandler_rt.
1294
1295 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
1296
1297         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1298
1299 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
1300
1301         * pthread.c (__pthread_initial_thread): Pass argument to
1302         PTHREAD_START_ARGS_INITIALIZER.
1303         (__pthread_manager_thread): Likewise.
1304
1305         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1306         initialize function.
1307
1308         * manager.c (pthread_handle_create): Remove p_startfct initialization.
1309
1310         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1311
1312 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
1313
1314         * internals.h: Correct return types for __libc_read and __libc_write.
1315
1316 1999-10-09  Andreas Jaeger  <aj@suse.de>
1317
1318         * internals.h: Add __new_sem_post to get prototype in
1319         manager.c; include semaphore.h for needed types.
1320
1321 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
1322
1323         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1324         directly instead of calling sem_post which should not be necessary
1325         but is faster and might help in some case to work around problems.
1326         Patch by khendricks@ivey.uwo.ca [libc/1382].
1327
1328 1999-10-08  Andreas Schwab  <schwab@suse.de>
1329
1330         * sysdeps/pthread/Subdirs: New file.
1331         * Implies: Removed.
1332
1333 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
1334
1335         * Implies: New file.
1336         * internals.h (struct _pthread_descr_struct): Add p_startfct.
1337         * manager.c (pthread_handle_create): Initialize p_startfct.
1338         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1339
1340 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
1341
1342         * manager.c (__linuxthreads_pthread_threads_max): New variable.
1343         * specific.c (__linuxthreads_pthread_keys_max): New variable.
1344         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1345
1346         * condvar.c (pthread_cond_timedwait_relative): Never return with
1347         EINTR.  Patch by Andreas Schwab.
1348
1349 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
1350
1351         * signals.c (sigaction): Correct last patch.  Don't select
1352         pthread_sighandler_rt based on the signal number but instead of
1353         the SA_SIGINFO flag.
1354
1355 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
1356
1357         * specific.c: Move definitions of struct pthread_key_struct and
1358         destr_function to ...
1359         * internals.h: ...here.
1360
1361 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
1362
1363         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
1364         this instead of pthread_handle_sigrestart if the signal is an RT
1365         signal.
1366
1367         * signals.c: Handle passing through of sighandler arguments also
1368         for real-time signals.
1369
1370 1999-09-03  Andreas Schwab  <schwab@suse.de>
1371
1372         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
1373         fork as weak alias.
1374         (__vfork): New function, alias vfork.
1375         * Versions: Export __fork, vfork, and __vfork in libpthread.
1376
1377 1999-08-23  Andreas Schwab  <schwab@suse.de>
1378
1379         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1380         call to signal handler.
1381
1382 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
1383
1384         * pthread.c (__pthread_reset_main_thread): Undo last change.
1385         (__pthread_kill_other_threads_np): Reset signal handlers for the
1386         signals we used in the thread implementation here.
1387
1388 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
1389
1390         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1391         for the signals we used in the thread implementation [PR libc/1234].
1392
1393         * Versions: Export __pthread_kill_other_threads_np from libpthread
1394         for GLIBC_2.1.2.
1395
1396         * signals.c: Pass sigcontext through wrapper to the user function.
1397
1398 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
1399
1400         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1401         __libc_internal_tsd_set.
1402
1403 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1404
1405         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1406         needed anymore.
1407
1408 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1409
1410         * internals.h: Align _pthread_descr_struct to 32 bytes.
1411         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1412         libc/1206.
1413
1414 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1415
1416         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1417         swap function.
1418
1419 1999-07-09  Cristian Gafton  <gafton@redhat.com>
1420
1421         * Makefile (libpthread-routines): Add oldsemaphore routine.
1422         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1423         sem_trywait, and sem_wait to GLIBC_2.1.
1424         * oldsemaphore.c: New file.
1425         * semaphore.c: Add default_symbol_versions for the changed functions.
1426         (__new_sem_init): Rename from sem_init.
1427         (__new_sem_post): Rename from sem_post.
1428         (__new_sem_wait): Rename from sem_wait.
1429         (__new_sem_trywait): Rename from sem_trywait.
1430         (__new_sem_getvalue): Rename from sem_getvalue.
1431         (__new_sem_destroy): Rename from sem_destroy.
1432
1433 1999-06-23  Robey Pointer  <robey@netscape.com>
1434
1435         * internals.h: Added p_nextlock entry to separate queueing for a
1436         lock from queueing for a CV (sometimes a thread queues on a lock
1437         to serialize removing itself from a CV queue).
1438         * pthread.c: Added p_nextlock to initializers.
1439         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1440
1441 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1442
1443         * manager.c (pthread_handle_create): Free mmap region after stack
1444         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1445
1446 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1447
1448         * man/pthread_cond_init.man: Correct example.
1449         Reported by Tomas Berndtsson <tomas@nocrew.org>.
1450
1451         * linuxthreads.texi (Condition Variables): Likewise.
1452
1453 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
1454
1455         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1456         casx not cas, also successful casx returns the old value in rd
1457         and not the new value.
1458
1459 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
1460
1461         * manager.c: If pthread_create() is given a NULL attribute
1462         and the thread manager runs with a realtime policy, set the
1463         scheduling policy of the newly created thread back to SCHED_OTHER.
1464         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1465         initialize the schedpolicy field of new_thread->p_start_args
1466         to that of the calling thread.
1467
1468 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
1469
1470         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1471         instruction does not allow memory element to use offset.
1472
1473 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
1474
1475         * manager.c (pthread_allocate_stack): Optimize initialization of new
1476         thread descriptor.
1477
1478         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1479         Don't use initializer since it is all zeroes.
1480         (__libc_once_define): Likewise.
1481
1482 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1483
1484         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1485         doesn't exist anymore.
1486         * sysdeps/i386/Implies: Likewise.
1487         * sysdeps/m68k/Implies: Likewise.
1488         * sysdeps/mips/Implies: Likewise.
1489         * sysdeps/powerpc/Implies: Likewise.
1490         * sysdeps/sparc/sparc32/Implies: Likewise.
1491         * sysdeps/sparc/sparc64/Implies: Likewise.
1492
1493 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
1494
1495         * sysdeps/alpha/bits/semaphore.h: Removed.
1496         * sysdeps/powerpc/bits/semaphore.h: Removed.
1497         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1498         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1499         * Makefile (headers): Remove bits/semaphore.h.
1500
1501         * semaphore.h: Define _pthread_descr if necessary.
1502         Don't include limits.h.  Define SEM_VALUE_MAX directly.
1503         Define SEM_FAILED.
1504         (sem_t): Protect element names with leading __.
1505         Add declarations for sem_close, sem_open, and sem_unlink.
1506         * semaphore.c: Adjust all functions for new element names.
1507         Define sem_close, sem_open, and sem_unlink.
1508         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1509         GLIBC_2.1.1.
1510         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1511         necessary.
1512
1513 1999-03-16  H.J. Lu  <hjl@gnu.org>
1514
1515         * specific.c (pthread_key_delete): Check th->p_terminated to see
1516         if the thread is running.
1517
1518         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1519         Added to GLIBC_2.0 for libc.so.
1520
1521 1999-02-12  H.J. Lu  <hjl@gnu.org>
1522
1523         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1524         __libc_allocate_rtsig): Added to GLIBC_2.1.
1525
1526         * internals.h (DEFAULT_SIG_RESTART): Removed.
1527         (DEFAULT_SIG_CANCEL): Removed.
1528
1529         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1530         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1531         (__pthread_sig_restart, __pthread_sig_cancel,
1532         __pthread_sig_debug): Initialized.
1533         (pthread_initialize): Call init_rtsigs () to initialize
1534         real-time signals.
1535
1536 1999-02-03  H.J. Lu  <hjl@gnu.org>
1537
1538         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1539         Don't restart the thread which sent REQ_DEBUG.
1540         (pthread_start_thread): Check if __pthread_sig_debug > 0
1541         before debugging.
1542
1543         * pthread.c (__pthread_initialize_manager): Suspend ourself
1544         after sending __pthread_sig_debug to gdb instead of
1545         __pthread_sig_cancel.
1546
1547 1999-01-24  H.J. Lu  <hjl@gnu.org>
1548
1549         * manager.c (__pthread_manager): Delete __pthread_sig_debug
1550         from mask if __pthread_sig_debug > 0.
1551         (pthread_handle_create): Increment __pthread_handles_num.
1552
1553         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1554         * pthread.c (__pthread_initialize_manager): Likewise.
1555
1556         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1557         instead of __libc_allocate_rtsig (2).
1558         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1559         instead of __pthread_sig_cancel.
1560         (pthread_handle_sigdebug): Fix comments.
1561
1562 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1563
1564         * manager.c (pthread_allocate_stack): Set
1565         __pthread_nonstandard_stacks if user-specified stack is used.
1566
1567 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1568
1569         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1570         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1571
1572 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1573
1574         * pthread.c: Use a third signal __pthread_sig_debug distinct
1575         from __pthread_sig_cancel to notify gdb when a thread is
1576         created
1577         * manager.c: Likewise.
1578         * internals.h: Likewise.
1579         * signals.c: The implementation of sigwait(s) assumed that
1580         all signals in s have signal handlers already attached.
1581         This is not required by the standard, so make it work
1582         also if some of the signals have no handlers.
1583
1584 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1585
1586         * linuxthreads.texi: Remove pointers from first @node.  Move old
1587         @node spec inside comment.
1588
1589 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1590
1591         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1592         _IO_lock_unlock.
1593
1594 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1595
1596         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1597         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1598
1599 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1600
1601         * manager.c: Threads now send __pthread_sig_cancel on termination.
1602         Change clone call and signal masks.
1603         * thread.c (pthread_handle_sigrestart): Remove special code for
1604         manager.
1605         (pthread_handle_sigcancel): In manager thread call
1606         __pthread_manager_sighandler.
1607         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1608         * sysdeps/i386/i686/pt-machine.h: Likewise.
1609         Patches by Xavier Leroy.
1610
1611 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1612
1613         * spinlock.c (__pthread_unlock): Don't crash if called for an
1614         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1615
1616         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1617         overall runtime.
1618
1619 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1620
1621         * Examples/ex3.c: Wait until all threads are started before
1622         searching for the number to avoid race condition on very fast
1623         systems.
1624
1625 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1626
1627         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1628         declaration since it's not needed.
1629
1630         * sysdeps/pthread/pthread.h: Move internal functions to ...
1631         * internals.h: ...here.
1632
1633 1998-12-02  H.J. Lu  <hjl@gnu.org>
1634
1635         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1636         SIGRTMIN is defined.
1637         (__pthread_sig_cancel): Likewise.
1638
1639 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1640
1641         * wrapsyscall.c: Include <sys/mman.h> for msync,
1642         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1643         Correct msync declaration.
1644
1645 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1646
1647         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1648         __libc_tsd_set): New macros for new interface.
1649         * no-tsd.c: New file, provide uninitialized defns of
1650         __libc_internal_tsd_get and __libc_internal_tsd_set.
1651         * Makefile (routines): Add no-tsd.
1652
1653 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1654
1655         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1656         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1657         __libc_internal_tsd_set): Move decls to ...
1658         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1659         declarations.
1660
1661         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1662         __libc_internal_tsd_set): Make these pointers to functions, not
1663         functions; remove #pragma weak decls for them.
1664         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1665         Define static functions and initialized pointers to them.
1666
1667 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1668
1669         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1670         (CFLAGS-specific.c): Likewise.
1671         (CFLAGS-pthread.c): Likewise.
1672         (CFLAGS-ptfork.c): Likewise.
1673         (CFLAGS-cancel.c): Likewise.
1674         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1675         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1676
1677         * mutex.c (pthread_mutex_init): Define as strong symbol.
1678         (pthread_mutex_destroy): Likewise.
1679         (pthread_mutex_trylock): Likewise.
1680         (pthread_mutex_lock): Likewise.
1681         (pthread_mutex_unlock): Likewise.
1682         (pthread_mutexattr_init): Likewise.
1683         (pthread_mutexattr_destroy): Likewise.
1684         (pthread_once): Likewise.
1685         * ptfork.c (pthread_atfork): Likewise.
1686         * specific.c (pthread_key_create): Likewise.
1687         (pthread_setspecific): Likewise.
1688         (pthread_getspecific): Likewise.
1689
1690 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1691
1692         * linuxthreads.texi: Fix punctuation after xref.
1693
1694 1998-11-10  H.J. Lu  <hjl@gnu.org>
1695
1696         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1697         if it is defined in <linux/limits.h>.
1698
1699 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1700
1701         * spinlock.h (__pthread_trylock): Define inline.
1702         (__pthread_lock): Add extra parameter to declaration.  Declare
1703         using internal_function.
1704         (__pthread_unlock): Declare using internal_function.
1705         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1706         of local variable self.  Avoid recomputing self.  Define using
1707         internal_function.
1708         (__pthread_trylock): Remove.
1709         (__pthread_unlock): Define using internal_function.
1710         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1711         computed self value is possible.
1712         * condvar.c: Likewise.
1713         * join.c: Likewise.
1714         * manager.c: Likewise.
1715         * mutex.c: Likewise.
1716         * pthread.c: Likewise.
1717         * rwlock.c: Likewise.
1718         * semaphore.c: Likewise.
1719         * signals.c: Likewise.
1720
1721 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1722
1723         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1724         __ to field names of the struct.
1725         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1726         Likewise.
1727         (pthread_attr_t): Likewise.
1728         (pthread_cond_t): Likewise.
1729         (pthread_condattr_t): Likewise.
1730         (pthread_mutex_t): Likewise.
1731         (pthread_mutexattr_t): Likewise.
1732         (pthread_rwlock_t): Likewise.
1733         (pthread_rwlockattr_t): Likewise.
1734         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1735         * cancel.c: Likewise.
1736         * condvar.c: Likewise.
1737         * manager.c: Likewise.
1738         * mutex.c: Likewise.
1739         * pthread.c: Likewise.
1740         * ptlongjmp.c: Likewise.
1741         * rwlock.c: Likewise.
1742         * spinlock.c: Likewise.
1743
1744 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1745
1746         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1747         also with PT_EI.
1748
1749         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1750         definitions.
1751
1752         * Makefile (libpthread-routines): Add pt-machine.
1753         * pt-machine.c: New file.
1754         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1755         yet defined.  Use PT_EI in extern inline definitions.
1756         * sysdeps/arm/pt-machine.h: Likewise.
1757         * sysdeps/i386/pt-machine.h: Likewise.
1758         * sysdeps/i386/i686/pt-machine.h: Likewise.
1759         * sysdeps/m68k/pt-machine.h: Likewise.
1760         * sysdeps/mips/pt-machine.h: Likewise.
1761         * sysdeps/powerpc/pt-machine.h: Likewise.
1762         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1763         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1764
1765 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1766
1767         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1768         is declared.
1769
1770 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1771
1772         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1773         argument.
1774         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1775
1776 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1777
1778         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
1779         guard.
1780
1781 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1782
1783         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1784         array index overflow.
1785
1786 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1787
1788         * sysdeps/pthread/semaphore.h: New file.
1789
1790 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1791
1792         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1793         _LIBC_TSD_KEY_DL_ERROR.
1794
1795 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1796
1797         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1798         * sysdeps/i386/pt-machine.h: Likewise.
1799         Suggested by Roland McGrath.
1800
1801 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1802
1803         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1804         access thread data with non-constant offsets.
1805         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1806         necessary.
1807
1808         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1809         THREAD_SETMEM_NC definitions.
1810
1811         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1812         THREAD_SETMEM_NC.
1813         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1814
1815 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1816
1817         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1818         not already defined.
1819         (struct _pthread_descr_struct): Add p_self and p_nr field.
1820         * manager.c (__pthread_handles): Define second element to point
1821         to manager thread.
1822         (__pthread_handles_num): Initialize to 2.
1823         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1824         (pthread_start_thread): Likewise.
1825         (pthread_handle_create): Start search for free slot at entry 2.
1826         Initialize new fields p_self and p_nr.
1827         Call __clone with CLONE_PTRACE if available.
1828         (pthread_free): Call FREE_THREAD_SELF if available.
1829         * pthread.c (__pthread_initial_thread): Initialize new fields.
1830         (__pthread_manager_thread): Likewise.
1831         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1832
1833         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1834         elements of the thread descriptor.
1835         * condvar.c: Likewise.
1836         * errno.c: Likewise.
1837         * join.c: Likewise.
1838         * manager.c: Likewise.
1839         * pthread.c: Likewise.
1840         * ptlongjmp.c: Likewise.
1841         * semaphore.c: Likewise.
1842         * signals.c: Likewise.
1843         * specific.c: Likewise.
1844         * spinlock.c: Likewise.
1845
1846         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1847
1848         * sysdeps/i386/useldt.h: New file.
1849         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1850
1851         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1852         THREAD_SETMEM using __thread_self.
1853         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1854
1855 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1856
1857         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1858         turned out that we didn't need to queue after all.
1859
1860 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1861
1862         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1863         and wastes space; correct types.
1864
1865 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1866
1867         * signals.c (sigaction): Handle NULL argument.
1868
1869 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1870
1871         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1872         of sigset_t.
1873
1874 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1875
1876         * Makefile (linuxthreads-version): Extract correct number from
1877         Banner.
1878
1879 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1880
1881         * Banner: Bump version number to 0.8
1882         * FAQ.html: Many updates, in particular w.r.t. debugging.
1883         * manager.c: Support for non-default stacksize for
1884         LinuxThreads-allocated stacks;
1885         don't use guard pages for stacks with default size, rely on
1886         rlimit(RLIMIT_STACK) instead (it's cheaper).
1887         * attr.c: Likewise.
1888         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1889         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1890         * condvar.c: Likewise.
1891         * internals.h: Likewise.
1892         * restart.h: Likewise.
1893         * signals.c: Likewise.
1894         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1895
1896 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1897
1898         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1899         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1900         * Versions: Put __pthread_mutexattr_settype under version
1901         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1902         __pthread_mutexattr_gettype.
1903
1904 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1905
1906         * sysdeps/pthread/bits/libc-lock.h: Make
1907         __pthread_mutexattr_settype weak.  Don't make
1908         __pthread_mutexattr_setkind_np weak.
1909
1910 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1911
1912         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1913         call can succeed here.
1914
1915         * mutex.c: Define __pthread_mutexattr_settype and make
1916         __pthread_mutexattr_setkind_np an alias.
1917         Likewise for __pthread_mutexattr_gettype.
1918
1919 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1920
1921         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1922         is root.
1923
1924 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1925
1926         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1927
1928 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1929
1930         * Examples/ex6.c: Include <unistd.h> for usleep.
1931
1932 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1933
1934         * Examples/ex4.c (main): Use exit, not pthread_exit.
1935
1936 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1937
1938         * Versions: Add __pthread_mutexattr_gettype and
1939         __pthread_mutexattr_settype.
1940         * lockfile.c: Use __pthread_mutexattr_settype instead of
1941         __pthread_mutexattr_setkind_np.
1942         * mutex.c: Define __pthread_mutexattr_gettype and
1943         __pthread_mutexattr_settype.
1944         * weak.c: Likewise.
1945         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1946         __pthread_mutexattr_settype.
1947         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1948         Use __pthread_mutexattr_settype.
1949
1950 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1951
1952         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1953         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1954         pthread_mutexattr_settype.
1955         * sysdeps/pthread/pthread.h: Declare these functions.
1956         Move pthread_sigmask and pthread_kill declaration in separate header.
1957         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1958
1959 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1960
1961         * Makefile: Add rules to compile and run tests.
1962         * Examples/ex1.c: Little changes to fix warnings.
1963         * Examples/ex2.c: Likewise.
1964         * Examples/ex3.c: Likewise.
1965         * Examples/ex4.c: Likewise.
1966         * Examples/ex5.c: Likewise.
1967         * Examples/ex6.c: New file.
1968
1969 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1970
1971         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1972
1973 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1974
1975         * attr.c: Include <string.h>.
1976
1977 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1978
1979         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1980         * internals.h: Include limits.h.
1981         * manager.c: Use memcpy to copy sched_param.
1982         * ptfork.c: Include errno.h.
1983         * pthread.c: Likewise.
1984         * semaphore.c: Likewise.
1985         * specific.c: Likewise.
1986         * spinlock.h: Likewise.
1987         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1988         type definition to ...
1989         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1990
1991 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1992
1993         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1994
1995         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1996         as macros as demanded in POSIX.1, Annex C.
1997
1998 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1999
2000         * internals.h (struct pthread_request): For free use pthread_t
2001         instead of pthread_descr.
2002         * join.c (pthread_join): Pass thread_id, not th to manager.
2003         (pthread_detach): Likewise.
2004         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2005         (pthread_exited): Remove detached queue code.
2006         (pthread_handle_free): Expect thread ID parameter and use it to
2007         validate the thread decsriptor.  Don't use detached queue.
2008         Patches by Xavier Leroy.
2009
2010 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2011
2012         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2013         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2014         __pthread_atfork, __pthread_key_create, __pthread_once.
2015         * internals.h: Doc fix.
2016         * pthread.c (__pthread_initialize): Define again.
2017
2018 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2019
2020         * manager.c (pthread_exited): If thread is not detached put it on
2021         special list.
2022         (pthread_handle_free): If thread is not on list with living threads
2023         search on list with detached threads.
2024
2025         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2026         for new definition of pthread_rwlock_t.
2027
2028         * spinlock.c: Correct test whether to compile
2029         __pthread_compare_and_swap or not.
2030
2031 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2032
2033         * attr.c: Finish user stack support.  Change locking code to be safe
2034         in situations with different priorities.
2035         * cancel.c: Likewise.
2036         * condvar.c: Likewise.
2037         * internals.h: Likewise.
2038         * join.c: Likewise.
2039         * manager.c: Likewise.
2040         * mutex.c: Likewise.
2041         * pthread.c: Likewise.
2042         * ptlongjmp.c: Likewise.
2043         * queue.h: Likewise.
2044         * rwlock.c: Likewise.
2045         * semaphore.c: Likewise.
2046         * semaphore.h: Likewise.
2047         * signals.c: Likewise.
2048         * spinlock.c: Likewise.
2049         * spinlock.h: Likewise.
2050         * sysdeps/pthread/pthread.h: Likewise.
2051         Patches by Xavier Leroy.
2052
2053         * sysdeps/i386/i686/pt-machine.h: New file.
2054
2055 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
2056
2057         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2058         [sg]et_stackaddr prototypes always available.
2059
2060         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2061         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2062
2063 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
2064
2065         * manager.c (pthread_free): Undo patch from 980430.
2066         Reported by David Wragg <dpw@doc.ic.ac.uk>.
2067
2068 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
2069
2070         * manager.c: Define __pthread_manager_adjust_prio and use it to
2071         increase priority when needed.
2072         * internals.h: Add prototype for __pthread_manager_adjust_prio.
2073         * mutex.c: Optimize mutexes to wake up only one thread.
2074         * pthread.c: Move PID of manager for global variable in structure
2075         element.
2076         Patches by Xavier Leroy.
2077
2078 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
2079
2080         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2081
2082 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2083
2084         * attr.c: Correct typo.
2085
2086 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
2087
2088         * manager.c (pthread_free): Unmap guard before the stack.
2089         Patch by Matthias Urlichs.
2090
2091 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
2092
2093         * manager.c (pthread_free): Detect already free child.
2094         Patch by Xavier Leroy, reported by Matthias Urlichs.
2095
2096 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2097
2098         * Makefile (linuxthreads-version): Renamed back from
2099         libpthread-version.
2100
2101 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2102
2103         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2104         __libc_longjmp.
2105
2106 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2107
2108         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2109         * internals.h: Add definitions for new spinlock implementation.
2110         * ptlongjmp.c: New file.
2111         * spinlock.c: New file.
2112         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2113         new function __pthread_acquire to prevent deadlocks with thread
2114         with different priorities.
2115         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2116
2117 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2118
2119         * manager.c (__pthread_manager): Reduce first argument to select
2120         to include just the needed file descriptor.
2121
2122 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2123
2124         * manager.c: Fix last patch which caused core dumps.
2125
2126         * pthread.c: Correctly handle missing SIGRTMIN.
2127
2128 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2129
2130         * libpthread.map: Add __libc_internal_tsd_get and
2131         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2132         libc internal versions of the cancelable functions.
2133
2134 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2135
2136         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2137
2138 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2139
2140         * attr.c: Implement pthread_attr_[gs]etguardsize,
2141         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2142         Change pthread_attr_init to have two interfaces.
2143         * internals.h (struct _pthread_descr_struct): Add new fields for
2144         above functions.
2145         * libpthread.map: Add names in GLIBC_2.1 section.
2146         * manager.c (pthread_handle_create): Implement guardsize and
2147         user stack.
2148         (pthread_free): Likewise.
2149         * pthread.c (pthread_create): Add new interface for changed
2150         pthread_attr_t.
2151         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2152         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2153         PTHREAD_STACK_MIN.
2154
2155 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2156
2157         * manager.c: Enable resetting of the thread scheduling policy
2158         to SCHED_OTHER when the parent thread has a different one.
2159
2160 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2161
2162         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2163         _POSIX_ASYNCHRONOUS_IO.
2164
2165         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2166         mutexes.
2167         * mutex.c: Implement new mutex types.
2168
2169         * internals.h: Include <signal.h>.
2170
2171         * libpthread.map: Add __erno_location and __h_errno_location.
2172
2173         * errno.c: Return pointer to variable actually in use.  This might
2174         not be the one in the thread structure.
2175         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2176         and p_h_errnop.
2177         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2178         of manager thread structure.
2179         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2180         thread.
2181         * pthread.c: Adapt initializer for thread structures.
2182         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2183         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2184         current thread to global variables.
2185
2186 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2187
2188         * rwlock.c: New file.
2189         * Makefile (libpthread-routines): Add rwlock.
2190         * sysdeps/pthread/pthread.h: Define data structures and declare
2191         functions.
2192         * libpthread.map: Add new functions.
2193
2194 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2195
2196         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2197         * sysdeps/arm/Implies: likewise.
2198         * README: Document it.
2199
2200 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2201
2202         * signals.c: Remove unneeded initializer for sigwaited, saving a
2203         warning.
2204
2205 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2206
2207         * semaphore.c (sem_init): Set sem_spinlock only if available.
2208
2209 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2210
2211         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2212         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2213
2214         * Makefile: Update from LinuxThreads 0.7.
2215         * internals.h. Likewise.
2216         * manager.c: Likewise.
2217         * mutex.c: Likewise.
2218         * pthread.c: Likewise.
2219         * signals.c: Likewise.
2220         * specific.c: Likewise.
2221         * Examples/ex3.c: Likewise.
2222
2223 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
2224
2225         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2226         open.
2227
2228 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
2229
2230         * wrapsyscall.c: Add socket functions which are also cancelation
2231         points.
2232
2233 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
2234
2235         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2236         New functions for fast thread specific data within libc.
2237
2238         * internals.h: Add new array p_libc_specific to struct
2239         _pthread_descr_struct.
2240
2241         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2242
2243 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
2244
2245         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2246         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2247
2248 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
2249
2250         * internals.h (struct _pthread_descr_struct): Add definitions for
2251         two-level specific key handling.
2252         * manager.c (pthread_handle_create): Initialize specific memory array.
2253         * specific.c: Implement two-level key handling.
2254         * weaks.c: Don't provide dummy key handling.
2255         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2256         Add definition of __libc_key_t.
2257         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2258         as 1024.
2259         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2260         PTHREAD_DESTRUCTOR_ITERATIONS.
2261
2262         * manager.c (pthread_handle_create): Compare mmap result with
2263         MAP_FAILED.
2264
2265         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2266         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2267
2268 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
2269
2270         sysdeps/sparc -> sysdeps/sparc/sparc32
2271         sysdeps/sparc64 -> sysdeps/sparc/sparc64
2272
2273         * internals.h: Change definition of THREAD_SELF to be an expression,
2274         not a statement that did a return.
2275         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2276         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2277         Follow Solaris and use a "system reserved" register (%g6) to hold
2278         the thread descriptor.
2279         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2280
2281 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
2282
2283         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
2284         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2285         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2286
2287         * semaphore.c: Include spinlock.h only when needed.
2288
2289         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2290         keys for entries not in use.
2291
2292         * weaks.c: Implement key handling functions for real.
2293
2294 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
2295
2296         Initial sparc64-linux support:
2297         * sysdeps/sparc64/Implies: New file.
2298         * sysdeps/sparc64/pt-machine.h: Likewise.
2299
2300 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
2301
2302         * semaphore.c: Include spinlock.h at correct place.
2303         Patch by HJ Lu.
2304
2305 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
2306
2307         The Great Bit File Move:
2308         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2309         * sysdeps/powerpc/semaphorebits.h: Likewise.
2310         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2311         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2312         * sysdeps/pthread/libc-lock.h: -> bits/
2313         * sysdeps/pthread/stdio-lock.h: Likewise.
2314         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2315         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2316         * semaphore.h: Likewise.
2317         * sysdeps/pthread/pthread.h: Likewise.
2318
2319         * lockfile.c: <foo.h> -> <bits/foo.h>.
2320         * semaphore.h: Likewise.
2321
2322         * Makefile: (headers): foo.h -> bits/foo.h.
2323         * sysdeps/pthread/Makefile: Likewise.
2324
2325 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2326
2327         * semaphore.c (sem_init): Set sem_spinlock only if available.
2328
2329         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2330         asm constraints.
2331
2332 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
2333
2334         Update from LinuxThreads 0.6.
2335
2336         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2337         and __sched_get_priority_min instead of names without `__'.
2338
2339         * manager.c: Rewrite large parts to implement opaque pthread_t.
2340
2341         * cancel.c: Adapt for opaque pthread_t type.
2342         * condvar.c: Likewise.
2343         * errno.c: Likewise.
2344         * join.c: Likewise.
2345         * mutex.c: Likewise.
2346         * pthread.c: Likewise.
2347         * signals.c: Likewise.
2348         * specific.c: Likewise.
2349         * restart.h: Likewise.
2350         * queue.h: Likewise.
2351         * Examples/ex3.c: Likewise.
2352         * Examples/ex4.c: Likewise.
2353         * sysdeps/pthread/pthread.h: Likewise.
2354
2355         * pthread.c: Accumulate time for all threads in thread manager.
2356
2357         * semaphore.c: Implement fallback implementation for architectures
2358         sometimes missing compare-exchange operations.
2359
2360         * cancel.c (pthread_cancel): Validate handle argument.
2361         * join.c (pthread_join): Likewise.
2362         (pthread_detach): Likewise.
2363         * signals.c (pthread_kill): Likewise.
2364
2365         * spinlock.h (acquire): Use __sched_yield not sched_yield.
2366
2367         * queue.h (enqueue): Enqueue thread according to priority.
2368
2369         * internals.c (struct pthread_start_args): New struct for passing
2370         args to cloning function.
2371         (struct _pthread): Rename to _pthread_descr_struct and adapt for
2372         opaque pthread_t.
2373
2374         * Examples/Makefile (clean): Pass -f option to rm.
2375
2376         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2377         and define TEST_FOR_COMPARE_AND_SWAP.
2378         * sysdeps/i386/i486/pt-machine.h: Removed.
2379
2380         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2381         to 1024.
2382
2383 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
2384
2385         * restart.h (suspend): Clear p_signal before suspending.
2386         (suspend_with_cancellation): Likewise.
2387         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2388
2389         * weaks.c: Make __pthread_key_create return 1.
2390         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2391         __libc_getspecific, __libc_setspecific, and __libc_key_t.
2392         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2393         using libio.
2394
2395 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
2396
2397         * sysdeps/sparc/pt-machine (RELEASE): Fix.
2398
2399 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
2400
2401         * sysdeps/powerpc/Implies: Added.
2402         * sysdeps/powerpc/pt-machine.h: Added.
2403         * sysdeps/powerpc/semaphorebits.h: Added.
2404
2405 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
2406
2407         * pthread.c (__pthread_initial_thread): Correct
2408         initializer.
2409         (__pthread_manager_thread): Likewise.
2410         Reported by Andreas Jaeger.
2411
2412 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
2413
2414         Since sigset_t no longer fits in a register, we can't pass in the
2415         thread's initial mask so easily.  Take this opportunity to simplify
2416         the clone implementation by only accepting a single void* argument.
2417
2418         * manager.c (__pthread_manager): Put thread vitals in the thread
2419         struct instead of as arguments through clone.
2420         (pthread_start_thread): Look for them there.
2421         * internals.h (struct _pthread): Add p_initial_fn,
2422         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
2423         * pthread.c (pthread_initialize_manager): Revise clone invocation.