9153fb9f61a28bce9a132930b78b4bd9b01e8627
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2001-06-15  H.J. Lu  <hjl@gnu.org>
2
3         * pthread.c (__pthread_reset_main_thread): Fix a typo.
4
5 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
6
7         * semaphore.h: Use struct _pthread_fastlock as an element of
8         sem_t instead of an identical struct.
9         * rwlock.c: Remove casts.
10         * semaphore.c: Likewise.
11
12 2001-04-30  Alan Modra  <amodra@one.net.au>
13
14         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
15
16 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
17
18         * linuxthreads.texi: Spelling corrections.
19
20 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
21
22         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
23         returning successfully.
24         Patch by Gene Cooperman <gene@ccs.neu.edu>.
25
26 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
27
28         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
29         serious work try once whether the lock is uncontested.
30         Remove duplicate reading of __status before loop.
31         Change suggested by Hans Boehm <hans_boehm@hp.com>.
32
33         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
34         (__pthread_alt_trylock): Likewise.
35
36 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
37
38         Memory barrier overhaul following line by line inspection.
39         * mutex.c (pthread_once): Missing memory barriers added.
40         * pthread.c (__pthread_wait_for_restart_signal,
41         __pthread_timedsuspend_new, __pthread_restart_new): Added
42         memory barriers ``just in case'' and for documentary value.
43         * spinlock.c (__pthread_release): New inline function for releasing
44         spinlock, to complement __pthread_acquire.  Includes memory
45         barrier prior to assignment to spinlock, and __asm __volatile
46         dance to prevent reordering or optimization of the spinlock access.
47         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
48         __pthread_alt_timedlock, __pthread_alt_unlock,
49         __pthread_compare_and_swap): Updated to use new __pthread_release
50         instead of updating spinlock directly.
51         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
52         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
53         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
54         Memory barrier overhaul.  Lots of missing memory barriers added,
55         a couple needless ones removed.
56         * spinlock.c (__pthread_compare_and_swap): testandset optimization
57         removed, just calls __pthread_acquire, which has the new read
58         barrier in it before its testandset.
59
60 2001-05-20  Roland McGrath  <roland@frob.com>
61
62         * Makeconfig: New file, variables used to be in main libc Makeconfig.
63
64 2001-05-09  Geoff Keating  <geoffk@redhat.com>
65
66         * sysdeps/powerpc/pt-machine.h
67         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
68         (__compare_and_swap): Remove memory barriers.
69         (__compare_and_swap_with_release_semantics): New function.
70
71 2001-04-24  Andreas Jaeger  <aj@suse.de>
72
73         * wrapsyscall.c: send* and recv* return ssize_t.
74
75         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
76         mutex instead of double locking it.
77         Reported by Pierre Artaud <partaud@sodatec.com>.
78
79 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
80
81         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
82         using #ifdef whether the clock is available.
83         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
84
85         * sysdeps/ia64/Versions: New file.
86
87         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
88         have to call __gmon_start__ in the libpthread DSO.
89         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
90
91         * Makefile (libpthread-routines): Add ptclock_gettime and
92         ptclock_settime.
93         * internals.h: Don't use cpuclock-init.h definitions, use
94         hp-timing.h definitions.
95         * pthread.c: Likewise.
96         * manager.c: Likewise.
97         * ptclock_gettime.c: New file.
98         * ptclock_settime.c: New file.
99         * internals.h: Fix parameter type for __pthread_clock_gettime and
100         __pthread_clock_settime.
101
102         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
103         * sysdeps/i386/i586/ptclock_settime.c: Removed.
104         * sysdeps/i386/i586/Makefile: Removed.
105
106 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
107
108         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
109         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
110
111 2001-04-21  Andreas Jaeger  <aj@suse.de>
112
113         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
114         attribute, remove statements that will never be executed.
115         (thread_func): Remove mutex_unlock call since it's never executed.
116         (thread_func): Fix comment as suggested by Jakub Jelinek.
117
118         * manager.c (__pthread_manager): Add noreturn
119         attribute.
120         (pthread_start_thread): Likewise, remove return statement.
121         (pthread_start_thread_event): Likewise.
122         Add noreturn attribute for pthread_handle_exit.
123         * weaks.c: Add noreturn attribute for pthread_exit.
124
125         * internals.h: Add __pthread_clock_gettime and
126         __pthread_clock_settime prototypes.
127
128 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
129
130         * internals.h: Include <cpuclock-init.h>.
131         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
132         CPUCLOCK_VARDEF is defined.
133         * pthread.c (__pthread_initialize_minimal): Initialize
134         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
135         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
136         for new thread to current CPU clock value.
137
138         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
139
140         * sysdeps/i386/i586/Makefile: New file.
141         * sysdeps/i386/i586/Versions: New file.
142         * sysdeps/i386/i586/ptclock_gettime.c: New file.
143         * sysdeps/i386/i586/ptclock_settime.c: New file.
144         * sysdeps/i386/i686/Implies: New file.
145
146 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
147
148         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
149         $generated, not $postclean-generated.
150
151 2001-04-18  Andreas Jaeger  <aj@suse.de>
152
153         * Makefile (otherlibs): Added.
154
155 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
156
157         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
158
159 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
160
161         * signals.c (sigwait): NSIG is no signal number.  Block all
162         signals while in signal handler for signals in SET.
163         Patch by Manfred Spraul <manfred@colorfullife.com>.
164
165 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
166
167         * tst-cancel.c: Disable most tests.  Add new test where all
168         cleanup handlers must run.
169         * Makefile (tests): Add tst-cancel again.
170
171         * cancel.c (__pthread_perform_cleanup): Correct condition for
172         leaving cleanup loop early.
173
174         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
175         all the files which use CURRENT_STACK_FRAME.
176         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
177         __builtin_frame_address.
178         * sysdeps/i386/i686/pt-machine.h: Likewise.
179
180 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
181
182         * Makefile (tests): Comment out tst-cancel for now.
183
184         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
185         temporary file in object directory.
186         * Makefile: Don't allow inlining when compiling tst-cancel.c.
187         Pass $(objpfx) to tst-cancel.
188
189 2001-04-11  David S. Miller  <davem@redhat.com>
190
191         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
192         up closer to user local variables so that new cleanup heuristics work.
193         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
194
195 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
196
197         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
198         and remove it.
199         (_pthread_cleanup_push_defer): Likewise.
200
201         * tst-cancel.c (main): Fix loop printing cleanup output.
202
203 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
204
205         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
206         test.
207         (__pthread_spin_trylock): Likewise.
208         * sysdeps/sh/pt-machine.h (testandset): Likewise.
209
210 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
211
212         * join.c (pthread_exit): Move code to new function __pthread_do_exit
213         which takes an extra parameter with the current frame pointer.
214         Call new function with CURRENT_STACK_FRAME.
215         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
216         with the new parameter.
217         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
218         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
219         this parameter as the initial value the cleanup handler records are
220         compared against.  No active cleanup handler record must have an
221         address lower than the previous one and the initial record must be
222         above (below on PA) the frame address passed in.
223         (pthread_setcancelstate): Call __pthread_do_exit instead of
224         pthread_exit.
225         (pthread_setcanceltype): Likewise.
226         (pthread_testcancel): Likewise.
227         (_pthread_cleanup_pop_restore): Likewise.
228         * condvar.c (pthread_cond_wait): Likewise.
229         (pthread_cond_timedwait_relative): Likewise.
230         * manager.c (pthread_start_thread): Likewise.
231         * oldsemaphore.c (__old_sem_wait): Likewise.
232         * pthread.c (pthread_handle_sigcancel): Likewise.
233         * semaphore.c (__new_sem_wait): Likewise.
234         (sem_timedwait): Likewise.
235         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
236         to limit the cleanup handlers which get run.
237         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
238         for __pthread_perform_cleanup.
239
240         * Makefile (tests): Add tst-cancel.
241         * tst-cancel.c: New file.
242
243 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
244
245         * sysdeps/cris/pt-machine.h: New file.
246         * sysdeps/cris/pspinlock.c: New file.
247
248 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
249
250         * shlib-versions: Add case for Linux on CRIS.
251
252 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
253
254         * attr.c (pthread_getattr_np): Correct computation of stack size
255         for machiens with register stack.
256
257         * Examples/ex17.c (main): Correct detection of failed mmap call.
258
259 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
260
261         * pthread.c (__pthread_initialize_manager): Fix a typo.
262
263 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
264
265         * attr.c (__pthread_attr_setstack): Fix alignment check.
266         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
267         * Makefile (tests): Add ex17 test.
268         * Examples/ex17.c: New test.
269
270 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
271
272         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
273         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
274         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
275
276 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
277
278         * Makefile: When generating DSO link with libc_nonshared.a.
279
280 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
281
282         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
283
284 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
285
286         * internals.h (__pthread_init_max_stacksize): New prototype.
287         * attr.c (__pthread_attr_setstacksize): Call
288         __pthread_init_max_stacksize if not yet initialized.
289         * pthread.c (__pthread_init_max_stacksize): New function.
290         (__pthread_initialize_manager): Call it.
291         Patch by <dtc@cmucl.cons.org>.
292
293 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
294
295         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
296
297 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
298
299         * shlib-versions: Add rule for Linux on 64 bit S/390.
300         * sysdeps/s390/s390-64/pt-machine.h: New file.
301         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
302
303 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
304
305         * sysdeps/s390/pt-machine.h: Move to...
306         * sysdeps/s390/s390-32/pt-machine.h: ...here.
307         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
308
309 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
310
311         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
312         * attr.c: Implement pthread_getattr_np.
313         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
314         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
315         * manager.c (pthread_handle_create): Initialize p_inheritsched.
316
317 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
318
319         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
320         code alignment.
321
322 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
323
324         * manager.c (manager_mask): Removed static vesion.  Now always local
325         to __pthread_manager().
326         (manager_mask_all): Removed completely.
327         (__pthread_manager): Remove manager_mask_all initialization.
328         (pthread_handle_create): Remove code to set and reset signal mask
329         around __clone2() calls.
330
331 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
332
333         * spinlock.c (__pthread_lock): Force lock->__status to be read from
334         memory on every spin.
335
336 2001-02-10  Andreas Jaeger  <aj@suse.de>
337
338         * Makefile (extra-objs): New.
339
340 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
341
342         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
343         __pthread_initialize_minimal prototype.
344
345 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
346
347         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
348
349 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
350
351         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
352
353 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
354
355         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
356         broken code.  Patch by Jes Sorensen.
357
358 2001-02-06  Andreas Jaeger  <aj@suse.de>
359
360         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
361         to...
362         * internals.h: ...here.
363
364 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
365
366         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
367
368 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
369
370         * Versions: Remove __pthread_initialize_minimal.
371
372 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
373
374         * Makefile: Add rules to build crti.o and make it being used in
375         building libpthread.so.
376         * sysdeps/i386/Makefile: New file.
377         * sysdeps/pthread/pt-initfini.c: New file.
378
379         * pthread.c: Cleanups.
380
381 2001-01-28  Andreas Jaeger  <aj@suse.de>
382
383         * oldsemaphore.c (__old_sem_init): Adjust for last change.
384         * sysdeps/pthread/bits/libc-lock.h: Likewise.
385         * spinlock.c: Likewise.
386
387 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
388
389         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
390         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
391         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
392         * pthread.c: Likewise.
393         * spinlock.h: Likewise.
394         * sysdeps/pthread/pthread.h: Likewise.
395
396 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
397
398         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
399         as struct __pthread_attr_s.
400
401         * semaphore.h (sem_t): Cleanup namespace, rename status and
402         spinlock elements.
403
404 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
405
406         * pthread.c (pthread_onexit_process): Clear
407         __pthread_manager_thread_bos after freeing it.
408         * Makefile (tests): Add ex16.
409         * Examples/ex16.c: New file.
410
411 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
412
413         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
414         -z nodelete.
415         * pthread.c (pthread_exit_process): Rename to...
416         (pthread_onexit_process): ...this.
417         (pthread_atexit_process, pthread_atexit_retcode): New.
418         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
419         and only if HAVE_Z_NODELETE is not defined.
420         (__pthread_initialize_manager): Register pthread_atexit_retcode
421         with __cxa_atexit.
422
423 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
424
425         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
426
427 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
428
429         * Makefile (tests): Add ex15.
430         * Examples/ex15.c: New test.
431
432 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
433
434         * pthread.c (pthread_exit_process): Free memory allocated for
435         manager stack.
436
437 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
438
439         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
440         (pthread_free): Always unmap the stack.  It's safe now that we don't
441         use MAP_FIXED to allocate stacks.
442
443 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
444
445         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
446
447         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
448
449 2000-11-15  Wolfram Gloger  <wg@malloc.de>
450
451         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
452         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
453
454 2000-12-27  Andreas Jaeger  <aj@suse.de>
455
456         * Examples/ex13.c: Make local functions static.
457         * ecmutex.c: Likewise.
458         * joinrace.c: Likewise.
459         * Examples/ex14.c: Likewise.
460
461         * Examples/ex2.c: Make local functions static; reformat.
462         * Examples/ex1.c: Likewise.
463         * Examples/ex4.c: Likewise.
464         * Examples/ex5.c: Likewise.
465         * Examples/ex7.c: Likewise.
466
467         * oldsemaphore.c: Add prototypes to shut up GCC.
468         * pt-machine.c: Likewise.
469
470         * weaks.c: Add prototype for pthread_exit.
471
472         * internals.h: Add some prototypes, format prototypes and add
473         missing externs.
474         Move __libc_waitpid prototype to include/sys/wait.h.
475
476         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
477         * mutex.c: Likewise.
478         * specific.c: Likewise.
479         * ptfork.c: Likewise.
480
481         * lockfile.c: Include internals.h to get prototypes.
482         * events.c: Likewise.
483         * sysdeps/alpha/pspinlock.c: Likewise.
484         * sysdeps/arm/pspinlock.c: Likewise.
485         * sysdeps/hppa/pspinlock.c: Likewise.
486         * sysdeps/i386/pspinlock.c: Likewise.
487         * sysdeps/ia64/pspinlock.c: Likewise.
488         * sysdeps/m68k/pspinlock.c: Likewise.
489         * sysdeps/mips/pspinlock.c: Likewise.
490         * sysdeps/powerpc/pspinlock.c: Likewise.
491         * sysdeps/s390/pspinlock.c: Likewise.
492         * sysdeps/sh/pspinlock.c: Likewise.
493         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
494         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
495         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
496
497 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
498
499         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
500         (__pthread_attr_getstack): Return correct address.
501         Add warnings for using pthread_attr_getstackaddr and
502         pthread_attr_setstackaddr.
503
504 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
505
506         * Examples/ex6.c (test_thread): Make static.
507         * Examples/ex12.c (test_thread): Make static and add noreturn
508         attribute.
509
510 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
511
512         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
513         and compare_and_swap_with_release_semantics returns int not long.
514
515 2000-12-17  Andreas Jaeger  <aj@suse.de>
516
517         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
518         value.
519         * sysdeps/arm/pt-machine.h (testandset): Likewise.
520         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
521         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
522         * sysdeps/sh/pt-machine.h (testandset): Likewise.
523         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
524         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
525
526 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
527
528         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
529         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
530
531 2000-12-17  Andreas Jaeger  <aj@suse.de>
532
533         * internals.h: Add prototypes for testandset and
534         __compare_and_swap to shut up gcc warnings.
535
536 2000-12-06  Wolfram Gloger  <wg@malloc.de>
537
538         * join.c (pthread_detach): Allow case where the thread has already
539         terminated.
540
541 2000-12-05  Andreas Jaeger  <aj@suse.de>
542
543         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
544         * sysdeps/mips/pt-machine.h (testandset): Likewise.
545         (__compare_and_swap): Likewise.
546         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
547
548 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
549
550         * Examples/ex3.c (main): Cast int to long before casting to void *.
551         (search): Cast void * to long, not int.
552         * Examples/ex8.c (main, thread): Similarly.
553         * Examples/ex11.c (main): Similarly.
554         * Examples/ex14.c (worker, do_test): Similarly.
555         * ecmutex.c (worker, do_test): Similarly.
556         (nlocks): Cast to int.
557
558 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
559
560         * linuxthreads.texi:  Add documentation for pthreads attributes
561         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
562         patch.  Document pthread_[sg]etconcurrency().  Mark
563         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
564
565 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
566
567         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
568         Don't define it.
569         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
570         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
571
572 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
573
574         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
575         not doing it right now.
576         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
577
578 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
579
580         * Examples/ex4.c (main): Don't use exit() to avoid warning with
581         broken compilers.
582
583 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
584
585         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
586         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
587
588         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
589         discussing mutexes. (As per the Unix98 name for the API.)
590         Changes documentation for pthread_mutexattr_setkind_np() and
591         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
592         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
593         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
594         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
595         Begins to introduce discussion of the ``timed'' mutex type.  This
596         discussion is currently incomplete.
597         Patch by Bruce Mitchener <bruce@cubik.org>.
598
599 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
600             Yutaka Niibe  <gniibe@chroot.org>
601
602         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
603         has restrictions, use register.
604
605 2000-10-23  Andreas Schwab  <schwab@suse.de>
606
607         * Examples/ex14.c (TIMEOUT): Override default timeout.
608
609 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
610
611         * specific.c: Protect tsd array modification in thread data
612         structures by getting the thread lock in pthread_key_delete and
613         __pthread_destroy_specifics.
614         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
615
616 2000-10-12  Alan Modra <alan@linuxcare.com.au>
617
618         * sysdeps/pthread/bits/initspin.h: New file.
619         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
620         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
621         (__pthread_alt_init_lock): Likewise.
622         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
623
624 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
625
626         * oldsemaphore.c (__old_sem_init): Release lock with
627         LT_SPINLOCK_INIT, not zero.
628         * spinlock.c (__pthread_unlock): Likewise.
629         (__pthread_alt_lock): Likewise.
630         (__pthread_alt_timedlock): Likewise.
631         (__pthread_alt_unlock): Likewise.
632         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
633         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
634         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
635         LT_SPINLOCK_INIT do initialize spinlocks not 0.
636
637 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
638
639         * shlib-versions: Add version definitions for hppa-linux.
640
641 2000-10-12  Alan Modra <alan@linuxcare.com.au>
642
643         * sysdeps/hppa/pspinlock.c: New file.
644         * sysdeps/hppa/pt-machine.h: New file.
645         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
646
647 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
648
649         * mutex.c (__pthread_mutex_destroy): Correct test of
650         busy mutex for mutexes using alternate fastlocks.
651         Patch by dtc@cmucl.cons.org.
652
653 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
654
655         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
656
657 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
658
659         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
660         test for owner first.
661         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
662
663         * cancel.c (pthread_cancel): Don't do anything if cancelation is
664         disabled.
665
666 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
667
668         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
669         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
670
671         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
672         _POSIX_MONOTONIC_CLOCK.
673
674         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
675         and explain why.
676
677 2000-09-20  Andreas Jaeger  <aj@suse.de>
678
679         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
680         "testrtsig.h" conditional.
681
682 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
683
684         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
685         pthread_attr_setstack.
686         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
687         pthread_attr_setstack.
688         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
689
690 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
691
692         * Examples/ex14.c: New file.
693         * Makefile (tests): Add ex14.
694
695         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
696         mutex.  Patch by dtc@cmucl.cons.org.
697
698         * ecmutex.c: New file.
699         * Makefile (tests): Add ecmutex.
700
701 2000-09-04  H.J. Lu  <hjl@gnu.org>
702
703         * attr.c (__pthread_attr_setguardsize): Use page_roundup
704         instead of roundup to round up to the page size.
705
706 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
707
708         * manager.c (pthread_exited): Correctly report event as TD_REAP
709         instead of TD_DEATH.  Fix comments.
710
711 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
712
713         * spinlock.h (testandset): Add cast to avoid warning.
714         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
715
716 2000-09-02  Andreas Jaeger  <aj@suse.de>
717
718         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
719         prototype.
720
721 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
722
723         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
724         Fix typo in last patch (_mode -> _flags).
725
726         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
727         Provide definition which respects _IO_USER_LOCK flag.
728
729 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
730
731         * manager.c (pthread_allocate_stack): Clear descriptor only if not
732         mmaped.
733
734 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
735
736         * Makefile: Add rules to build and run unload.
737         * unload.c: New file.
738
739         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
740
741         * sysdeps/pthread/pthread.h
742         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
743         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
744
745 2000-08-24  Andreas Jaeger  <aj@suse.de>
746
747         * Examples/ex13.c: Include <string.h> for strerror prototype and
748         <stdlib.h> for abort prototype.
749         (pthr_cond_signal_mutex): Rewrite to silence GCC.
750         (thread_start): Remove unused variable err.
751         (main): Silence GCC warnings.
752
753 2000-08-22  Andreas Jaeger  <aj@suse.de>
754
755         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
756
757         * Makefile (tests): Add ex13.
758
759 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
760
761         * semaphore.h: Add restrict where required by AGd4.
762         * sysdeps/pthread/pthread.h: Likewise.
763         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
764
765 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
766
767         * Makefile (tests): Add ex12.  Add rule to build it.
768         * Examples/ex12.c: New file.
769
770 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
771
772         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
773         even though the implementation is not quite complete (but it reports
774         it).  Define _POSIX_MESSAGE_PASSING to -1.
775         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
776
777 2000-08-12  Andreas Jaeger  <aj@suse.de>
778
779         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
780         assembler.
781         (__compare_and_swap): Likewise.
782         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
783
784 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
785
786         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
787         p_h_errnop correctly and not to NULL.
788
789 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
790
791         * Banner: Bump version number to 0.9.
792
793 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
794
795         * Makefile (tests): Add tststack.  Add rule to build the program.
796         * tststack.c: New file.
797
798         * internals.h: Declare __pthread_max_stacksize.
799         * pthread.c (__pthread_max_stacksize): New variable.
800         (__pthread_initialize_manager): Determine __pthread_initialize_manager
801         value.
802         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
803         (pthread_allocate_stack): Allow kernel to choose stack address if
804         FLOATING_STACKS.  This also handles variable-sized stacks.
805         Always allocate stack and guardpage together.  Use mprotect to
806         change guardpage access.
807         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
808         ARCH_STACK_MAX_SIZE.
809
810         * attr.c (__pthread_attr_setstacksize): Also test value against
811         upper limit.
812
813         * manager.c (__pthread_nonstandard_stacks): Define only if
814         THREAD_SELF is not defined.
815         (pthread_allocate_stack): Always initialize gardaddr to a correct
816         value.
817         (pthread_handle_create): Unmap thread with one call.
818         (pthread_free): Remove test for initial thread before removing stack.
819         Unmap stack with one call.
820
821         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
822         1 to avoid removing the stack.
823
824 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
825
826         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
827         load of spin lock to prime the cache before the atomic compare and
828         exchange operation (cmpxchg4). This avoids the spinning on the
829         cmpxchg4 instruction and reduces movement of the cache line back
830         and forth between the processors (explanation by Asis K. Mallick
831         from Intel). This basically makes the implementation operate the
832         same as the Linux kernel implementation.
833
834         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
835         * sysdeps/ia64/pspinlock.c: New file.
836
837 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
838
839         * pthread.c: Move definition of __pthread_set_own_extricate_if...
840         * spinlock.h: ...here.  Remove locking.
841         * internals.h: Remove __pthread_set_own_extricate_if prototype.
842
843         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
844         (rwlock_rd_extricate_func): Don't determine self, let
845         __pthread_lock do it.
846         (rwlock_wr_extricate_func): Likewise.
847         (rwlock_have_already): Optimize *pself handling a bit.
848
849         * mutex.c: Use __builtin_expect.
850         * pthread.c: Likewise.
851
852 2000-08-02  Andreas Jaeger  <aj@suse.de>
853
854         * sysdeps/s390/pspinlock.c: New file.
855         * sysdeps/s390/pt-machine.h: New file.
856         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
857
858 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
859
860         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
861         R3K.
862         * sysdeps/mips/pt-machine.h (testandset): Likewise.
863
864 2000-07-26  Andreas Jaeger  <aj@suse.de>
865
866         * pthread.c: Initialize p_sem_avail.
867
868 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
869
870         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
871         * semaphore.c: Handle spurious wakeups.
872
873         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
874         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
875
876         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
877         (__pthread_wait_for_restart): Likewise.
878
879         * condvar.c (pthread_cond_wait): Also check whether thread is
880         cancelable before aborting loop.
881         (pthread_cond_timedwait): Likewise.
882
883         * signals.c (pthread_sighandler): Remove special code to restrore
884         %gs on x86.
885         (pthread_sighandler_t): Likewise.
886
887 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
888
889         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
890         * pthread.c: Include <resolv.h>.
891         (_res): Undefine.  Add extern declaration.
892
893 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
894
895         * pthread.c (__pthread_initial_thread): Update initializer.
896         (__pthread_manager_thread): Likewise.
897         (pthread_initialize): Move setrlimit call to...
898         (__pthread_initialize_manager): ...here.
899         (__pthread_reset_main_thread): Reset also soft limit on stack size.
900
901         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
902         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
903
904 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
905
906         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
907         __compare_and_swap to define testandset.
908         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
909         Define IMPLEMENT_TAS_WITH_CAS.
910
911 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
912
913         * Makefile: Pass -z nodelete to linker for libpthread.so
914         generation if it understand this option.
915
916 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
917
918         * manager.c (pthread_handle_create): Remove initialization of
919         new_thread->p_res._sock.
920
921 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
922
923         Bugfixes to the variant of the code for machines with no compare
924         and swap.
925
926         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
927         node was not being properly enqueued, due to failing to update
928         the lock->__status field.
929
930         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
931         being set inappropriately, causing the suspend function to be called
932         with a null self pointer and crash.
933
934 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
935
936         * spinlock.h (__pthread_alt_trylock): Fix code used if no
937         compare&swap is available.
938
939         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
940         compare_and_swap.
941
942         * pthread.c (pthread_initialize): Don't use sysconf to determine
943         whether the machine has more than one processor.
944
945         * spinlock.c (__pthread_alt_timedlock): Add back one of the
946         removed thread_self calls.
947
948 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
949
950         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
951         __compare_and_swap to compare_and_swap in code which assumes
952         compare swap is available.
953
954 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
955
956         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
957         bug whereby thr field of waitnode structure would not be correctly
958         set unless a null self pointer is passed to the functions.
959         Eliminated redundant calls to thread_self().
960
961 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
962
963         * pthread.c (__pthread_initialize_manager): Lock
964         __pthread_manager_thread.p_lock before calling clone.
965
966 2000-05-05  H.J. Lu  <hjl@gnu.org>
967
968         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
969         have acquire semantics.
970         (__compare_and_swap_with_release_semantics): New inline
971         function.
972         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
973
974 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
975
976         * manager.c: Fix the problem with signals at startup.
977         Change the way that thread stacks are allocated on IA64.
978         Clean up some of the guard page allocation stuff.
979
980 1999-12-19  H.J. Lu  <hjl@gnu.org>
981
982         * internals.h (page_roundup): New.
983         * attr.c (__pthread_attr_setguardsize); Use page_roundup
984         instead of roundup.
985         * manager.c (pthread_allocate_stack): Make sure guardaddr is
986         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
987         is define.
988
989 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
990
991         * manager.c (pthread_allocate_stack): Unmap the stack top
992         if failed to map the stack bottom.
993         Fix the guard page.
994         (pthread_free): Fix the guard page.
995
996         * pthread.c (pthread_initialize): Set rlimit correctly for
997         NEED_SEPARATE_REGISTER_STACK.
998
999 1999-12-16  H.J. Lu  <hjl@gnu.org>
1000
1001         * pthread.c (__pthread_initialize_manager): Pass
1002         __pthread_manager_thread_bos instead of
1003         __pthread_manager_thread_tos to __clone2.
1004
1005 1999-12-16  H.J. Lu  <hjl@gnu.org>
1006
1007         * manager.c (pthread_allocate_stack): Correct the calculation
1008         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1009         stack bottom.
1010
1011 1999-12-13  H.J. Lu  <hjl@gnu.org>
1012
1013         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1014         bit after setting ar.ccv.
1015
1016 1999-12-12  H.J. Lu  <hjl@gnu.org>
1017
1018         * manager.c (pthread_allocate_stack): Make the starting
1019         address of the stack bottom page aligned. FIXME: it may
1020         need changes in other places.
1021         (pthread_handle_create): Likewise.
1022
1023 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
1024
1025         * manager.c (pthread_allocate_stack): Handle
1026         NEED_SEPARATE_REGISTER_STACK.
1027         (pthread_handle_create): Likewise.
1028         * pthread.c (__pthread_initialize_manager): Likewise.
1029
1030         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1031
1032 1999-12-02  H.J. Lu  <hjl@gnu.org>
1033
1034         * sysdeps/ia64/pt-machine.h: New.
1035
1036 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
1037
1038         * wrapsyscall.c: Mark non-__ protected names as weak.
1039         PR libc/1466.
1040
1041 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
1042
1043         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1044
1045 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
1046
1047         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1048         Add tests also to new alternative spinlock implementation.
1049         * spinlock.h: Likewise.
1050         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1051
1052 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
1053
1054         * Version: Export __sigaction.
1055         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
1056         of __sigaction.
1057         * pthread.c: Use __libc_sigaction instead of __sigaction.
1058
1059         * condvar.c: Implement pthread_condattr_getpshared and
1060         pthread_condattr_setpshared.
1061         * mutex.c: Implement pthread_mutexattr_getpshared and
1062          pthread_mutexattr_setpshared.
1063         * Versions: Export new functions.
1064         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1065
1066         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1067         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1068         is not selected.
1069
1070 2000-07-04  Greg McGary  <greg@mcgary.org>
1071
1072         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1073         pragmas.  Include bp-sym.h only if _LIBC.
1074
1075 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
1076
1077         * spinlock.c (__pthread_unlock): Properly place write barrier.
1078         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1079
1080 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
1081
1082         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1083         faster on SMP systems.  No more emulation of compare&swap for adaptive
1084         spinlocks.
1085         * spinlock.h: Likewise.
1086         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1087         Replace fast with adaptive mutex.
1088         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1089         * condvar.c: Likewise.
1090         * pthread.c: Define and initialize __pthread_smp_kernel variable.
1091         * internals.h: Declare __pthread_smp_kernel.
1092         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1093         _pthread_fastlock structure.
1094         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1095
1096         * pthread.c: Remove initialization to zero from global variables.
1097
1098 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
1099
1100         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1101
1102 2000-06-28  Greg McGary  <greg@mcgary.org>
1103
1104         * weaks.c: Wrap BP_SYM () around weak extern declarations of
1105         pthread functions that have pointers in their return+arg signatures.
1106
1107 2000-06-27  Greg McGary  <greg@mcgary.org>
1108
1109         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1110         extern declarations of pthread functions that have pointers in
1111         their return+arg signatures.
1112
1113 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
1114
1115         * Makefile (tests): Add ex11.  Add rules to build it.
1116         * Examples/ex11.c: New file.
1117         * rwlock.c: Fix complete braindamaged previous try to implement
1118         timedout functions.
1119
1120         * spinlock.c: Pretty print.
1121
1122 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
1123
1124         * Makefile (tests): Add ex10.  Add rules to build it.
1125         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1126         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1127         * condvar.c (pthread_cond_wait): Allow mutex of kind
1128         PTHREAD_MUTEX_TIMED_NP.
1129         (pthread_cond_timedwait_relative): Likewise.
1130         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1131         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1132         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1133         (__pthread_mutex_lock): Use __pthread_alt_lock for
1134         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1135         (__pthread_mutex_timedlock): New function.
1136         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1137         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1138         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1139         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1140         * spinlock.c: Implement alternate fastlocks.
1141         * spinlock.h: Add prototypes.
1142         * Examples/ex10.c: New file.
1143         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1144         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1145
1146         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1147         (__pthread_rwlock_timedrdlock): New function.
1148         (__pthread_rwlock_timedwrlock): New function.
1149         Use laternate fastlock function everywhere.
1150
1151 2000-06-21  Andreas Jaeger  <aj@suse.de>
1152
1153         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1154         prototype.
1155
1156         * join.c: Include <stdlib.h> for exit prototype.
1157
1158 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
1159
1160         * sysdeps/i386/useldt.h: Include <stdlib.h>.
1161
1162         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1163         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1164
1165         * Makefile (libpthread-routines): Add barrier.
1166         (tests): Add ex9.  Add rule to build ex9.
1167         * Versions: Export barrier functions.
1168         * barrier.c: New file.
1169         * Examples/ex9.c: New file.
1170         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1171         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1172         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1173
1174 2000-06-19  H.J. Lu  <hjl@gnu.org>
1175
1176         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1177         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1178         (compare_and_swap_with_release_semantics): New. Default to
1179         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1180         is not defined.
1181
1182         * spinlock.c (__pthread_unlock): Call
1183         compare_and_swap_with_release_semantics () instead of
1184         compare_and_swap ().
1185
1186 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
1187
1188         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1189         to errno directly.
1190         * sysdeps/pthread/timer_delete.c: Likewise.
1191         * sysdeps/pthread/timer_getoverr.c: Likewise.
1192         * sysdeps/pthread/timer_gettime.c: Likewise.
1193         * sysdeps/pthread/timer_settime.c: Likewise.
1194
1195 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1196
1197         Timer nodes are now reference counted, and can be marked
1198         as deleted. This allows for the safe release of the global mutex
1199         in the middle without losing the timer being operated on.
1200
1201         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
1202         member is now an enum with three values, so that an intermediate
1203         state can be represented (deleted but not free for reuse yet).
1204         New refcount member added.
1205         * sysdeps/pthread/timer_routines.c: Likewise.
1206
1207         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1208         timer_valid): New inline functions added.
1209
1210         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1211         restructured, recursive deadlock bug fixed.
1212
1213         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1214         timer_addref to ensure that timer won't be deleted while mutex is not
1215         held. Also uses timer_invalid to perform validation of timer handle.
1216         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1217         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1218
1219 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
1220
1221         * shlib-versions: Add entry for SH.
1222         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1223
1224 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1225
1226         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
1227         tightened up some critical regions and micro-optimized some list
1228         manipulation code.
1229
1230         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1231         Returns int value now to indicate whether timer was queued at head.
1232         * sysdeps/pthread/posix-timer.h: Likewise.
1233         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1234         new return value from __timer_thread_queue_timer to avoid waking
1235         up timer thread unnecessarily.
1236
1237         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1238         inuse flag, because this requires mutex to be held.  Callers updated
1239         to do the check when they have the mutex.
1240         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1241
1242         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1243         regions: avoids making system calls while holding timer mutex, and
1244         a few computations were moved outside of the mutex as well.
1245         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1246
1247         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1248         to list_unlink_ip, meaning idempotent.  Pointer manipulation
1249         changed to get better better code out of gcc.
1250         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1251         version of list_unlink added here.
1252         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1253         function in all places: idempotent one for timers, non-idempotent
1254         one for thread nodes.
1255         * sysdeps/pthread/timer_settime: Likewise.
1256         * sysdeps/pthread/timer_routines.c: Likewise.
1257
1258 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
1259
1260         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1261         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1262
1263         * sysdeps/pthread/Makefile: Remove tests definition.
1264
1265 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1266             Yutaka Niibe  <gniibe@chroot.org>
1267
1268         * sysdeps/sh/pspinlock.c: New file.
1269         * sysdeps/sh/pt-machine.h: New file.
1270
1271 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
1272
1273         * Makefile (tests): Add joinrace.
1274
1275         * Examples/ex6.c: Test return value of pthread_join.
1276
1277 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
1278
1279         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1280         (__pthread_spin_trylock): Implement.
1281         (__pthread_spin_unlock): Implement.
1282         (__pthread_spin_init): Implement.
1283         (__pthread_spin_destroy): Implement.
1284
1285 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1286
1287         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1288         really append the entry.
1289
1290 2000-06-10  Andreas Jaeger  <aj@suse.de>
1291
1292         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1293
1294 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1295
1296         * sysdeps/pthread/timer_create.c: Thread matching now done on
1297         clock type as well as thread attributes.
1298         There are individual global signal-delivering threads for
1299         different clock types.
1300         * sysdeps/pthread/posix-timer.h: Likewise.
1301         * sysdeps/pthread/timer_routines.c: Likewise.
1302
1303         * sysdeps/pthread/timer_routines.c: Thread allocation and
1304         deallocation function now remembers to put thread on active
1305         list and remove from active list.
1306         Thus now the feature of binding multiple timers
1307         to a single thread actually works.
1308
1309 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1310
1311         * pthread.c (__pthread_create_2_1): Optimize a bit.
1312
1313         * internals.h (invalid_handle): Also test for p_terminated != 0.
1314         (nonexisting_handle): New function.  Same as old invalid_handle.
1315         * join.c (pthread_join): Use nonexisting_handle instead of
1316         invalid_handle to test for acceptable thread handle.
1317         * manager.c (pthread_handle_free): Likewise.
1318         * joinrace.c: New file.
1319         Reported by Permaine Cheung <pcheung@cygnus.com>.
1320
1321 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1322
1323         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1324         Correct handling of matching variable.
1325
1326         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1327         avoid warnings.
1328
1329         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1330         Be prepared for empty timer list.
1331
1332         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1333         CPUTIME clock ID.  Add support for thread clocks.
1334
1335         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1336         subtraction were switched.
1337
1338         * sysdeps/pthread/timer_routines.c (init_module): Use
1339         THREAD_MAXNODES threads.
1340
1341         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1342         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1343         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1344         with sigqueueinfo is this system call is available.
1345
1346         * sysdeps/pthread/timer_create.c (timer_create): Allow
1347         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1348
1349         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1350         functionality.
1351         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1352
1353 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1354
1355         * sysdeps/pthread/posix-timer.h: New file.
1356         * sysdeps/pthread/timer_create.c: New file.
1357         * sysdeps/pthread/timer_delete.c: New file.
1358         * sysdeps/pthread/timer_getoverr.c: New file.
1359         * sysdeps/pthread/timer_gettime.c: New file.
1360         * sysdeps/pthread/timer_routines.c: New file.
1361         * sysdeps/pthread/timer_settime.c: New file.
1362         * sysdeps/pthread/tst-timer.c: New file.
1363
1364 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1365
1366         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1367         LINK_MAX definitions if necessary.
1368
1369 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1370
1371         Added missing fork time handling of global libio lock.
1372
1373         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1374         not just the individual stream locks. Rewritten to use new
1375         iterator interface provided by libio rather than accessing
1376         global variable.
1377
1378         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1379         which lock and unlock the stream list using the new interface
1380         provied by libio.
1381         * internals.h: Likewise.
1382
1383         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1384         and __funlockfilelist in the parent after the fork.
1385         Child still calls __fresetlockfiles as before.
1386
1387         * linuxthreads.texi: Now explains what happens to streams at
1388         fork time. Also whole new section on forking and thread added.
1389         Definition of pthread_atfork moved out of Miscellaneous Functions
1390         to this new section.
1391
1392 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1393
1394         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1395         Add missing register.
1396         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1397
1398 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1399
1400         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1401         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1402         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1403
1404 2000-05-31  Andreas Jaeger  <aj@suse.de>
1405
1406         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1407
1408 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1409
1410         * spinlock.c (__pthread_lock): Remove ASSERT.
1411
1412         * Makefile (tests): Add ex8.
1413         * Examples/ex8.c: New file.
1414
1415 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1416
1417         Bugfix: The pthread_atfork mechanism now takes care of its
1418         own internal mutex at fork time.
1419
1420         * ptfork.c (__fork): Revised so that the mutex is held across
1421         the fork operation and while the handlers are called, and so that
1422         the child resets the mutex.
1423
1424         * linuxthreads.texi: Updated pthread_atfork documentation to make
1425         it clear that fork and pthread_atfork can't be reentered from
1426         atfork handlers, that pthread_atfork and fork are mutually atomic,
1427         and that the handlers are inherited by the child process.
1428
1429 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1430
1431         * Makefile (libpthread-routines): Add pspinlock.
1432         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1433         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1434         * condvar.c: Likewise.
1435         * internals.h: Likewise.
1436         * join.c: Likewise.
1437         * manager.c: Likewise.
1438         * mutex.c: Likewise.
1439         * pthread.c: Likewise.
1440         * rwlock.c: Likewise.
1441         * semaphore.c: Likewise.
1442         * signals.c: Likewise.
1443         * spinlock.h: Likewise.
1444         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1445         * sysdeps/alpha/pspinlock.c: New file.
1446         * sysdeps/arm/pspinlock.c: New file.
1447         * sysdeps/i386/pspinlock.c: New file.
1448         * sysdeps/m68k/pspinlock.c: New file.
1449         * sysdeps/mips/pspinlock.c: New file.
1450         * sysdeps/powerpc/pspinlock.c: New file.
1451         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1452         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1453         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1454         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1455
1456 2000-05-24  Andreas Jaeger  <aj@suse.de>
1457
1458         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1459
1460 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1461
1462         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1463
1464 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1465
1466         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1467
1468 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1469
1470         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1471         object state is represented with additional bits which distinguish
1472         whether that state was set up in the current process, or
1473         in an ancestor process. If that state was set in an ancestor,
1474         it means that a fork happened while thread was executing the init
1475         function. In that case, the state is reset to NEVER.
1476         * mutex.c (__pthread_once_fork_prepare): New function.
1477         (__pthread_once_fork_child): Likewise
1478         (__pthread_once_fork_parent): Likewise
1479         (__pthread_reset_pthread_once): Removed.
1480         * ptfork.c (__fork): Call new handlers in mutex.c.
1481         * internals.h: Declarations of new mutex.c functions added.
1482         Declaration of removed function deleted.
1483         * linuxthreads.texi: Updated documentation about pthread_once
1484         to clarify what happens under cancellation and forking.
1485
1486 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1487
1488         * internals.h: New thread manager request type, REQ_KICK.
1489         * join.c (pthread_exit): main thread now calls exit() instead
1490         of _exit() in order to proper process cleanup.
1491         * manager.c (__pthread_manager): Do not terminate manager
1492         after unblocking main thread; wait for main thread's
1493         REQ_PROCESS_EXIT request instead.
1494         Also, added REQ_KICK case to handle new request; this just does
1495         nothing.
1496         * manager.c (pthread_exited): Do not terminate manager after
1497         unblocking main thread.
1498         * manager.c (__pthread_manager_sighandler): If the main thread
1499         is waiting for all other threads to die, send a REQ_KICK into
1500         the thread manager request pipe to get it to clean out the threads
1501         and unblock the main thread as soon as possible. This fixes
1502         the 2000 millisecond hang on shutdown bug.
1503         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1504         including the main one call pthread_exit(), or implicitly do so.
1505         * Makefile (tests): Add ex7.
1506
1507 2000-05-05  Andreas Jaeger  <aj@suse.de>
1508
1509         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1510         (pthread_getcpuclockid): Correct test for ourselves.
1511
1512 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1513
1514         * internals.h (struct _pthread_descr_struct): Reorganization.
1515         Allocate room for 16 pointers at head of the structure for future
1516         thread-local data handling.  Move p_self member in this area.
1517         * manager.c (pthread_handle_create): Adjust use of p_self.
1518         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1519         * pthread.c (__pthread_initial_thread): Adjust initialization.
1520         (__pthread_manager_thread): Likewise.
1521
1522 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1523
1524         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1525         for eventmask larger than 1 word.
1526
1527 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1528
1529         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1530         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1531         minimal initialization.
1532         (pthread_initialize): Remove this code here.
1533         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1534         are working around the problem in glibc.
1535
1536 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
1537
1538         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1539         now.  First gcc must be fixed (more concrete: libgcc).
1540
1541 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
1542
1543         * pthread.c: Remove special treatement for interrupt handlers on x86.
1544         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1545         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1546         necessary.
1547         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1548
1549 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
1550
1551         * join.c (pthread_exit): Set p_terminated after reporting the
1552         termination event instead of before.
1553
1554 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
1555
1556         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1557         if __USE_UNIX98.
1558
1559 2000-04-18  Andreas Jaeger  <aj@suse.de>
1560
1561         * Versions: Use ld instead of ld.so.
1562
1563 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1564
1565         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1566         Remove the typedef keyword.
1567
1568 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1569
1570         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1571         not stbar.
1572         (READ_MEMORY_BARRIER): Define.
1573         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1574         MEMORY_BARRIER.
1575         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1576         headers.
1577
1578 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
1579
1580         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1581         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1582         use thread_handle().
1583
1584 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
1585
1586         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1587         if fast mutex is used.  Don't initialize `already_canceled' twice.
1588         Correctly test for return value of timedsuspend.
1589
1590         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
1591         therefore don't need the _rt versions of the signal handlers.
1592
1593 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1594
1595         * pthread.c (pthread_yield): New function.
1596         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1597         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1598         * internals.h: Declare __pthread_yield.
1599
1600         * pthread.c (pthread_initialize): Avoid a bit more code if
1601         realtime signals are known to exist.
1602
1603         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1604         to dynamically detect RT signals and avoid generating compatibility
1605         functions with old kernel.
1606         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1607         __pthread_restart_new directly.
1608         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1609         __pthread_wait_for_restart_signal directly.
1610         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1611         __pthread_timedsuspend_new directly.
1612
1613 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1614
1615         * condvar.c: Remove all the special code to handle cond_timedwait.
1616         Use timedsuspend instead.
1617         * internals.h: Declare __pthread_timedsuspend_old,
1618         __pthread_timedsuspend_new, and __pthread_timedsuspend.
1619         Remove declaration of __pthread_init_condvar.
1620         * pthread.c: Define __pthread_timedsuspend variable.
1621         (__pthread_timedsuspend_old): New function.  Timed suspension
1622         implementation for old Linux kernels.
1623         (__pthread_timedsuspend_new): New function.  Timed suspension
1624         implementation for new Linux kernels.
1625         * restart.h (timedsuspend): New function.  Call appropriate
1626         suspension function through __pthread_timedsuspend.
1627         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1628         the code.
1629         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1630
1631         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1632         undefined.
1633         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1634         where possible.
1635         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1636         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1637
1638         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1639         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1640
1641 2000-04-14  Andreas Jaeger  <aj@suse.de>
1642
1643         * weaks.c: Fix typo.
1644
1645         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1646         2.2 for linuxthreads.
1647
1648 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
1649
1650         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1651         (pthread_getcpuclockid): Fix typo.
1652
1653 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
1654
1655         * Makefile (libpthread-routines): Add getcpuclockid.
1656         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1657         * sysdeps/pthread/getcpuclockid.c: New file.
1658         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1659         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1660
1661         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1662         Defined.
1663         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1664
1665         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1666         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1667         and pthread_spin_unlock.
1668         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1669         into pthread_spinlock_t.  Change all uses.
1670         * spinlock.c: Implement pthread_spin_lock.
1671         Rename __pthread_unlock to __pthread_spin_unlock and define weak
1672         alias for real name.
1673         Define pthread_spin_trylock, pthread_spin_init, and
1674         pthread_spin_destroy.
1675         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1676         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1677         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1678         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1679         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1680         and pthread_spin_unlock.
1681         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1682         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1683         * condvar.c: Likewise.
1684         * internals.h: Likewise.
1685         * join.c: Likewise.
1686         * manager.c: Likewise.
1687         * mutex.c: Likewise.
1688         * pthread.c: Likewise.
1689         * rwlock.c: Likewise.
1690         * semaphore.c: Likewise.
1691         * signals.c: Likewise.
1692
1693         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1694         macros.
1695         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1696
1697 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1698
1699         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1700         _POSIX_SHARED_MEMORY_OBJECTS.
1701
1702 2000-04-11  Andreas Jaeger  <aj@suse.de>
1703
1704         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1705         (__compare_and_swap): Mark as modifying memory.
1706
1707 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
1708
1709         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1710         __volatile__.
1711         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1712         Don't have the 'asm' __volatile__.
1713
1714 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1715
1716         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1717         * spinlock.c (__pthread_lock): Add memory barriers.
1718         (__pthread_unlock): Likewise.
1719         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1720         instruction.
1721         (RELEASE): Not needed anymore.
1722         (__compare_and_swap): Mark asm as modifying memory.
1723         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
1724         of MEMORY_BARRIER.
1725         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1726         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1727         (MEMORY_BARRIER): Define using stbar.
1728         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1729         stbar.
1730         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1731         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1732         Mike Burrows <m3b@pa.dec.com>.
1733
1734 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
1735
1736         * signals.c (sigaction): Fix return value for the case SIG is one
1737         of the signals the implementation uses.
1738         Patch by Xavier.Leroy@inria.fr.
1739
1740 2000-04-01  Andreas Jaeger  <aj@suse.de>
1741
1742         * attr.c: Use shlib-compat macros.
1743         * oldsemaphore.c: Likewise.
1744         * pthread.c: Likewise.
1745         * weaks.c: Likewise.
1746
1747 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
1748
1749         * semaphore.c (sem_timedwait): New function.
1750         Patch by Carl Mailloux <carlm@oricom.ca>.
1751         * semaphore.h: Declare sem_timedwait.
1752         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1753
1754 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
1755
1756         * sysdeps/pthread/Makefile: File removed.
1757
1758 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
1759
1760         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1761         * internals.h (__pthread_reset_pthread_once): Add prototype.
1762         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1763
1764         * manager.c (pthread_handle_create): Store ID of new thread before
1765         clone call.
1766
1767 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
1768
1769         * attr.c: Use new macros from shlib-compat.h to define versions.
1770         * oldsemaphore.c: Likewise.
1771         * semaphore.c: Likewise.
1772         * weaks.c: Likewise.
1773
1774         * pthread.c: Update for new SHLIB_COMPAT definition.
1775
1776         * manager.c (__pthread_manager): Unmask debug signal.
1777
1778         * pthread.c (pthread_initialize): Test for address of __dso_handle
1779         being NULL, not value.  Use __on_exit, not on_exit.
1780         Patch by Andreas Jaeger <aj@suse.de>.
1781
1782         * pthread.c: Use new macros from shlib-compat.h to define versions.
1783
1784 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1785
1786         * pthread.c (pthread_initialize): Instead of on_exit use
1787         __cxa_atexit if __dso_label is available to allow unloading the
1788         libpthread shared library.
1789
1790 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1791
1792         * condvar.c: Make tests for ownership of mutex less strict.
1793
1794 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1795
1796         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1797         current thread and return error if not.
1798         (pthread_cond_timedwait_relative_old): Likewise.
1799         (pthread_cond_timedwait_relative_new): Likewise.
1800
1801         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1802         (pthread_once_cancelhandler): New function.
1803         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1804
1805 2000-03-14  Andreas Jaeger  <aj@suse.de>
1806
1807         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1808         REG_GS.
1809         (pthread_handle_sigrestart_rt): Likewise.
1810         * signals.c (pthread_sighandler_rt): Likewise.
1811
1812 2000-03-02  Andreas Jaeger  <aj@suse.de>
1813
1814         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1815         Reported by Sean Chen <sean.chen@turbolinux.com>.
1816
1817 2000-02-28  Andreas Jaeger  <aj@suse.de>
1818
1819         * rwlock.c: Fix typo.
1820
1821 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1822
1823         * rwlock.c: Define __* variants of the functions and make old names
1824         aliases.
1825         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1826         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1827
1828 2000-02-25  Andreas Jaeger  <aj@suse.de>
1829
1830         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1831         pwrite64, lseek64, open64, and __open64 with version 2.2.
1832
1833 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
1834
1835         * semaphore.h (SEM_FAILED): Use 0 not NULL.
1836
1837 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
1838
1839         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1840         nanosleep does not work either.  Get absolute time inside the
1841         loop.
1842         (pthread_cond_timedwait_relative_new): Likewise.
1843         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1844
1845 2000-02-13  Andreas Jaeger  <aj@suse.de>
1846
1847         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1848         (pthread_cond_timedwait_relative_old): Likewise.
1849
1850 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
1851
1852         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1853         but keep the code around.  A bug in the kernel prevent us from
1854         using the code.
1855         (pthread_cond_timedwait_relative_new): Likewise.
1856         (PR libc/1597 and libc/1598).
1857
1858 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1859
1860         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1861         loop around nanosleep calls instead of around most of the function
1862         (pthread_cond_timedwait_relative_new): Likewise.
1863         body.  Got rid of backwards goto and one local.
1864
1865 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1866
1867         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1868         before every nanosleep call to account for time spent in the rest
1869         of the function.
1870         (pthread_cond_timedwait_relative_new): Likewise.
1871         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1872
1873 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
1874
1875         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1876         from nanosleep call so that in case we restart we only wait for the
1877         remaining time.
1878         (pthread_cond_timedwait_relative_new): Likewise.
1879         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1880
1881 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
1882
1883         * manager.c (pthread_allocate_stack): Compute guard page address
1884         correctly.  Patch by HJ Lu.
1885
1886         * sysdeps/pthread/pthread.h: Define
1887         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1888
1889 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1890
1891         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1892         preference handling.
1893         (pthread_rwlockattr_setkind_np): Allow
1894         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1895         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1896
1897 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1898
1899         * internals.h (pthread_readlock_info): New structure.
1900         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1901         p_untracked_readlock_count.
1902         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1903         Add initializers for new fields.
1904         * manager.c (pthread_free): Free read/write lock lists.
1905         * queue.h (queue_is_empty): New function.
1906         * rwlock.c: Implement requirements about when readers should get
1907         locks assigned.
1908         * sysdeps/pthread/pthread.h
1909         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1910         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1911         Define this name as well.
1912         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1913
1914 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1915
1916         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1917         Adjust initializers for struct _pthread_descr_struct change.
1918         * internals.h (struct _pthread_descr_struct): Move new elements to
1919         the end.
1920
1921 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1922
1923         Redesigned how cancellation unblocks a thread from internal
1924         cancellation points (sem_wait, pthread_join,
1925         pthread_cond_{wait,timedwait}).
1926         Cancellation won't eat a signal in any of these functions
1927         (*required* by POSIX and Single Unix Spec!).
1928         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1929         simultaneous condition variable signal (not required by POSIX
1930         or Single Unix Spec, but nice).
1931         * spinlock.c: __pthread_lock queues back any received restarts
1932         that don't belong to it instead of assuming ownership of lock
1933         upon any restart; fastlock can no longer be acquired by two threads
1934         simultaneously.
1935         * restart.h: Restarts queue even on kernels that don't have
1936         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1937         avoiding a rare race condition in pthread_cond_timedwait.
1938
1939 1999-12-31  Andreas Jaeger  <aj@suse.de>
1940
1941         * internals.h: Remove duplicate prototype declarations.
1942
1943         * weaks.c: Remove __THROW from prototypes since the file is not
1944         compiled by a C++ compiler.
1945         * internals.h: Likewise.
1946
1947 1999-12-30  Andreas Jaeger  <aj@suse.de>
1948
1949         * sysdeps/pthread/pthread.h: Move internal functions to...
1950         * sysdeps/pthread/bits/libc-lock.h: ...here.
1951
1952 1999-12-29  Andreas Jaeger  <aj@suse.de>
1953
1954         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1955
1956 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1957
1958         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1959         beginning.
1960
1961         * manager.c (__pthread_start): Add one more cast to prevent
1962         warning on 64bit machines.
1963
1964 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1965
1966         * manager.c (pthread_handle_create): Set p_pid of new thread
1967         before calling the callback function to report a new thread.
1968
1969 1999-12-20  Andreas Jaeger  <aj@suse.de>
1970
1971         * pthread.c (pthread_initialize): Move getrlimit call after
1972         setting of errno.
1973
1974 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1975
1976         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1977         pwrite64, lseek64, open64, and __open64.
1978         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1979         pwrite64, lseek64, open64, and __open64.
1980
1981         * manager.c (pthread_allocate_stack): Correct computation of
1982         new_thread_bottom.  Correct handling of stack size and when the
1983         rlimit method to guard for stack growth is used.
1984         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1985         minus one pagesize (not two).
1986
1987 1999-12-03  Andreas Jaeger  <aj@suse.de>
1988
1989         * Versions: Add __res_state with version GLIBC_2.2.
1990
1991         * errno.c (__res_state): New function to return thread specific
1992         resolver state.
1993
1994         * pthread.c (pthread_initialize): Initialize p_resp.
1995         (__pthread_reset_main_thread): Also set p_resp.
1996
1997         * manager.c (pthread_handle_create): Initialize p_resp.
1998
1999         * internals.h: Add thread specific resolver state.
2000         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2001
2002 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
2003
2004         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2005         beginning.
2006         * sysdeps/i386/i686/pt-machine.h: Likewise.
2007         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2008
2009 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
2010
2011         * manager.c (pthread_start_thread_event): Initialize p_pid already
2012         here.
2013
2014 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
2015
2016         * internals.h: Add prototype for __pthread_manager_event.
2017         * manager.c (__pthread_manager_event): New function.
2018         (pthread_start_thread_event): Correct computation of self.
2019         Use INIT_THREAD_SELF.
2020         * pthread.c (__pthread_manager_thread): Initialize p_lock.
2021         (__pthread_initialize_manager): Respect event flags also for creation
2022         of the manager thread.
2023
2024 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
2025
2026         * pthread.c (__pthread_initialize_manager): Initialize
2027         __pthread_manager_thread.p_tid.
2028
2029 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
2030
2031         * internals.h: Declare __pthread_last_event.
2032         * manager.c: Define __pthread_last_event.
2033         (pthread_handle_create): Set __pthread_last_event.
2034         (pthread_exited): Likewise.
2035         * join.c (pthread_exit): Likewise.
2036
2037         * Makefile (libpthread-routines): Add events.
2038         * events.c: New file.
2039         * internals.h: Protect against multiple inclusion.
2040         Include thread_dbP.h header.
2041         (struct _pthread_descr_struct): Add new fields p_report_events and
2042         p_eventbuf.
2043         Declare event reporting functions.
2044         * join.c (pthread_exit): Signal event if this is wanted.
2045         * manager.c (__pthread_threads_events): New variable.
2046         (pthread_handle_create): Take new parameters with event information.
2047         Signal TD_CREATE event if wanted.
2048         (__pthread_manager): Adjust pthread_handle_create call.
2049         (pthread_start_thread_event): New function.  Block until manager is
2050         finished and then call pthread_start_thread.
2051         (pthread_exited): Signal TD_REAP event if wanted.
2052
2053 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
2054
2055         * restart.h (suspend_with_cancellation): Rewrite as a macro.
2056
2057         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2058
2059 1999-10-25  Andreas Jaeger  <aj@suse.de>
2060
2061         * internals.h: Remove K&R compatibility.
2062         * no-tsd.c: Likewise.
2063         * semaphore.h: Likewise.
2064         * signals.c: Likewise.
2065         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2066         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2067         * weaks.c: Likewise.
2068
2069 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
2070
2071         * pthread.c: For i386, wrap pthread_handle_sigrestart and
2072         pthread_handle_sigcancel with functions that restore %gs from the
2073         signal context.  For each signal handling function, two wrappers
2074         are required, one for a non-RT signal and one for a RT signal.
2075         * signal.c: For i386, add code to restore %gs from the signal
2076         context in pthread_sighandler and pthread_sighandler_rt.
2077
2078 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
2079
2080         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2081
2082 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
2083
2084         * pthread.c (__pthread_initial_thread): Pass argument to
2085         PTHREAD_START_ARGS_INITIALIZER.
2086         (__pthread_manager_thread): Likewise.
2087
2088         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2089         initialize function.
2090
2091         * manager.c (pthread_handle_create): Remove p_startfct initialization.
2092
2093         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2094
2095 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
2096
2097         * internals.h: Correct return types for __libc_read and __libc_write.
2098
2099 1999-10-09  Andreas Jaeger  <aj@suse.de>
2100
2101         * internals.h: Add __new_sem_post to get prototype in
2102         manager.c; include semaphore.h for needed types.
2103
2104 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
2105
2106         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2107         directly instead of calling sem_post which should not be necessary
2108         but is faster and might help in some case to work around problems.
2109         Patch by khendricks@ivey.uwo.ca [libc/1382].
2110
2111 1999-10-08  Andreas Schwab  <schwab@suse.de>
2112
2113         * sysdeps/pthread/Subdirs: New file.
2114         * Implies: Removed.
2115
2116 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
2117
2118         * Implies: New file.
2119         * internals.h (struct _pthread_descr_struct): Add p_startfct.
2120         * manager.c (pthread_handle_create): Initialize p_startfct.
2121         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2122
2123 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
2124
2125         * manager.c (__linuxthreads_pthread_threads_max): New variable.
2126         * specific.c (__linuxthreads_pthread_keys_max): New variable.
2127         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2128
2129         * condvar.c (pthread_cond_timedwait_relative): Never return with
2130         EINTR.  Patch by Andreas Schwab.
2131
2132 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
2133
2134         * signals.c (sigaction): Correct last patch.  Don't select
2135         pthread_sighandler_rt based on the signal number but instead of
2136         the SA_SIGINFO flag.
2137
2138 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
2139
2140         * specific.c: Move definitions of struct pthread_key_struct and
2141         destr_function to ...
2142         * internals.h: ...here.
2143
2144 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
2145
2146         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
2147         this instead of pthread_handle_sigrestart if the signal is an RT
2148         signal.
2149
2150         * signals.c: Handle passing through of sighandler arguments also
2151         for real-time signals.
2152
2153 1999-09-03  Andreas Schwab  <schwab@suse.de>
2154
2155         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
2156         fork as weak alias.
2157         (__vfork): New function, alias vfork.
2158         * Versions: Export __fork, vfork, and __vfork in libpthread.
2159
2160 1999-08-23  Andreas Schwab  <schwab@suse.de>
2161
2162         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2163         call to signal handler.
2164
2165 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
2166
2167         * pthread.c (__pthread_reset_main_thread): Undo last change.
2168         (__pthread_kill_other_threads_np): Reset signal handlers for the
2169         signals we used in the thread implementation here.
2170
2171 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
2172
2173         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2174         for the signals we used in the thread implementation [PR libc/1234].
2175
2176         * Versions: Export __pthread_kill_other_threads_np from libpthread
2177         for GLIBC_2.1.2.
2178
2179         * signals.c: Pass sigcontext through wrapper to the user function.
2180
2181 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
2182
2183         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2184         __libc_internal_tsd_set.
2185
2186 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2187
2188         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2189         needed anymore.
2190
2191 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2192
2193         * internals.h: Align _pthread_descr_struct to 32 bytes.
2194         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2195         libc/1206.
2196
2197 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2198
2199         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2200         swap function.
2201
2202 1999-07-09  Cristian Gafton  <gafton@redhat.com>
2203
2204         * Makefile (libpthread-routines): Add oldsemaphore routine.
2205         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2206         sem_trywait, and sem_wait to GLIBC_2.1.
2207         * oldsemaphore.c: New file.
2208         * semaphore.c: Add default_symbol_versions for the changed functions.
2209         (__new_sem_init): Rename from sem_init.
2210         (__new_sem_post): Rename from sem_post.
2211         (__new_sem_wait): Rename from sem_wait.
2212         (__new_sem_trywait): Rename from sem_trywait.
2213         (__new_sem_getvalue): Rename from sem_getvalue.
2214         (__new_sem_destroy): Rename from sem_destroy.
2215
2216 1999-06-23  Robey Pointer  <robey@netscape.com>
2217
2218         * internals.h: Added p_nextlock entry to separate queueing for a
2219         lock from queueing for a CV (sometimes a thread queues on a lock
2220         to serialize removing itself from a CV queue).
2221         * pthread.c: Added p_nextlock to initializers.
2222         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2223
2224 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2225
2226         * manager.c (pthread_handle_create): Free mmap region after stack
2227         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2228
2229 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2230
2231         * man/pthread_cond_init.man: Correct example.
2232         Reported by Tomas Berndtsson <tomas@nocrew.org>.
2233
2234         * linuxthreads.texi (Condition Variables): Likewise.
2235
2236 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
2237
2238         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2239         casx not cas, also successful casx returns the old value in rd
2240         and not the new value.
2241
2242 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
2243
2244         * manager.c: If pthread_create() is given a NULL attribute
2245         and the thread manager runs with a realtime policy, set the
2246         scheduling policy of the newly created thread back to SCHED_OTHER.
2247         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2248         initialize the schedpolicy field of new_thread->p_start_args
2249         to that of the calling thread.
2250
2251 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
2252
2253         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2254         instruction does not allow memory element to use offset.
2255
2256 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
2257
2258         * manager.c (pthread_allocate_stack): Optimize initialization of new
2259         thread descriptor.
2260
2261         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2262         Don't use initializer since it is all zeroes.
2263         (__libc_once_define): Likewise.
2264
2265 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2266
2267         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2268         doesn't exist anymore.
2269         * sysdeps/i386/Implies: Likewise.
2270         * sysdeps/m68k/Implies: Likewise.
2271         * sysdeps/mips/Implies: Likewise.
2272         * sysdeps/powerpc/Implies: Likewise.
2273         * sysdeps/sparc/sparc32/Implies: Likewise.
2274         * sysdeps/sparc/sparc64/Implies: Likewise.
2275
2276 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
2277
2278         * sysdeps/alpha/bits/semaphore.h: Removed.
2279         * sysdeps/powerpc/bits/semaphore.h: Removed.
2280         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2281         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2282         * Makefile (headers): Remove bits/semaphore.h.
2283
2284         * semaphore.h: Define _pthread_descr if necessary.
2285         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2286         Define SEM_FAILED.
2287         (sem_t): Protect element names with leading __.
2288         Add declarations for sem_close, sem_open, and sem_unlink.
2289         * semaphore.c: Adjust all functions for new element names.
2290         Define sem_close, sem_open, and sem_unlink.
2291         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2292         GLIBC_2.1.1.
2293         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2294         necessary.
2295
2296 1999-03-16  H.J. Lu  <hjl@gnu.org>
2297
2298         * specific.c (pthread_key_delete): Check th->p_terminated to see
2299         if the thread is running.
2300
2301         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2302         Added to GLIBC_2.0 for libc.so.
2303
2304 1999-02-12  H.J. Lu  <hjl@gnu.org>
2305
2306         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2307         __libc_allocate_rtsig): Added to GLIBC_2.1.
2308
2309         * internals.h (DEFAULT_SIG_RESTART): Removed.
2310         (DEFAULT_SIG_CANCEL): Removed.
2311
2312         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2313         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2314         (__pthread_sig_restart, __pthread_sig_cancel,
2315         __pthread_sig_debug): Initialized.
2316         (pthread_initialize): Call init_rtsigs () to initialize
2317         real-time signals.
2318
2319 1999-02-03  H.J. Lu  <hjl@gnu.org>
2320
2321         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2322         Don't restart the thread which sent REQ_DEBUG.
2323         (pthread_start_thread): Check if __pthread_sig_debug > 0
2324         before debugging.
2325
2326         * pthread.c (__pthread_initialize_manager): Suspend ourself
2327         after sending __pthread_sig_debug to gdb instead of
2328         __pthread_sig_cancel.
2329
2330 1999-01-24  H.J. Lu  <hjl@gnu.org>
2331
2332         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2333         from mask if __pthread_sig_debug > 0.
2334         (pthread_handle_create): Increment __pthread_handles_num.
2335
2336         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2337         * pthread.c (__pthread_initialize_manager): Likewise.
2338
2339         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2340         instead of __libc_allocate_rtsig (2).
2341         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2342         instead of __pthread_sig_cancel.
2343         (pthread_handle_sigdebug): Fix comments.
2344
2345 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2346
2347         * manager.c (pthread_allocate_stack): Set
2348         __pthread_nonstandard_stacks if user-specified stack is used.
2349
2350 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2351
2352         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2353         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2354
2355 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2356
2357         * pthread.c: Use a third signal __pthread_sig_debug distinct
2358         from __pthread_sig_cancel to notify gdb when a thread is
2359         created
2360         * manager.c: Likewise.
2361         * internals.h: Likewise.
2362         * signals.c: The implementation of sigwait(s) assumed that
2363         all signals in s have signal handlers already attached.
2364         This is not required by the standard, so make it work
2365         also if some of the signals have no handlers.
2366
2367 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2368
2369         * linuxthreads.texi: Remove pointers from first @node.  Move old
2370         @node spec inside comment.
2371
2372 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2373
2374         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2375         _IO_lock_unlock.
2376
2377 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2378
2379         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2380         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2381
2382 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2383
2384         * manager.c: Threads now send __pthread_sig_cancel on termination.
2385         Change clone call and signal masks.
2386         * thread.c (pthread_handle_sigrestart): Remove special code for
2387         manager.
2388         (pthread_handle_sigcancel): In manager thread call
2389         __pthread_manager_sighandler.
2390         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2391         * sysdeps/i386/i686/pt-machine.h: Likewise.
2392         Patches by Xavier Leroy.
2393
2394 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2395
2396         * spinlock.c (__pthread_unlock): Don't crash if called for an
2397         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2398
2399         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2400         overall runtime.
2401
2402 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2403
2404         * Examples/ex3.c: Wait until all threads are started before
2405         searching for the number to avoid race condition on very fast
2406         systems.
2407
2408 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2409
2410         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2411         declaration since it's not needed.
2412
2413         * sysdeps/pthread/pthread.h: Move internal functions to ...
2414         * internals.h: ...here.
2415
2416 1998-12-02  H.J. Lu  <hjl@gnu.org>
2417
2418         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2419         SIGRTMIN is defined.
2420         (__pthread_sig_cancel): Likewise.
2421
2422 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2423
2424         * wrapsyscall.c: Include <sys/mman.h> for msync,
2425         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2426         Correct msync declaration.
2427
2428 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2429
2430         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2431         __libc_tsd_set): New macros for new interface.
2432         * no-tsd.c: New file, provide uninitialized defns of
2433         __libc_internal_tsd_get and __libc_internal_tsd_set.
2434         * Makefile (routines): Add no-tsd.
2435
2436 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2437
2438         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2439         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2440         __libc_internal_tsd_set): Move decls to ...
2441         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2442         declarations.
2443
2444         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2445         __libc_internal_tsd_set): Make these pointers to functions, not
2446         functions; remove #pragma weak decls for them.
2447         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2448         Define static functions and initialized pointers to them.
2449
2450 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2451
2452         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2453         (CFLAGS-specific.c): Likewise.
2454         (CFLAGS-pthread.c): Likewise.
2455         (CFLAGS-ptfork.c): Likewise.
2456         (CFLAGS-cancel.c): Likewise.
2457         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2458         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2459
2460         * mutex.c (pthread_mutex_init): Define as strong symbol.
2461         (pthread_mutex_destroy): Likewise.
2462         (pthread_mutex_trylock): Likewise.
2463         (pthread_mutex_lock): Likewise.
2464         (pthread_mutex_unlock): Likewise.
2465         (pthread_mutexattr_init): Likewise.
2466         (pthread_mutexattr_destroy): Likewise.
2467         (pthread_once): Likewise.
2468         * ptfork.c (pthread_atfork): Likewise.
2469         * specific.c (pthread_key_create): Likewise.
2470         (pthread_setspecific): Likewise.
2471         (pthread_getspecific): Likewise.
2472
2473 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2474
2475         * linuxthreads.texi: Fix punctuation after xref.
2476
2477 1998-11-10  H.J. Lu  <hjl@gnu.org>
2478
2479         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2480         if it is defined in <linux/limits.h>.
2481
2482 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2483
2484         * spinlock.h (__pthread_trylock): Define inline.
2485         (__pthread_lock): Add extra parameter to declaration.  Declare
2486         using internal_function.
2487         (__pthread_unlock): Declare using internal_function.
2488         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2489         of local variable self.  Avoid recomputing self.  Define using
2490         internal_function.
2491         (__pthread_trylock): Remove.
2492         (__pthread_unlock): Define using internal_function.
2493         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2494         computed self value is possible.
2495         * condvar.c: Likewise.
2496         * join.c: Likewise.
2497         * manager.c: Likewise.
2498         * mutex.c: Likewise.
2499         * pthread.c: Likewise.
2500         * rwlock.c: Likewise.
2501         * semaphore.c: Likewise.
2502         * signals.c: Likewise.
2503
2504 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2505
2506         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2507         __ to field names of the struct.
2508         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2509         Likewise.
2510         (pthread_attr_t): Likewise.
2511         (pthread_cond_t): Likewise.
2512         (pthread_condattr_t): Likewise.
2513         (pthread_mutex_t): Likewise.
2514         (pthread_mutexattr_t): Likewise.
2515         (pthread_rwlock_t): Likewise.
2516         (pthread_rwlockattr_t): Likewise.
2517         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2518         * cancel.c: Likewise.
2519         * condvar.c: Likewise.
2520         * manager.c: Likewise.
2521         * mutex.c: Likewise.
2522         * pthread.c: Likewise.
2523         * ptlongjmp.c: Likewise.
2524         * rwlock.c: Likewise.
2525         * spinlock.c: Likewise.
2526
2527 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2528
2529         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2530         also with PT_EI.
2531
2532         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2533         definitions.
2534
2535         * Makefile (libpthread-routines): Add pt-machine.
2536         * pt-machine.c: New file.
2537         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2538         yet defined.  Use PT_EI in extern inline definitions.
2539         * sysdeps/arm/pt-machine.h: Likewise.
2540         * sysdeps/i386/pt-machine.h: Likewise.
2541         * sysdeps/i386/i686/pt-machine.h: Likewise.
2542         * sysdeps/m68k/pt-machine.h: Likewise.
2543         * sysdeps/mips/pt-machine.h: Likewise.
2544         * sysdeps/powerpc/pt-machine.h: Likewise.
2545         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2546         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2547
2548 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2549
2550         * semaphore.h: Include <sys/types.h> so that _pthread_descr
2551         is declared.
2552
2553 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
2554
2555         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2556         argument.
2557         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2558
2559 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2560
2561         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2562         guard.
2563
2564 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2565
2566         * signals.c (sigaction): Check that sig is less than NSIG to avoid
2567         array index overflow.
2568
2569 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
2570
2571         * sysdeps/pthread/semaphore.h: New file.
2572
2573 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
2574
2575         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2576         _LIBC_TSD_KEY_DL_ERROR.
2577
2578 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
2579
2580         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2581         * sysdeps/i386/pt-machine.h: Likewise.
2582         Suggested by Roland McGrath.
2583
2584 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
2585
2586         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2587         access thread data with non-constant offsets.
2588         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2589         necessary.
2590
2591         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
2592         THREAD_SETMEM_NC definitions.
2593
2594         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2595         THREAD_SETMEM_NC.
2596         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2597
2598 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
2599
2600         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2601         not already defined.
2602         (struct _pthread_descr_struct): Add p_self and p_nr field.
2603         * manager.c (__pthread_handles): Define second element to point
2604         to manager thread.
2605         (__pthread_handles_num): Initialize to 2.
2606         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2607         (pthread_start_thread): Likewise.
2608         (pthread_handle_create): Start search for free slot at entry 2.
2609         Initialize new fields p_self and p_nr.
2610         Call __clone with CLONE_PTRACE if available.
2611         (pthread_free): Call FREE_THREAD_SELF if available.
2612         * pthread.c (__pthread_initial_thread): Initialize new fields.
2613         (__pthread_manager_thread): Likewise.
2614         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2615
2616         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2617         elements of the thread descriptor.
2618         * condvar.c: Likewise.
2619         * errno.c: Likewise.
2620         * join.c: Likewise.
2621         * manager.c: Likewise.
2622         * pthread.c: Likewise.
2623         * ptlongjmp.c: Likewise.
2624         * semaphore.c: Likewise.
2625         * signals.c: Likewise.
2626         * specific.c: Likewise.
2627         * spinlock.c: Likewise.
2628
2629         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2630
2631         * sysdeps/i386/useldt.h: New file.
2632         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2633
2634         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2635         THREAD_SETMEM using __thread_self.
2636         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2637
2638 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
2639
2640         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2641         turned out that we didn't need to queue after all.
2642
2643 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
2644
2645         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2646         and wastes space; correct types.
2647
2648 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
2649
2650         * signals.c (sigaction): Handle NULL argument.
2651
2652 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
2653
2654         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2655         of sigset_t.
2656
2657 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2658
2659         * Makefile (linuxthreads-version): Extract correct number from
2660         Banner.
2661
2662 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
2663
2664         * Banner: Bump version number to 0.8
2665         * FAQ.html: Many updates, in particular w.r.t. debugging.
2666         * manager.c: Support for non-default stacksize for
2667         LinuxThreads-allocated stacks;
2668         don't use guard pages for stacks with default size, rely on
2669         rlimit(RLIMIT_STACK) instead (it's cheaper).
2670         * attr.c: Likewise.
2671         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2672         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2673         * condvar.c: Likewise.
2674         * internals.h: Likewise.
2675         * restart.h: Likewise.
2676         * signals.c: Likewise.
2677         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2678
2679 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2680
2681         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2682         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
2683         * Versions: Put __pthread_mutexattr_settype under version
2684         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
2685         __pthread_mutexattr_gettype.
2686
2687 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2688
2689         * sysdeps/pthread/bits/libc-lock.h: Make
2690         __pthread_mutexattr_settype weak.  Don't make
2691         __pthread_mutexattr_setkind_np weak.
2692
2693 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
2694
2695         * manager.c (pthread_handle_create): Check whether sched_setscheduler
2696         call can succeed here.
2697
2698         * mutex.c: Define __pthread_mutexattr_settype and make
2699         __pthread_mutexattr_setkind_np an alias.
2700         Likewise for __pthread_mutexattr_gettype.
2701
2702 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2703
2704         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2705         is root.
2706
2707 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
2708
2709         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2710
2711 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2712
2713         * Examples/ex6.c: Include <unistd.h> for usleep.
2714
2715 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2716
2717         * Examples/ex4.c (main): Use exit, not pthread_exit.
2718
2719 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
2720
2721         * Versions: Add __pthread_mutexattr_gettype and
2722         __pthread_mutexattr_settype.
2723         * lockfile.c: Use __pthread_mutexattr_settype instead of
2724         __pthread_mutexattr_setkind_np.
2725         * mutex.c: Define __pthread_mutexattr_gettype and
2726         __pthread_mutexattr_settype.
2727         * weak.c: Likewise.
2728         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2729         __pthread_mutexattr_settype.
2730         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2731         Use __pthread_mutexattr_settype.
2732
2733 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
2734
2735         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2736         * mutex.c: Define weak alias pthread_mutexattr_gettype and
2737         pthread_mutexattr_settype.
2738         * sysdeps/pthread/pthread.h: Declare these functions.
2739         Move pthread_sigmask and pthread_kill declaration in separate header.
2740         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2741
2742 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
2743
2744         * Makefile: Add rules to compile and run tests.
2745         * Examples/ex1.c: Little changes to fix warnings.
2746         * Examples/ex2.c: Likewise.
2747         * Examples/ex3.c: Likewise.
2748         * Examples/ex4.c: Likewise.
2749         * Examples/ex5.c: Likewise.
2750         * Examples/ex6.c: New file.
2751
2752 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
2753
2754         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2755
2756 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2757
2758         * attr.c: Include <string.h>.
2759
2760 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
2761
2762         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
2763         * internals.h: Include limits.h.
2764         * manager.c: Use memcpy to copy sched_param.
2765         * ptfork.c: Include errno.h.
2766         * pthread.c: Likewise.
2767         * semaphore.c: Likewise.
2768         * specific.c: Likewise.
2769         * spinlock.h: Likewise.
2770         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
2771         type definition to ...
2772         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
2773
2774 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
2775
2776         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2777
2778         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2779         as macros as demanded in POSIX.1, Annex C.
2780
2781 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
2782
2783         * internals.h (struct pthread_request): For free use pthread_t
2784         instead of pthread_descr.
2785         * join.c (pthread_join): Pass thread_id, not th to manager.
2786         (pthread_detach): Likewise.
2787         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2788         (pthread_exited): Remove detached queue code.
2789         (pthread_handle_free): Expect thread ID parameter and use it to
2790         validate the thread decsriptor.  Don't use detached queue.
2791         Patches by Xavier Leroy.
2792
2793 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2794
2795         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2796         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2797         __pthread_atfork, __pthread_key_create, __pthread_once.
2798         * internals.h: Doc fix.
2799         * pthread.c (__pthread_initialize): Define again.
2800
2801 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2802
2803         * manager.c (pthread_exited): If thread is not detached put it on
2804         special list.
2805         (pthread_handle_free): If thread is not on list with living threads
2806         search on list with detached threads.
2807
2808         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2809         for new definition of pthread_rwlock_t.
2810
2811         * spinlock.c: Correct test whether to compile
2812         __pthread_compare_and_swap or not.
2813
2814 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2815
2816         * attr.c: Finish user stack support.  Change locking code to be safe
2817         in situations with different priorities.
2818         * cancel.c: Likewise.
2819         * condvar.c: Likewise.
2820         * internals.h: Likewise.
2821         * join.c: Likewise.
2822         * manager.c: Likewise.
2823         * mutex.c: Likewise.
2824         * pthread.c: Likewise.
2825         * ptlongjmp.c: Likewise.
2826         * queue.h: Likewise.
2827         * rwlock.c: Likewise.
2828         * semaphore.c: Likewise.
2829         * semaphore.h: Likewise.
2830         * signals.c: Likewise.
2831         * spinlock.c: Likewise.
2832         * spinlock.h: Likewise.
2833         * sysdeps/pthread/pthread.h: Likewise.
2834         Patches by Xavier Leroy.
2835
2836         * sysdeps/i386/i686/pt-machine.h: New file.
2837
2838 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
2839
2840         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2841         [sg]et_stackaddr prototypes always available.
2842
2843         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2844         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2845
2846 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
2847
2848         * manager.c (pthread_free): Undo patch from 980430.
2849         Reported by David Wragg <dpw@doc.ic.ac.uk>.
2850
2851 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
2852
2853         * manager.c: Define __pthread_manager_adjust_prio and use it to
2854         increase priority when needed.
2855         * internals.h: Add prototype for __pthread_manager_adjust_prio.
2856         * mutex.c: Optimize mutexes to wake up only one thread.
2857         * pthread.c: Move PID of manager for global variable in structure
2858         element.
2859         Patches by Xavier Leroy.
2860
2861 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
2862
2863         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2864
2865 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2866
2867         * attr.c: Correct typo.
2868
2869 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
2870
2871         * manager.c (pthread_free): Unmap guard before the stack.
2872         Patch by Matthias Urlichs.
2873
2874 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
2875
2876         * manager.c (pthread_free): Detect already free child.
2877         Patch by Xavier Leroy, reported by Matthias Urlichs.
2878
2879 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2880
2881         * Makefile (linuxthreads-version): Renamed back from
2882         libpthread-version.
2883
2884 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2885
2886         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2887         __libc_longjmp.
2888
2889 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2890
2891         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2892         * internals.h: Add definitions for new spinlock implementation.
2893         * ptlongjmp.c: New file.
2894         * spinlock.c: New file.
2895         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2896         new function __pthread_acquire to prevent deadlocks with thread
2897         with different priorities.
2898         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2899
2900 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2901
2902         * manager.c (__pthread_manager): Reduce first argument to select
2903         to include just the needed file descriptor.
2904
2905 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2906
2907         * manager.c: Fix last patch which caused core dumps.
2908
2909         * pthread.c: Correctly handle missing SIGRTMIN.
2910
2911 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2912
2913         * libpthread.map: Add __libc_internal_tsd_get and
2914         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2915         libc internal versions of the cancelable functions.
2916
2917 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2918
2919         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2920
2921 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2922
2923         * attr.c: Implement pthread_attr_[gs]etguardsize,
2924         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2925         Change pthread_attr_init to have two interfaces.
2926         * internals.h (struct _pthread_descr_struct): Add new fields for
2927         above functions.
2928         * libpthread.map: Add names in GLIBC_2.1 section.
2929         * manager.c (pthread_handle_create): Implement guardsize and
2930         user stack.
2931         (pthread_free): Likewise.
2932         * pthread.c (pthread_create): Add new interface for changed
2933         pthread_attr_t.
2934         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2935         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2936         PTHREAD_STACK_MIN.
2937
2938 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2939
2940         * manager.c: Enable resetting of the thread scheduling policy
2941         to SCHED_OTHER when the parent thread has a different one.
2942
2943 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2944
2945         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2946         _POSIX_ASYNCHRONOUS_IO.
2947
2948         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2949         mutexes.
2950         * mutex.c: Implement new mutex types.
2951
2952         * internals.h: Include <signal.h>.
2953
2954         * libpthread.map: Add __erno_location and __h_errno_location.
2955
2956         * errno.c: Return pointer to variable actually in use.  This might
2957         not be the one in the thread structure.
2958         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2959         and p_h_errnop.
2960         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2961         of manager thread structure.
2962         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2963         thread.
2964         * pthread.c: Adapt initializer for thread structures.
2965         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2966         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2967         current thread to global variables.
2968
2969 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2970
2971         * rwlock.c: New file.
2972         * Makefile (libpthread-routines): Add rwlock.
2973         * sysdeps/pthread/pthread.h: Define data structures and declare
2974         functions.
2975         * libpthread.map: Add new functions.
2976
2977 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2978
2979         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2980         * sysdeps/arm/Implies: likewise.
2981         * README: Document it.
2982
2983 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2984
2985         * signals.c: Remove unneeded initializer for sigwaited, saving a
2986         warning.
2987
2988 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2989
2990         * semaphore.c (sem_init): Set sem_spinlock only if available.
2991
2992 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2993
2994         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2995         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2996
2997         * Makefile: Update from LinuxThreads 0.7.
2998         * internals.h. Likewise.
2999         * manager.c: Likewise.
3000         * mutex.c: Likewise.
3001         * pthread.c: Likewise.
3002         * signals.c: Likewise.
3003         * specific.c: Likewise.
3004         * Examples/ex3.c: Likewise.
3005
3006 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
3007
3008         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3009         open.
3010
3011 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
3012
3013         * wrapsyscall.c: Add socket functions which are also cancelation
3014         points.
3015
3016 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
3017
3018         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3019         New functions for fast thread specific data within libc.
3020
3021         * internals.h: Add new array p_libc_specific to struct
3022         _pthread_descr_struct.
3023
3024         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3025
3026 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
3027
3028         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3029         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3030
3031 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
3032
3033         * internals.h (struct _pthread_descr_struct): Add definitions for
3034         two-level specific key handling.
3035         * manager.c (pthread_handle_create): Initialize specific memory array.
3036         * specific.c: Implement two-level key handling.
3037         * weaks.c: Don't provide dummy key handling.
3038         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3039         Add definition of __libc_key_t.
3040         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3041         as 1024.
3042         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3043         PTHREAD_DESTRUCTOR_ITERATIONS.
3044
3045         * manager.c (pthread_handle_create): Compare mmap result with
3046         MAP_FAILED.
3047
3048         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3049         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3050
3051 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
3052
3053         sysdeps/sparc -> sysdeps/sparc/sparc32
3054         sysdeps/sparc64 -> sysdeps/sparc/sparc64
3055
3056         * internals.h: Change definition of THREAD_SELF to be an expression,
3057         not a statement that did a return.
3058         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3059         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3060         Follow Solaris and use a "system reserved" register (%g6) to hold
3061         the thread descriptor.
3062         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3063
3064 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
3065
3066         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
3067         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3068         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3069
3070         * semaphore.c: Include spinlock.h only when needed.
3071
3072         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3073         keys for entries not in use.
3074
3075         * weaks.c: Implement key handling functions for real.
3076
3077 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
3078
3079         Initial sparc64-linux support:
3080         * sysdeps/sparc64/Implies: New file.
3081         * sysdeps/sparc64/pt-machine.h: Likewise.
3082
3083 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
3084
3085         * semaphore.c: Include spinlock.h at correct place.
3086         Patch by HJ Lu.
3087
3088 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
3089
3090         The Great Bit File Move:
3091         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3092         * sysdeps/powerpc/semaphorebits.h: Likewise.
3093         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3094         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3095         * sysdeps/pthread/libc-lock.h: -> bits/
3096         * sysdeps/pthread/stdio-lock.h: Likewise.
3097         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3098         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3099         * semaphore.h: Likewise.
3100         * sysdeps/pthread/pthread.h: Likewise.
3101
3102         * lockfile.c: <foo.h> -> <bits/foo.h>.
3103         * semaphore.h: Likewise.
3104
3105         * Makefile: (headers): foo.h -> bits/foo.h.
3106         * sysdeps/pthread/Makefile: Likewise.
3107
3108 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3109
3110         * semaphore.c (sem_init): Set sem_spinlock only if available.
3111
3112         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3113         asm constraints.
3114
3115 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
3116
3117         Update from LinuxThreads 0.6.
3118
3119         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3120         and __sched_get_priority_min instead of names without `__'.
3121
3122         * manager.c: Rewrite large parts to implement opaque pthread_t.
3123
3124         * cancel.c: Adapt for opaque pthread_t type.
3125         * condvar.c: Likewise.
3126         * errno.c: Likewise.
3127         * join.c: Likewise.
3128         * mutex.c: Likewise.
3129         * pthread.c: Likewise.
3130         * signals.c: Likewise.
3131         * specific.c: Likewise.
3132         * restart.h: Likewise.
3133         * queue.h: Likewise.
3134         * Examples/ex3.c: Likewise.
3135         * Examples/ex4.c: Likewise.
3136         * sysdeps/pthread/pthread.h: Likewise.
3137
3138         * pthread.c: Accumulate time for all threads in thread manager.
3139
3140         * semaphore.c: Implement fallback implementation for architectures
3141         sometimes missing compare-exchange operations.
3142
3143         * cancel.c (pthread_cancel): Validate handle argument.
3144         * join.c (pthread_join): Likewise.
3145         (pthread_detach): Likewise.
3146         * signals.c (pthread_kill): Likewise.
3147
3148         * spinlock.h (acquire): Use __sched_yield not sched_yield.
3149
3150         * queue.h (enqueue): Enqueue thread according to priority.
3151
3152         * internals.c (struct pthread_start_args): New struct for passing
3153         args to cloning function.
3154         (struct _pthread): Rename to _pthread_descr_struct and adapt for
3155         opaque pthread_t.
3156
3157         * Examples/Makefile (clean): Pass -f option to rm.
3158
3159         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3160         and define TEST_FOR_COMPARE_AND_SWAP.
3161         * sysdeps/i386/i486/pt-machine.h: Removed.
3162
3163         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3164         to 1024.
3165
3166 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
3167
3168         * restart.h (suspend): Clear p_signal before suspending.
3169         (suspend_with_cancellation): Likewise.
3170         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3171
3172         * weaks.c: Make __pthread_key_create return 1.
3173         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3174         __libc_getspecific, __libc_setspecific, and __libc_key_t.
3175         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3176         using libio.
3177
3178 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
3179
3180         * sysdeps/sparc/pt-machine (RELEASE): Fix.
3181
3182 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
3183
3184         * sysdeps/powerpc/Implies: Added.
3185         * sysdeps/powerpc/pt-machine.h: Added.
3186         * sysdeps/powerpc/semaphorebits.h: Added.
3187
3188 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
3189
3190         * pthread.c (__pthread_initial_thread): Correct
3191         initializer.
3192         (__pthread_manager_thread): Likewise.
3193         Reported by Andreas Jaeger.
3194
3195 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
3196
3197         Since sigset_t no longer fits in a register, we can't pass in the
3198         thread's initial mask so easily.  Take this opportunity to simplify
3199         the clone implementation by only accepting a single void* argument.
3200
3201         * manager.c (__pthread_manager): Put thread vitals in the thread
3202         struct instead of as arguments through clone.
3203         (pthread_start_thread): Look for them there.
3204         * internals.h (struct _pthread): Add p_initial_fn,
3205         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
3206         * pthread.c (pthread_initialize_manager): Revise clone invocation.