chiark / gitweb /
Apply https://sourceware.org/git/?p=glibc.git;a=commit;h=d5dd6189d506068ed11c8bfa1e1e...
[eglibc.git] / linuxthreads / ChangeLog
1 2006-10-31  Ian Lance Taylor  <ian@airs.com>
2
3         * specific.c (__pthread_destroy_specifics): Clear pointer before
4         freeing.
5
6 2006-10-31  Mike Frysinger  <vapier@gentoo.org>
7
8         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Fix typo
9         TLS_PRE_TCB_SIZE.
10
11 2006-10-03  Richard Sandiford  <richard@codesourcery.com>
12
13         * sysdeps/m68k/pt-machine.h (__compare_and_swap): Don't define for
14         Coldfire.
15         (HAS_COMPARE_AND_SWAP): Likewise.
16         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Pass a
17         temporary register to SINGLE_THREAD_P.
18         (__local_multiple_threads): Do not mark hidden in librt.
19         (SINGLE_THREAD_P): Make the assembler version take a temporary
20         register argument.  Load __local_multiple_threads from the GOT
21         when generating PIC for librt.  Use separate PIC implementations
22         for m680x0 and Coldfire.
23         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): On Coldfire targets,
24         load the GOTPC offset into a temporary register first.
25
26 2006-10-02  Daniel Jacobowitz  <dan@codesourcery.com>
27
28         * sysdeps/pthread/gai_misc.h (__gai_start_notify_thread): Use
29         sigprocmask instead.
30         (__gai_create_helper_thread): Likewise.
31
32 2006-10-01  Petr Salinger  <Petr.Salinger@seznam..cz>
33
34         * sysdeps/pthread/gai_misc.h (__gai_start_notify_thread): Use
35         __sigprocmask.
36         (__gai_create_helper_thread): Likewise.
37
38 2006-09-22  Carlos O'Donell  <carlos@systemhalted.org>
39
40         * sysdeps/pthread/gai_misc.h: New file.
41
42 2006-09-21  Richard Sandiford  <richard@codesourcery.com>
43
44         * linuxthreads.texi (pthread_mutex_lock): Fix double close bracket.
45         Fix markup.
46
47 2006-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
48
49         * pthread.c: Check PTHREAD_SIGBASE before #error.
50         (__pthread_sig_restart, __pthread_sig_cancel,
51         __pthread_sig_debug): Use PTHREAD_SIGBASE if defined.
52         (init_rtsigs): Don't reset the signals if a port specified which
53         ones to use.
54
55 2006-07-24  Ian Lance Taylor  <ian@airs.com>
56
57         * specific.c (pthread_key_delete): Handle being called late.
58
59 2006-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
60
61         * spinlock.h (atomic_increment, atomic_decrement): Renamed to...
62         (pthread_atomic_increment, pthread_atomic_decrement): ... these.
63         * pthread.c (__pthread_restart_old, __pthread_suspend_old,
64         __pthread_timedsuspend_old): Update calls.
65
66 2006-06-02  Carlos O'Donell  <carlos@systemhalted.org>
67
68         * manager.c [USE_TLS && STACK_GROWS_UP] (pthread_free):
69         guardaddr is th->p_stackaddr.
70
71 2006-05-05  Daniel Jacobowitz  <dan@codesourcery.com>
72
73         * sysdeps/ia64/tls.h, sysdeps/s390/tls.h,
74         sysdeps/sparc/tls.h: Include <stdint.h>.
75
76 2006-05-05  Khem Raj  <kraj@mvista.com>
77
78         * sysdeps/powerpc/tls.h: Include <stdint.h>.
79
80 2006-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
81
82         * manager.c (pthread_handle_create): Use CLONE_SYSVSEM.
83         * pthread.c (__pthread_initialize_manager): Likewise.
84
85 2006-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
86
87         * Makefile (tests): Add tst-sighandler1 and tst-sighandler2.
88         * tst-sighandler1.c, tst-sighandler2.c: New files.
89         * pthread.c (pthread_onexit_process): Reset p_signal_jmp.
90
91 2006-04-26  Mike Frysinger  <vapier@gentoo.org>
92
93         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): Use +=, not =, to
94         append.  Remove duplicate flags.
95
96 2006-04-26  Petr Salinger  <Petr.Salinger@seznam.cz>
97             Daniel Jacobowitz  <dan@codesourcery.com>
98
99         [BZ #2590]
100         * sysdeps/i386/pt-machine.h: Include <kernel-features.h>
101         and <useldt.h>.  Define BUSY_WAIT_NOP.
102         * sysdeps/i386/i486/pt-machine.h: New file.
103         * sysdeps/i386/i586/pt-machine.h: New file.
104         * sysdeps/i386/i686/pt-machine.h: Use the i386 version.
105
106 2006-04-26  Daniel Jacobowitz  <dan@codesourcery.com>
107
108         Import pointer and stack guard changes from NPTL.
109         * descr.h (struct _pthread_descr_struct): Include sysinfo
110         unconditionally.  Add stack_guard and pointer_guard.
111         (PTHREAD_STRUCT_END_PADDING): Define.
112         * manager.c (pthread_handle_create): Copy the pointer and
113         stack guards.
114         * pthread.c (__pthread_initialize_manager): Likewise.
115
116         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
117         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard and pointer_guard.
118         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
119         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
120         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
121         is smaller than 16 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
122         (THREAD_SYSINFO, THREAD_SELF): Don't assume TLS_PRE_TCB_SIZE is
123         sizeof (struct _pthread_descr_struct).
124         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
125         THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
126         THREAD_COPY_POINTER_GUARD): Define.
127         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET):
128         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
129         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
130         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard and
131         pointer_guard.
132         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
133         THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
134         THREAD_COPY_POINTER_GUARD): Define.
135         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
136         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
137         field.  Put in sysinfo field unconditionally.
138         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
139         THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
140         THREAD_COPY_POINTER_GUARD): Define.
141         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
142         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
143         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
144         THREAD_COPY_POINTER_GUARD): Define.
145         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo, stack_guard,
146         and pointer_guard fields.
147         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
148         THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
149         THREAD_COPY_POINTER_GUARD): Define.
150         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
151         * sysdeps/x86_64/tcb-offsets.sym (POINTER_GUARD): New.
152         * sysdeps/x86_64/tls.h: Include <stdint.h>.
153         (tcbhead_t): Add sysinfo, stack_guard, and pointer_guard.
154         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD,
155         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): New.
156         * Makefile: Add rules to build and run tst-stackguard1{,-static}
157         tests.
158         * tst-stackguard1.c: New file.
159         * tst-stackguard1-static.c: New file.
160
161 2006-04-19  Carlos O'Donell  <carlos@systemhalted.org>
162
163         * sysdeps/hppa/pspinlock.c: Removed. 
164         * sysdeps/hppa/pt-machine.h: Likewise.
165         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: Likewise.
166         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
167         * sysdeps/unix/sysv/linux/hppa/malloc-machine.h: Likewise.
168         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
169         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: Likewise.
170         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
171
172 2006-03-02  Petr Salinger  <Petr.Salinger@seznam.cz>
173
174         * sysdeps/pthread/bits/libc-tsd.h: Use #include_next.
175
176 2006-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
177
178         * sysdeps/mips/tls.h: Include <sysdep.h>.
179
180 2006-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
181
182         * spinlock.c (__pthread_alt_unlock): Release the spinlock before
183         restarting.
184
185 2006-02-27  Roland McGrath  <roland@redhat.com>
186
187         * configure.in (libc_add_on_canonical): Set it.
188         * configure: Regenerated.
189         * Makefile: Use $(sysdirs) in vpath directive.
190         * sysdeps/pthread/Subdirs: List linuxthreads here too.
191
192 2006-01-10  Roland McGrath  <roland@redhat.com>
193
194         * ptcleanup.c: Include <jmpbuf-unwind.h>.
195
196 2006-01-08  Roland McGrath  <roland@redhat.com>
197
198         * sysdeps/i386/pspinlock.c: Use <> instead of "" in
199         #include for kernel-features.h.
200         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: Likewise.
201
202 2005-01-05  Mike Frysinger  <vapier@gentoo.org>
203
204         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Fix space typo.
205
206 2005-12-27  Roland McGrath  <roland@redhat.com>
207
208         * ptcleanup.c (demangle_ptr): New function.
209         (__pthread_cleanup_upto): Pass it to _JMPBUF_UNWINDS.
210
211 2005-12-22  Roland McGrath  <roland@redhat.com>
212
213         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
214         so that #include_next's search location is not reset to the -I..
215         directory where <nptl/...> can be found.
216
217 2005-12-15  Roland McGrath  <roland@redhat.com>
218
219         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
220
221 2005-11-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
222
223         * linuxthreads/sysdeps/sh/tls.h [!FLOATING_STACKS]
224         (INCLUDE_TLS_PADDING): New macro.
225
226 2005-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
227
228         * sysdeps/unix/sysv/linux/raise.c (raise) [IS_IN_rtld]: Just call
229         __kill.
230
231 2005-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
232
233         * descr.h (struct _pthread_descr_struct): Include padding if
234         INCLUDE_TLS_PADDING.
235
236 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
237
238         * Makefile ($(test-modules)): Remove static pattern rule.
239
240 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
241
242         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
243         Invoke CGOTSETUP and CGOTRESTORE.
244         (CGOTSETUP, CGOTRESTORE): Define.
245         (SINGLE_THREAD_P): Add variant for new PLT/GOT layout.
246         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork): Avoid
247         bl into the GOT when HAVE_ASM_PPC_REL16.
248
249 2005-05-23  Roland McGrath  <roland@redhat.com>
250
251         * sysdeps/arm, sysdeps/unix/sysv/linux/arm: Subdirectories moved to
252         ports repository.
253
254 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
255
256         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
257         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
258         __librt_*_asynccancel@local.
259
260 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
261
262         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
263         all occurrences of JUMPTARGET.  Instead append @local to labels.
264         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.
265
266 2005-05-19  Richard Henderson  <rth@redhat.com>
267
268         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Use
269         __sync_val_compare_and_swap, not explicit _si variant.
270         (__pthread_spin_trylock): Likewise.
271
272 2005-05-05  Daniel Jacobowitz  <dan@codesourcery.com>
273
274         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
275         .eh_frame section, use cfi_* directives.
276
277 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
278
279         * sysdeps/pthread/getcpuclockid.c: Include spinlock.h.
280         Fix a typo in kernel-posix-cpy-timers.h include name, use <> instead
281         of "" includes.
282         (pthread_getcpuclockid): Fix 2 typos.
283
284 2005-04-27  Roland McGrath  <roland@redhat.com>
285
286         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
287         [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
288
289 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
290
291         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
292         functionally equivalent, but shorter instructions.
293
294 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
295
296         * sysdeps/mips/tls.h: New file.
297         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
298
299 2005-03-21  GOTO Masanori  <gotom@debian.or.jp>
300
301         * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
302         unneeded o-iterator thing.
303
304 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
305
306         [BZ #1076]
307         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
308         and _fini labels.
309
310 2005-03-05  Ulrich Drepper  <drepper@redhat.com>
311
312         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
313         use -mtune.
314
315 2005-03-05  Roland McGrath  <roland@redhat.com>
316
317         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
318
319 2005-03-05  Jakub Jelinek  <jakub@redhat.com>
320
321         [BZ #721]
322         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
323
324 2005-02-09  Daniel Jacobowitz  <dan@codesourcery.com>
325
326         [BZ #740]
327         * descr.h (__pthread_find_self, thread_self): Mark as pure
328         instead of const.
329
330 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
331
332         [BZ #739]
333         * specific.c (pthread_key_delete): If pthread_create has not been
334         called yet, clear p_specific for the current thread.
335         * Makefile (tests): Add tst-tsd1.
336         * tst-tsd1.c: New test.
337
338 2005-01-08  Andreas Jaeger  <aj@suse.de>
339
340         * pthread.c (init_one_static_tls): Adjust initialization of DTV
341         entry for static tls deallocation fix.
342
343         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
344         also contains information whether the memory pointed to is static
345         TLS or not, include <stdbool.h>.
346         * sysdeps/i386/tls.h: Likewise.
347         * sysdeps/ia64/tls.h: Likewise.
348         * sysdeps/powerpc/tls.h: Likewise.
349         * sysdeps/s390/tls.h: Likewise.
350         * sysdeps/sh/tls.h: Likewise.
351         * sysdeps/sparc/tls.h: Likewise.
352         * sysdeps/x86_64/tls.h: Likewise.
353
354 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
355
356         * Makefile (tests): Add tst-align.
357         * tst-align.c: New test.
358         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
359         -mpreferred-stack-boundary=4.
360
361 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
362
363         * internals.h: Include <stdbool.h> to match includes used in nptl.
364
365 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
366
367         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
368         _POSIX_THREAD_CPUTIME): Define to 0.
369         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
370         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
371         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
372         __timer_signal_thread_tclk): Remove.
373         (init_module): Remove their initialization.
374         (thread_cleanup): Remove their cleanup assertions.
375         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
376         __timer_signal_thread_tclk): Remove.
377         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
378         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
379         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
380         * tst-clock1.c (do_test): Check for availability of CPU clock.
381
382 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
383
384         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
385         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
386
387 2004-12-02  Roland McGrath  <roland@redhat.com>
388
389         * Makefile (libpthread-nonshared): Variable removed.
390         ($(objpfx)libpthread_nonshared.a): Target removed.
391         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
392         These are now handled by generic magic from
393         libpthread-static-only-routines being set.
394
395 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
396
397         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
398         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
399         _POSIX_THREAD_PRIO_PROTECT): Define.
400         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
401         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
402         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
403
404 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
405
406         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
407         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
408         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
409         _POSIX_TYPED_MEMORY_OBJECTS): Define.
410         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
411         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
412         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
413
414 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
415
416         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
417         _ABIN32 and _ABI64 for ABI selection throughout.
418         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
419         ABI selection throughout.
420
421 2004-10-18  Roland McGrath  <roland@redhat.com>
422
423         [BZ #406]
424         * Makefile (linuxthreads-CPPFLAGS): New variable;
425         adds -DIS_IN_linuxthreads=1.
426         * sysdeps/i386/tls.h: Protect "useldt.h" with
427         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
428         * sysdeps/i386/i686/pt-machine.h: Revert last change.
429
430 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
431
432         * sysdeps/pthread/errno-loc.c: Don't undef #errno
433         if RTLD_PRIVATE_ERRNO.
434
435 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
436
437         * pthread.c: Mask restart signal during cancel signal handler.
438
439 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
440
441         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
442         _POSIX_THREAD_CPUTIME): Define to 0.
443
444 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
445
446         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
447         and _POSIX_THREAD_CPUTIME to zero.
448         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
449
450         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
451         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
452         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
453         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
454         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
455
456 2004-09-25  Roland McGrath  <roland@redhat.com>
457
458         [BZ #406]
459         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
460         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
461
462 2004-09-24  Roland McGrath  <roland@redhat.com>
463
464         [BZ #406]
465         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
466         of [__ASSUME_LDT_WORKS > 0] test.
467         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
468
469 2004-09-21  Roland McGrath  <roland@redhat.com>
470
471         * Versions: Add comment about linuxthreads' frozen ABI.
472
473 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
474
475         * Versions: Remove exports for pthread_set*id_np functions.
476         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
477         for now.
478         * Makefile: Don't build pthread_set*id code for now.
479
480 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
481
482         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
483         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
484         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
485         and pthread_setresuid_np.
486         * pthread_setgid_np.c: New file.
487         * pthread_setuid_np.c: New file.
488         * pthread_setegid_np.c: New file.
489         * pthread_seteuid_np.c: New file.
490         * pthread_setregid_np.c: New file.
491         * pthread_setreuid_np.c: New file.
492         * pthread_setresgid_np.c: New file.
493         * pthread_setresuid_np.c: New file.
494         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
495         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
496         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
497         and pthread_setresuid_np.
498         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
499         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
500         pthread_setregid, and pthread_setresgid.
501
502 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
503
504         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
505         for __USE_XOPEN2K.
506         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
507         for __USE_XOPEN2K.  [BZ #320]
508
509 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
510
511         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
512
513 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
514
515         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
516         the initialization function might throw.
517
518 2004-08-30  Roland McGrath  <roland@frob.com>
519
520         * Makefile (libpthread-abi-frozen): New variable.
521
522 2004-08-26  Roland McGrath  <roland@redhat.com>
523
524         * configure.in: New file.  If nptl add-on is also selected, barf if
525         explicit and elide ourselves if implicit.
526         * configure: Now generated.
527
528 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
529
530         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
531         __local_multiple_threads): Fix definitions for IS_IN_librt.
532         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
533
534 2004-08-22  Andreas Schwab  <schwab@suse.de>
535
536         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
537         Save gp around CENABLE/CDISABLE calls.
538
539 2004-08-15  Roland McGrath  <roland@frob.com>
540
541         * pthread_atfork.c: Update copyright terms including special exception
542         for these trivial files, which are statically linked into executables
543         that use dynamic linking for the significant library code.
544
545 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
546
547         * libc-tsd.c: Move resolv.h include before the #if.
548         (__res_maybe_init): New function.  Add libc_hidden_def.
549
550 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
551
552         * linuxthreads.texi (Cleanup Handlers): Fix typo.
553         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
554
555 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
556
557         [BZ #284]
558         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
559         instead of clockid_t.
560
561 2004-07-21  Roland McGrath  <roland@redhat.com>
562
563         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
564
565 2004-07-02  Roland McGrath  <roland@redhat.com>
566
567         * configure: Don't exit.
568
569 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
570
571         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
572         include sgidefs.h.
573         * sysdeps/mips/atomicity.h: Likewise.
574
575 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
576
577         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
578         Remove redundant override that missed -g0.
579
580 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
581
582         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
583         (__local_multiple_threads): Define for librt.
584         (SINGLE_THREAD_P): Likewise.
585
586 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
587
588         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
589         using other thread's clock.
590         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
591         * ptclock_settime.c (__pthread_clock_settime): Likewise.
592         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
593         Remove prototypes.
594         Reported by Bernd Schmidt <bernds@redhat.com>.
595         * Makefile (librt-tests): Add tst-clock1.
596         * tst-clock1.c: New test.
597
598         * sysdeps/x86_64/Versions: New file.
599         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
600         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
601
602 2004-04-16  Andreas Schwab  <schwab@suse.de>
603
604         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
605
606 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
607
608         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
609         __pthread_spin_trylock): Use constraint "m" instead of "0" for
610         futex.
611         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
612         __compare_and_swap_with_release_semantic, testandset): Use
613         constraint "m" instead of "0" for futex.
614
615 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
616
617         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
618         branch offset for a PLT entry.
619         (CDISABLE): Likewise.
620
621 2004-05-31  Andreas Jaeger  <aj@suse.de>
622
623         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
624         Set to -fno-unit-at-a-time.
625         Patch by Dan Kegel <dank@kegel.com>.
626
627 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
628
629         * tst-stack1.c: Don't include mcheck.h.
630         (do_test): Make sure user defined stacks aren't reused,
631         don't free them at the end.  [BZ #110]
632
633 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
634
635         * manager.c: Include not-cancel.h.
636         (__pthread_manager): Use read_not_cancel instead of __libc_read.
637         (pthread_start_thread, __pthread_manager_sighandler): Use
638         write_not_cancel instead of __libc_write.
639         (pthread_reap_children): Use waitpid_not_cancel instead of
640         __libc_waitpid.
641         * pthread.c: Include not-cancel.h.
642         (__pthread_initialize_minimal, __pthread_create_2_1,
643         pthread_onexit_process, __pthread_message): Use
644         write_not_cancel instead of __libc_write.
645         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
646         instead of __libc_close.
647         (__pthread_reset_main_thread): Use close_not_cancel instead of
648         __libc_close.
649         * join.c: Include not-cancel.h.
650         (__pthread_do_exit, pthread_join, pthread_detach): Use
651         write_not_cancel instead of __libc_write.
652         * semaphore.c: Include not-cancel.h.
653         (__new_sem_post): Use write_not_cancel instead of __libc_write.
654         * specific.c: Include not-cancel.h.
655         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
656
657 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
658
659         * Versions (libc): Add __on_exit and __libc_sigaction.
660
661 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
662
663         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
664         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
665
666 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
667
668         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
669         reference in PIC case.
670
671 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
672
673         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
674
675 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
676
677         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
678         for librt.  Save the return value to a safe register.
679         (CDISABLE): Define for librt.  Set the function argument correctly.
680
681 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
682
683         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
684         (PSEUDO_CANCEL): Define.
685         (PSEUDO): Use it.
686         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
687         CDISABLE): For librt, append @PLT.
688
689 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
690
691         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
692
693         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
694         return it_value { 0, 0 }.
695         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
696         like SIGEV_SIGNAL.
697         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
698         assertion for SIGEV_NONE.
699         (thread_attr_compare): Compare all attributes, not just a partial
700         subset.
701
702         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
703
704 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
705
706         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
707
708 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
709
710         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
711
712 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
713
714         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
715
716 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
717
718         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
719
720         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
721         for librt.
722         (CDISABLE): Likewise.
723
724 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
725
726         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
727         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
728         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
729         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
730         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
731         Define.
732         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
733         (_POSIX_MESSAGE_PASSING): Define.
734
735 2004-04-10  Andreas Jaeger  <aj@suse.de>
736
737         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
738         to avoid warnings with GCC 3.5.
739
740 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
741
742         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
743         __thread_self assignment.
744         (THREAD_DTV): Replace __thread_register with __thread_self.
745         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
746         assignment.
747
748 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
749
750         * signals.c (pthread_sigmask): Don't ever block or mask
751         __pthread_sig_debug.
752
753 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
754
755         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
756
757 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
758
759         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
760         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
761
762 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
763
764         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
765         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
766         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
767         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
768
769 2004-03-08  Andreas Jaeger  <aj@suse.de>
770
771         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
772         dl_osversion is readonly.
773
774 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
775
776         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
777         _rtlf_global_ro.
778         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
779
780 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
781
782         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
783         valid for SHARED case.  Correct spelling of __vmx_longjmp.
784
785         * sysdeps/powerpc/pspinlock.c: Move from here.
786         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
787         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
788         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
789         and __compare_and_swap32_with_release_semantics.
790
791 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
792
793         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
794         (tests): Remove $(objpfx)tst-stack1-mem.
795         (tst-stack1-ENV): Remove.
796         ($(objpfx)tst-stack1-mem): Remove.
797
798         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
799         (__syscall_error_handler2): Call CDISABLE.
800         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
801         (__syscall_error_handler2): Call CDISABLE.
802
803         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
804
805 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
806
807         * Makefile (libpthread-routines): Add ptcleanup.
808         * ptlongjmp.c: Removed.
809         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
810         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
811         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
812         Version longjmp, siglongjmp for GLIBC_2.3.4.
813         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
814
815 2004-01-22  Andreas Jaeger  <aj@suse.de>
816
817         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
818         (__pthread_release): Likewise.
819
820 2004-01-16  Richard Henderson  <rth@redhat.com>
821
822         * attr.c: Include ldsodefs.h.
823         (pthread_getattr_np): Don't declare __libc_stack_end.
824
825 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
826
827         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
828         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
829         __lib*_multiple_threads.
830         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
831         [!HAVE_TLS_SUPPORT]: Likewise.
832
833 2004-01-13  Roland McGrath  <roland@redhat.com>
834
835         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
836         conditionals.
837
838 2004-01-10  Andreas Jaeger  <aj@suse.de>
839
840         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
841
842 2004-01-01  Andreas Jaeger  <aj@suse.de>
843
844         * Makefile (generated): Add missing files.
845
846 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
847
848         * attr.c (pthread_getattr_np): Make sure stack info returned for
849         main thread does not overlap with any other VMA.
850         Patch by Jakub Jelinek.
851
852 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
853
854         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
855         (INIT_SYSINFO): Define.
856         (TLS_INIT_TP): Use it.
857
858 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
859
860         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
861
862 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
863
864         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
865         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
866         __THROW.
867         * semaphore.h (sem_wait, sem_timedwait): Likewise.
868
869 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
870
871         * manager.c (pthread_free): Call _dl_deallocate_tls even for
872         p_userstack threads.
873         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
874         on error.
875         (pthread_onexit_process): Update comment.
876         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
877         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
878         (tst-stack1-ENV): Set.
879         ($(objpfx)tst-stack1-mem): New.
880         * tst-stack1.c: New test.
881
882 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
883
884         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
885         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
886         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
887         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
888         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
889         Include tls.h.
890
891 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
892
893         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
894         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
895
896 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
897
898         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
899         message.  Add include of <stddef.h>.
900         (INIT_NEW_WAY): New macro.
901         (INIT_OLD_WAY): Likewise.
902         (_init): Add unwind directives.  Invoke
903         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
904         respectively.
905         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
906         directive.
907         (_fini): Add unwind directives.  Drop unnecessary .align 16
908         directive (bundles are always 16-byte aligned).
909         (_fini_EPILOG_BEGINS): Add unwind-directives.
910
911 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
912
913         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
914
915 2003-12-10  Andreas Jaeger  <aj@suse.de>
916             Ruediger Oertel  <ro@suse.de>
917
918         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
919
920 2003-11-30  Andreas Jaeger  <aj@suse.de>
921
922         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
923         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
924         Likewise.
925
926 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
927
928         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
929         __libc_sigaction if it has been one of the special values before.
930
931 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
932
933         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
934         (__pthread_find_self): Likewise.
935         * manager.c (thread_segment): _STACK_GROWS_UP case added.
936
937 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
938
939         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
940
941 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
942
943         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
944
945 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
946
947         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
948         changes.
949         (SAVE_OLDTYPE_0): Fix a typo.
950
951 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
952
953         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
954         correct offset.
955
956 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
957
958         * Makefile (tests): Add tst-cancel8.
959         * tst-cancel8.c: New test.
960
961 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
962
963         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
964         restoring of the old cancellation type.
965
966 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
967
968         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
969
970 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
971
972         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
973         mutex_lock, mutex_trylock, mutex_unlock): Remove.
974
975 2003-09-27  Wolfram Gloger  <wg@malloc.de>
976
977         * sysdeps/pthread/malloc-machine.h: New file.
978
979 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
980
981         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
982         if NEED_SEPARATE_REGISTER_STACK is defined.
983
984 2003-09-22  Philip Blundell  <philb@gnu.org>
985
986         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
987         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
988         Likewise.
989         * pthread.c (__pthread_elements): Initialise these new elements.
990         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
991         __libc_maybe_call.
992         (__libc_cleanup_pop): Likewise.
993
994 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
995
996         * attr.c: Include stdlib.h.
997
998 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
999
1000         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1001
1002         * tst-attr1.c: New test.
1003         * Makefile (tests): Add tst-attr1.
1004
1005 2003-09-17  Philip Blundell  <philb@gnu.org>
1006
1007         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
1008         libpthread is loaded.  Elide backwards compatibility code when not
1009         required.
1010
1011 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
1012
1013         * descr.h (manager_thread): Rename to...
1014         (__pthread_manager_threadp): ... this.
1015         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
1016         (__pthread_manager_threadp): New variable.
1017         * internals.h (__manager_thread): Define to
1018         __pthread_manager_threadp if USE_TLS.
1019
1020 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
1021
1022         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
1023         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
1024         -mpreferred-stack-boundary=4.
1025
1026 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
1027
1028         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
1029         values for the initial thread.
1030
1031 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
1032
1033         * pthread.c (manager_thread): Remove static, add attribute_hidden.
1034         (thread_self_stack): Rename to...
1035         (__pthread_self_stack): ... this.  Remove static.
1036         (pthread_handle_sigcancel): Use check_thread_self ().
1037         (pthread_handle_sigrestart): Likewise.
1038         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
1039         Likewise.
1040         * descr.h (manager_thread): Declare.
1041         * internals.h (__pthread_self_stack): New prototype.
1042         (__manager_thread): Define.
1043         (check_thread_self): New function.
1044
1045 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
1046
1047         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
1048         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
1049
1050 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
1051
1052         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
1053         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
1054         __SLONGWORD_TYPE otherwise.
1055
1056 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
1057
1058         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
1059         [READ_MEMORY_BARRIER]: Define.
1060         [WRITE_MEMORY_BARRIER]: Define.
1061
1062 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
1063
1064         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
1065         ptr___pthread_cond_timedwait to the end of the structure to avoid
1066         breaking Wine unnecessarily.
1067
1068 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
1069
1070         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
1071
1072 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
1073
1074         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1075         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1076         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1077         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1078         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1079         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1080         * attr.c (__old_pthread_attr_setstacksize,
1081         __old_pthread_attr_setstack): New functions.
1082         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1083         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1084         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1085         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1086         * tststack.c: Include limits.h and sys/param.h.
1087         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
1088
1089         * barrier.c (__pthread_barrierattr_getpshared): Always
1090         return PTHREAD_PROCESS_PRIVATE.
1091         (pthread_barrierattr_setpshared): Return EINVAL if pshared
1092         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1093
1094 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
1095
1096         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1097         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
1098         up in .text.
1099
1100         * barrier.c (pthread_barrierattr_setpshared): We don't handle
1101         inter-process barriers.
1102
1103 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
1104
1105         * Makefile (tests): Add tst-tls1.
1106         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
1107         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1108         ($(objpfx)tst-tls1): New.
1109         ($(objpfx)tst-tls2.out): Likewise.
1110         (tests): Depend on $(objpfx)tst-tls2.out.
1111         * tst-tls1.c: New test.
1112         * tst-tls1.h: New.
1113         * tst-tls1mod.c: New.
1114         * tst-tls1moda.c: New.
1115         * tst-tls1modb.c: New.
1116         * tst-tls1modc.c: New.
1117         * tst-tls1modd.c: New.
1118         * tst-tls1mode.c: New.
1119         * tst-tls1modf.c: New.
1120         * tst-tls2.sh: New test.
1121
1122         * internals.h (__pthread_cond_timedwait): New prototype.
1123         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1124         ptr___pthread_cond_timedwait.
1125         * pthread.c (__pthread_functions): Initialize them.
1126         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1127         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1128         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1129         pthread_cond_timedwait@@GLIBC_2.3.2.
1130
1131 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
1132
1133         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
1134         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
1135         __THROW to match NPTL.
1136
1137 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
1138
1139         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
1140         -DBROKEN_THREAD_SIGNALS.
1141
1142 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
1143
1144         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1145         Correct spelling of per thread resolver state.
1146
1147 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
1148
1149         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
1150         (__rtld_lock_default_lock_recursive,
1151         __rtld_lock_default_unlock_recursive): Define.
1152         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
1153         __rtld_lock_unlock_recursive): Define using
1154         GL(_dl_rtld_*lock_recursive).
1155         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
1156         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
1157         number of times as GL(_dl_load_lock) using non-mt implementation was
1158         nested.
1159
1160 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
1161
1162         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
1163         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
1164         Likewise.
1165         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
1166         Likewise.
1167         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
1168
1169         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
1170         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
1171         PTHREAD_STACK_MIN in comments.
1172
1173         * sysdeps/alpha/pt-machine.h (PT_EI): Add
1174         __attribute__((always_inline)).
1175         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
1176         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
1177         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
1178         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
1179         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
1180         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
1181         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
1182         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
1183         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
1184         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
1185         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
1186         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
1187         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
1188         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
1189         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
1190         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
1191         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
1192         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
1193         (__thread_self).
1194         * Examples/ex13.c (main): Change res type to void * to avoid
1195         warnings.
1196         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
1197
1198 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
1199
1200         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
1201         functions.
1202         (pthread_initialize): Initialize GL(dl_init_static_tls).
1203
1204 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
1205
1206         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
1207         before __timer_dealloc.
1208         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
1209         Don't call list_unlink.
1210
1211 2003-07-29  Roland McGrath  <roland@redhat.com>
1212
1213         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
1214
1215 2003-07-25  Roland McGrath  <roland@redhat.com>
1216
1217         * manager.c (pthread_start_thread): Fix typo in last change.
1218
1219 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
1220
1221         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
1222         use L() for local labels.
1223
1224 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
1225
1226         * descr.h (struct _pthread_descr_struct): Provide p_res member
1227         even if USE_TLS && HAVE___THREAD.
1228         * sysdeps/pthread/res-state.c (__res_state): Return __resp
1229         if USE___THREAD.
1230         * manager.c: Include resolv.h.
1231         (pthread_start_thread): Initialize __resp.
1232         * libc-tls-loc.c (__res_state): Return __resp.
1233         * Makefile (tests): Add tst-_res1.
1234         (modules-names, extra-objs, test-extras, test-modules): Add support
1235         for test modules.
1236         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1237         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1238         -lpthread.
1239         * tst-_res1.c: New test.
1240         * tst-_res1mod1.c: New test.
1241         * tst-_res1mod2.c: New test.
1242
1243 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
1244
1245         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
1246         __libc_cleanup_pop.
1247
1248         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
1249
1250 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
1251
1252         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
1253         in test for compilation in libc.
1254
1255 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1256
1257         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1258         different symbol for the cancellation syscall wrapper and
1259         non-cancellation syscall wrapper.
1260         (PSEUDO_END): Define.
1261
1262 2003-07-05  Richard Henderson  <rth@redhat.com>
1263
1264         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1265
1266 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1267
1268         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
1269         in librt.
1270
1271 2003-06-21  Andreas Schwab  <schwab@suse.de>
1272
1273         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
1274         in librt.
1275
1276 2003-06-20  Richard Henderson  <rth@redhat.com>
1277
1278         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
1279         Remove ptw-osf_sigprocmask.
1280
1281 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
1282
1283         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
1284         __librt_disable_asynccancel): Declare.
1285         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
1286         for IS_IN_librt.
1287         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
1288         in librt.
1289         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1290         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1291         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1292         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1293         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1294         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1295         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1296         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1297         * sysdeps/x86_64/tcb-offsets.sym: New file.
1298         * sysdeps/x86_64/Makefile: New file.
1299         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1300         * Versions (libc): Export __librt_enable_asynccancel,
1301         __librt_disable_asynccancel and __librt_multiple_threads as
1302         GLIBC_PRIVATE.
1303         * libc-cancellation.c (__librt_multiple_threads,
1304         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1305
1306 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
1307
1308         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1309         (SINGLE_THREAD_P): Replace @ got notation with @toc.
1310
1311 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
1312
1313         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1314         initializer [PR libc/5052].
1315
1316 2003-06-09  Andreas Schwab  <schwab@suse.de>
1317
1318         * Makefile: Move inclusion of ../Rules down after extra-objs is
1319         fully known.
1320
1321 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
1322
1323         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1324         5+ arg syscalls only needed for PIC.
1325         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1326
1327 2003-06-05  Richard Henderson  <rth@redhat.com>
1328
1329         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1330         and require CFI assembler directives.
1331         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1332
1333 2003-05-30  Andreas Jaeger  <aj@suse.de>
1334
1335         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1336         (SAVESTK_0): Add CFI directives.
1337         (SAVESTK_3): Likewise.
1338         (SAVESTK_5): Likewise.
1339         (RESTSTK_0): Likewise.
1340         (RESTSTK_3): Likewise.
1341         (RESTSTK_5): Likewise.
1342
1343 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1344
1345         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1346         messages.
1347
1348 2003-05-04  Roland McGrath  <roland@redhat.com>
1349
1350         * Makefile ($(objpfx)../libc.so): New target.
1351
1352 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1353
1354         * pthread.c (__pthread_initialize_manager): Remove one last
1355         p_multiple_threads call.
1356
1357 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1358
1359         * pthread.c (__pthread_initialize_manager): Subtract
1360         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1361         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1362         instead of sizeof (pthread_descr).
1363         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1364         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1365         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1366         pthread_descr.
1367         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1368         to TLS_TCB_ALIGN.
1369         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1370         tcbp.
1371         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1372         unneccessarily.
1373         (NO_TLS_OFFSET): Define.
1374
1375 2003-04-22  Roland McGrath  <roland@redhat.com>
1376
1377         * Makeconfig (shared-thread-library): Reverse link order to work
1378         around linker bug.
1379
1380 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1381
1382         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1383         compiler knows we use the ldt_entry variable and that the syscall
1384         modifies the memory.
1385
1386         * internals.h: Split pthread_functions definition into...
1387         * sysdeps/pthread/pthread-functions.h: ...new file.
1388
1389         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1390
1391 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1392
1393         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1394         match changes in NPTL sysdep-cancel.h.
1395
1396 2003-04-11  Roland McGrath  <roland@redhat.com>
1397
1398         * Makefile (multidir): Don't set the variable here with $(shell ...).
1399         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1400         (generated): Append it.
1401
1402 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1403
1404         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1405         (generated-dirs): Add pathname component of multidir.
1406         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1407         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1408         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1409         $(objpfx)$(multidir)/crtn.o): New.
1410         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1411         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1412         before-compile, generated): Don't generate and use specs.
1413         ($(objpfx)specs): Remove.
1414
1415 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1416
1417         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1418
1419 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1420
1421         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1422         missing ; after ENTRY use [PR libc/4997].
1423
1424 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1425
1426         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1427         in case the parent blocked it.
1428
1429 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1430
1431         * Makefile (libpthread-routines): Add pthread_atfork.
1432         (libpthread-static-only-routines): Add pthread_atfork.
1433
1434 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1435
1436         * pthread.c (__pthread_wait_for_restart_signal): Use
1437         __pthread_sigsuspend instead of sigsuspend.
1438         * internals.h (__pthread_sigsuspend): New prototype.
1439         * Makefile (libpthread-routines): Add pt-sigsuspend.
1440         (tests): Add tst-cancel7.
1441         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1442         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1443         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1444         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1445         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1446         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1447         * tst-cancel7.c: New test.
1448
1449 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1450
1451         * alloca_cutoff.c: Include internals.h.
1452         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1453         * sysdeps/pthread/herrno-loc.c: Likewise.
1454         * sysdeps/pthread/res-state.c: Likewise.
1455
1456 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1457
1458         * sysdeps/pthread/bits/typesizes.h: New file.
1459         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1460         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1461
1462 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1463
1464         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1465         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1466
1467 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1468
1469         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1470
1471 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1472
1473         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1474         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1475
1476 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1477
1478         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1479         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1480
1481 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1482
1483         * sysdeps/pthread/Makefile: Fix cut&paste error.
1484
1485 2003-03-18  Roland McGrath  <roland@redhat.com>
1486
1487         * Versions (libpthread: GLIBC_2.2): Remove
1488         pthread_barrierattr_getpshared, never really existed.
1489         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1490         (libpthread: GLIBC_PRIVATE): ... here.
1491
1492 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1493
1494         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1495         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1496         path for crt[in].o.
1497
1498 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1499
1500         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1501         mips2 on new abi.
1502         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1503         Handle 64-bit longs on n64.
1504
1505 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1506
1507         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1508         __pthread_spin_trylock): Rewritten.
1509
1510 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1511
1512         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1513         recent kernels.
1514
1515 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1516
1517         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1518         error for CPU clocks.
1519
1520         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1521         _POSIX_MONOTONIC_CLOCK.
1522         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1523
1524 2003-03-01  Roland McGrath  <roland@redhat.com>
1525
1526         * sysdeps/powerpc/powerpc64/pt-machine.h
1527         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1528         New macros.
1529         * sysdeps/powerpc/tls.h: Don't define those here.
1530
1531         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1532         tcbhead_t with multiple_threads member.
1533         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1534         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1535         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1536         derive thread register offset of p_multiple_threads member.
1537
1538         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1539         Conditionalize p_header member on this.
1540         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1541         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1542         * sysdeps/sh/tls.h: Likewise.
1543         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1544         * sysdeps/sh/tcb-offsets.sym: Likewise.
1545         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1546         (SINGLE_THREAD_P): Likewise.
1547         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1548         (SINGLE_THREAD_P): Likewise.
1549         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1550         (SINGLE_THREAD_P): Likewise.
1551         * pthread.c (__pthread_initialize_manager): Likewise.
1552         * manager.c (pthread_handle_create): Likewise.
1553
1554         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1555         related macros.
1556
1557 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1558
1559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1560         Conditionalize .toc section magic on this.
1561
1562 2003-02-21  Roland McGrath  <roland@redhat.com>
1563
1564         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1565         instead of __rpc_thread_destroy.
1566
1567 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1568
1569         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1570         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1571         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1572         Fix typo.
1573         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1574         to crti.o and crtn.o.
1575         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1576
1577 2003-02-21  Roland McGrath  <roland@redhat.com>
1578
1579         * Makefile (install-lib-ldscripts): New variable.
1580
1581 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1582
1583         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1584         interprocedure branches.
1585
1586 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1587
1588         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1589         need the target thread's lock.
1590
1591 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1592
1593         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1594         and LOGIN_NAME_MAX.
1595
1596 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1597             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1598
1599         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1600         * sysdeps/powerpc/tcb-offsets.sym: New file.
1601         * sysdeps/powerpc/tls.h: New file.
1602         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1603         (ARCH_STACK_MAX_SIZE): Define.
1604         (THREAD_SELF): Define.
1605         (INIT_THREAD_SELF): Define.
1606         (THREAD_GETMEM): Define.
1607         (THREAD_GETMEM_NC): Define.
1608         (THREAD_SETMEM): Define.
1609         (THREAD_SETMEM_NC): Define.
1610         (__thread_self): Declare.
1611         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1612         for thread register.
1613
1614 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1615
1616         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1617         Check pthread_create existance, not __pthread_fork.
1618
1619 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1620
1621         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1622
1623 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1624
1625         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1626         pthread_create existance, not __pthread_fork.
1627         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1628         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1629         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1630         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1631         Likewise.
1632         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1633         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1634         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1635         Add .weak pthread_create.
1636         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1637         Check pthread_create existance, not __pthread_fork.
1638         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1639         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1640         __fork whenever libpthread.so is loaded.
1641
1642 2003-02-09  Andreas Jaeger  <aj@suse.de>
1643
1644         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1645         Rework: %r9 is destroyed by functions so don't use it as
1646         temporary, align stack correctly, fix parameter for CDISABLE.
1647
1648 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1649
1650         * sysdeps/sh/Makefile: New file.
1651         * sysdeps/sh/tcb-offsets.sym: Likewise.
1652         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1653         of linuxthreads/descr.h after the definition of THREAD_SELF.
1654         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1655         (TLS_TCB_SIZE): Set size of tcbhead_t.
1656         (TLS_PRE_TCB_SIZE): Define.
1657         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1658         a member of thread structure.
1659         (THREAD_DTV): Likewise.
1660         (TLS_INIT_TP_EXPENSIVE): Remove.
1661         (TLS_INIT_TP): Set gbr register only.
1662         (THREAD_SELF): New.
1663         (INIT_THREAD_SELF): Likewise.
1664         (NONTLS_INIT_TP): New.
1665         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1666         Remove.
1667         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1668         SYSCALL_INST_PAD macro after DO_CALL.
1669         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1670         correct variable.
1671         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1672         whenever libpthread.so is loaded.
1673
1674 2003-02-08  Andreas Schwab  <schwab@suse.de>
1675
1676         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1677         libpthread.so is loaded.
1678
1679 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1680
1681         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1682         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1683         no __NR_vfork definition.
1684
1685 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1686
1687         * tst-popen2.c: New test.
1688         * Makefile (tests): Add tst-popen2.
1689         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1690         whenever libpthread.so is loaded.
1691         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1692         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1693         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1694         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1695         Likewise.
1696         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1697         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1698         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1699
1700 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1701
1702         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1703         variable for non-libpthread case to the same value the
1704         pthread_once function would use.
1705
1706 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1707
1708         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1709         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1710
1711 2003-02-04  Andreas Jaeger  <aj@suse.de>
1712
1713         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1714         multi-line strings.
1715
1716 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1717
1718         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1719
1720 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1721
1722         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1723         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1724         variable.
1725         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1726         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1727         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1728         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1729         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1730         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1731         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1732         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1733         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1734         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1735         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1736         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1737
1738 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1739
1740         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1741         Define TLS versions.
1742         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1743         Likewise.
1744         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1745         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1746         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1747         Define.
1748         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1749         branch with 32 bit offset.
1750         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1751
1752 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1753
1754         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1755         as required by TLS ABI.
1756         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1757         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1758         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1759         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1760         Define.
1761         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1762         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1763         instead of %g6 for thread pointer.
1764         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1765         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1766         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1767
1768 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1769
1770         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1771         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1772
1773 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1774
1775         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1776         reference to __fork.
1777
1778 2003-01-17  Richard Henderson  <rth@redhat.com>
1779
1780         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1781         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1782         (TLS_PRE_TCB_SIZE): New.
1783         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1784         new ia64-style thread pointer layout.
1785         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1786         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1787         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1788         if !SHARED.
1789
1790 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1791
1792         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1793         if USE_TLS only.
1794         (NONTLS_INIT_TP): Revert last change.
1795         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1796         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1797
1798 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1799
1800         * pthread.c (_pthread_initialize_minimal): Use
1801         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1802         been already initialized.
1803
1804 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1805
1806         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1807         if not SHARED.
1808
1809 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1810
1811         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1812         __libc_lock_init_recursive): Initialize fields directly.
1813
1814 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1815
1816         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1817         __fork to be far away from __vfork ifndef SHARED.
1818         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1819         Likewise.
1820         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1821         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1822         Add a missing instruction.
1823         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1824         branch to __fork even if __NR_vfork is not defined.
1825
1826 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1827
1828         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1829         as well.
1830
1831 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1832
1833         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1834
1835 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1836
1837         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1838
1839 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1840
1841         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1842         unterminated string literals.
1843         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1844
1845 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1846
1847         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1848         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1849         PSEUDO_END to PSEUDO.
1850         (PSEUDO_END): Remove.
1851         (SINGLE_THREAD_P): Save an instruction.
1852         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1853         parameter to SINGLE_THREAD_P call.
1854         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1855         Code reordering.
1856
1857 2003-01-10  Andreas Schwab  <schwab@suse.de>
1858
1859         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1860
1861 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1862
1863         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1864         backchain in pseudo_cancel.  Minor code improvements.
1865         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1866         Likewise.
1867
1868 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1869
1870         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1871         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1872
1873 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1874
1875         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1876
1877 2002-01-09  Richard Henderson  <rth@redhat.com>
1878
1879         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1880         ret follows pseudo, and thus avoid branch-to-branch in cancel
1881         case.  Use SYSCALL_ERROR_LABEL.
1882
1883 2003-01-11  Philip Blundell  <philb@gnu.org>
1884
1885         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1886         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1887         Correctly unstack lr.
1888         (UNDOARGS_5): Fix ordering of pushes and pops.
1889         (SINGLE_THREAD_P_PIC): New.
1890         (SINGLE_THREAD_P_INT): New.
1891         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1892         was stacked.
1893         (PSEUDO): Use SINGLE_THREAD_P_INT.
1894
1895 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1896
1897         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1898
1899 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1900
1901         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1902         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1903         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1904         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1905         INIT_THREAD_SELF): Define.
1906         [HAVE_TLS_SUPPORT]: Include descr.h.
1907         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1908         struct _pthread_descr_struct.
1909         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1910         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1911         not __thread_self.
1912         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1913         computation.
1914         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1915         for TCB pointer.
1916         (__pthread_initialize_manager): Rename tcb to mgr.
1917         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1918         _pthread_descr) below tcbp, otherwise to tcbp.
1919         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1920         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1921         before freeing.  Fix clone arguments if report_events and USE_TLS.
1922         (pthread_free): Adjust th back before freeing.
1923
1924 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1925
1926         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1927         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1928         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1929
1930 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1931
1932         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1933         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1934         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1935         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1936         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1937         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1938         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1939         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1940         * tst-popen.c: New test.
1941         * Makefile (tests): Add tst-popen.
1942
1943 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1944
1945         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1946         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1947
1948 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1949
1950         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1951         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1952
1953 2003-01-06  Philip Blundell  <philb@gnu.org>
1954
1955         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1956
1957 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1958
1959         * internals.h (LIBC_CANCEL_HANDLED): Define.
1960         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1961         * signals.c (LIBC_CANCEL_HANDLED): Add.
1962         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1963         * tst-cancel-wrappers.sh: Remove all exceptions.
1964
1965         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1966
1967 2003-01-05  Andreas Schwab  <schwab@suse.de>
1968
1969         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1970         objects.
1971
1972         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1973         Fix for PIC.
1974         (CENABLE): Likewise.
1975         (CDISABLE): Likewise.
1976
1977 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1978
1979         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1980         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1981
1982         * Makefile (libc.so-no-z-defs): Define to yes.
1983
1984 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1985
1986         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1987         (tcbhead_t): Add multiple_threads member.
1988         (TLS_INIT_TP_EXPENSIVE): Define.
1989         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1990         strings.  Remove unused code.
1991         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1992
1993 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1994
1995         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1996         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1997
1998 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1999
2000         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
2001         even if NOT_IN_libc is defined.
2002
2003 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
2004
2005         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
2006         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
2007         * sysdeps/s390/Makefile: New file.
2008         * sysdeps/s390/tcb-offsets.sym: New file.
2009         * sysdeps/s390/tls.h: New file.
2010
2011 2003-01-03  Richard Henderson  <rth@redhat.com>
2012
2013         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2014
2015 2003-01-03  Andreas Jaeger  <aj@suse.de>
2016
2017         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
2018
2019 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
2020
2021         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
2022
2023 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
2024
2025         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
2026         cancellation tests.
2027
2028 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
2029
2030         * internals.h (struct pthread_functions): Rename
2031         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
2032         * pthread.c (pthread_functions): Adjust.
2033         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
2034         pthread_cond_*@GLIBC_2.0 compatibility symbols.
2035         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
2036         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
2037         and pthread_cond_wait.
2038
2039         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
2040         type.
2041         (pthread_cond_t): Add __align member, shorten __padding.
2042         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
2043         __padding and __align too.
2044
2045         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
2046         __builtin_expect.
2047         * sysdeps/pthread/sigaction.c: New file.
2048         * sysdeps/unix/sysv/linux/raise.c: New file.
2049         * sysdeps/unix/sysv/linux/sigwait.c: New file.
2050         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
2051         weak_extern with #ifndef SHARED.
2052         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
2053         Likewise.
2054         * signals.c (__sigaction): Renamed to...
2055         (__pthread_sigaction): ... this.
2056         (__sigaction): New strong alias, #ifdef SHARED only.
2057         (sigaction): Protect with #ifdef SHARED.
2058         (sigwait): Renamed to...
2059         (__pthread_sigwait): ... this.
2060         (sigwait): New strong alias, #ifdef SHARED only.
2061         (raise): Renamed to...
2062         (__pthread_raise): ... this.
2063         (raise): New strong alias, #ifdef SHARED only.
2064         * internals.h (__pthread_sigaction, __pthread_sigwait,
2065         __pthread_raise): New prototypes.
2066         (struct pthread_functions): Add ptr_pthread_sigaction,
2067         ptr_pthread_sigwait, ptr_pthread_raise.
2068         * pthread.c (pthread_functions): Renamed to...
2069         (__pthread_functions): ... this.  No longer static, no longer
2070         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
2071         and ptr_pthread_raise.
2072         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
2073         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
2074         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
2075         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
2076
2077         * Makefile (tests, tests-static): Add tst-cancel-static.
2078         * tst-cancel-static.c: New test.
2079
2080 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
2081
2082         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
2083
2084 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
2085
2086         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
2087         * condvar.c: Add symbol versioning.  The compatibility versions
2088         are the same as the change in the interface does not effect this
2089         implementation.
2090         * Versions [libpthread]: Add definitions for new pthread_cond_*
2091         interfaces for version GLIBC_2.3.2.
2092
2093 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
2094
2095         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2096         __register_atfork.
2097         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
2098         for __register_atfork.
2099
2100 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
2101
2102         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
2103         ASSEMBLER test macro.
2104         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
2105         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2106         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
2107         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2108         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2109         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2110
2111         * sysdeps/pthread/errno-loc.c (__errno_location): Add
2112         libc_hidden_def.
2113         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
2114         * sysdeps/pthread/res-state.c (__res_state): Likewise.
2115         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
2116         __libc_current_sigrtmax): Likewise.
2117         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
2118         __libc_internal_tsd_set, __libc_internal_tsd_address,
2119         __libc_alloca_cutoff.
2120         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
2121         __libc_internal_tsd_set, __libc_internal_tsd_address.
2122
2123         * sysdeps/pthread/list.h: Remove assert.h include.
2124         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
2125
2126         * sysdeps/pthread/list.h: New file.
2127         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
2128         * sysdeps/unix/sysv/linux/fork.c: New file.
2129         * sysdeps/unix/sysv/linux/fork.h: New file.
2130         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
2131         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
2132         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
2133         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
2134         * sysdeps/unix/sysv/linux/Makefile: New file.
2135         * sysdeps/unix/sysv/linux/Versions: New file.
2136         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
2137         (__pthread_cleanup_upto): ...this. Add targetframe argument,
2138         use it instead of currentframe.  No longer static.
2139         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
2140         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
2141         (struct pthread_functions): Add ptr_pthread_fork,
2142         ptr_pthread_cleanup_upto.
2143         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
2144         ptr_pthread_cleanup_upto.
2145         * ptfork.c: Include fork.h.
2146         (struct handler_list, struct handler_list_block): Remove.
2147         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
2148         pthread_atfork_child): Remove.
2149         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
2150         (__pthread_fork): New function.
2151         (__fork, __vfork): Call __libc_fork.
2152         * Makefile (libpthread-routines): Add old_pthread_atfork.
2153         (libpthread-nonshared): Add pthread_atfork.
2154         (others): Depend on $(objpfx)libpthread_nonshared.a.
2155         ($(objpfx)libpthread_nonshared.a): New rule.
2156         (install): Depend on $(inst_libdir)/libpthread.so.
2157         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
2158         New rules.
2159         (tests): Depend on libpthread_nonshared.a too.
2160         * old_pthread_atfork.c: New file.
2161         * pthread_atfork.c: New file.
2162         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
2163         too.
2164
2165 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
2166
2167         * forward.c: Make all functions available by default again.  It
2168         caused too much trouble.
2169         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
2170         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
2171         ptr___pthread_attr_init_2_*.
2172         * pthread.c (pthread_functions): Adjust.
2173
2174 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
2175
2176         * libc_pthread_init.c (__libc_pthread_init): Remove
2177         MULTIPLE_THREADS_OFFSET check.
2178         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
2179         (SYSINFO_OFFSET): Remove.
2180         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
2181         tcb-offsets.sym.
2182         * sysdeps/i386/tcb-offsets.sym: New file.
2183         * sysdeps/pthread/tcb-offsets.h: New file.
2184         * sysdeps/sparc/sparc32/tls.h: Removed.
2185         * sysdeps/sparc/sparc64/tls.h: Move...
2186         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
2187         * sysdeps/sparc/Makefile: New file.
2188         * sysdeps/sparc/tcb-offsets.sym: New file.
2189         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
2190         * sysdeps/ia64/Makefile: New file.
2191         * sysdeps/ia64/tcb-offsets.sym: New file.
2192         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2193         (MULTIPLE_THREADS_OFFSET): Remove.
2194         Replace defined MULTIPLE_THREADS_OFFSET
2195         with defined FLOATING_STACKS && USE___THREAD.
2196         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
2197         (MULTIPLE_THREADS_OFFSET): Remove.
2198         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2199         (MULTIPLE_THREADS_OFFSET): Remove.
2200         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2201         (MULTIPLE_THREADS_OFFSET): Remove.
2202         * pthread.c (__pthread_initialize_manager): Remove
2203         MULTIPLE_THREADS_OFFSET cbeck.
2204
2205         * tst-cancel-wrappers.sh: Add line continuations.
2206
2207 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
2208
2209         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
2210         and bits/libc-lock.h.
2211         (__libc_internal_tsd_get, __libc_internal_tsd_set,
2212         __libc_internal_tsd_address): Remove.
2213         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
2214         __pthread_internal_tsd_set): New weak_externs.
2215         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
2216         using __libc_maybe_call2.
2217         (__libc_tsd_key_t): Move to ...
2218         * descr.h (__libc_tsd_key_t): ...here.
2219         Remove bits/libc-tsd.h include.
2220         * sysdeps/pthread/errno-loc.c: New file.
2221         * sysdeps/pthread/herrno-loc.c: New file.
2222         * sysdeps/pthread/res-state.c: New file.
2223         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
2224         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
2225         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
2226         of THREAD_[SG]ETMEM.
2227         * specific.c (libc_internal_tsd_set): Renamed to...
2228         __pthread_internal_tsd_set.  Remove static.
2229         (libc_internal_tsd_get): Renamed to...
2230         __pthread_internal_tsd_get.  Remove static.
2231         (libc_internal_tsd_address): Renamed to...
2232         __pthread_internal_tsd_address.  Remove static.
2233         (__libc_internal_tsd_set, __libc_internal_tsd_get,
2234         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
2235         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
2236         Define.
2237         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
2238         __pthread_internal_tsd_address): New prototypes.
2239         (struct pthread_functions): Add
2240         ptr_pthread_internal_tsd_([sg]et|address) fields.
2241         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
2242         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
2243         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
2244         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
2245         * alloca_cutoff.c: New file.
2246         * no-tsd.c: Removed.
2247         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
2248         * pt-system.c (system): Remove cancellation handling.
2249         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2250         cancellation routines.
2251
2252         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
2253         (tcbhead_t): Add sysinfo field.
2254         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
2255         (TLS_INIT_TP): Use INIT_SYSINFO.
2256         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2257         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2258         (MULTIPLE_THREADS_OFFSET): Adjust.
2259         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
2260         (MULTIPLE_THREADS_OFFSET): Likewise.
2261         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2262         (MULTIPLE_THREADS_OFFSET): Likewise.
2263         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2264         (MULTIPLE_THREADS_OFFSET): Likewise.
2265         * descr.h: Include stdint.h.
2266         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
2267
2268 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
2269
2270         * libc_pthread_init.c: Include stdlib.h.
2271         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
2272         (TLS_INIT_TP_EXPENSIVE): Define.
2273         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
2274         __libc_maybe_call2): In _LIBC check SHARED define.
2275         * sysdeps/ia64/tls.h: New file.
2276         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2277         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
2278         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
2279         * sysdeps/sparc/sparc32/tls.h: New file.
2280         * sysdeps/sparc/sparc64/tls.h: New file.
2281         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2282         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2283         * Makefile (tests): Add tst-cancel[1-6].
2284         (tests-reverse): Add tst-cancel5.
2285         Link libc.so before libpthread.so for tests-reverse.
2286         * tst-cancel1.c: New file.
2287         * tst-cancel2.c: New file.
2288         * tst-cancel3.c: New file.
2289         * tst-cancel4.c: New file.
2290         * tst-cancel5.c: New file.
2291         * tst-cancel6.c: New file.
2292
2293 2002-12-27  Andreas Schwab  <schwab@suse.de>
2294
2295         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2296
2297 2002-12-22  Roland McGrath  <roland@redhat.com>
2298
2299         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2300
2301 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
2302
2303         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2304         Reported by Art Hass <ahaas@airmail.net>.
2305
2306 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
2307
2308         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2309         Use return 0 as 6th argument to FORWARD4.
2310
2311 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2312
2313         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2314         define if __ASSUME_LDT_WORKS > 0.
2315         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2316         struct member access if !FLOATING_STACKS.
2317         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2318
2319 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2320
2321         * internals.h (__pthread_thread_self): New prototype.
2322         (struct pthread_functions): Add ptr_pthread_thread_self field.
2323         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2324         (__pthread_thread_self): New function.
2325         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2326         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2327         use thread_self() directly if not FLOATING_STACKS.
2328
2329 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2330
2331         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2332         with #ifndef __ASSEMBLER__.
2333         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2334         pthread_attr_init_2_0 use.
2335
2336 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2337
2338         * wrapsyscall.c: Removed.
2339         * weaks.c: Removed.
2340         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2341         (routines): Remove weaks.  Add forward,
2342         libc_pthread_init, libc-cancellation.
2343         (shared-only-routines): Remove weaks.  Add forward.
2344         (libpthread-routines): Remove wrapsyscall.
2345         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2346         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2347         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2348         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2349         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2350         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2351         (libpthread-shared-only-routines): Add pt-allocrtsig.
2352         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2353         ($(objpfx)tst-cancel-wrappers.out): New rule.
2354         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2355         if in libc.
2356         (__libc_maybe_call): In libpthread.* don't check for existance
2357         of the function.
2358         (__libc_maybe_call2): Define.
2359         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2360         __libc_lock_trylock, __libc_lock_unlock): Use it.
2361         * sysdeps/pthread/flockfile.c: New file.
2362         * sysdeps/pthread/ftrylockfile.c: New file.
2363         * sysdeps/pthread/funlockfile.c: New file.
2364         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2365         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2366         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2367         * libc-cancellation.c: New file.
2368         * forward.c: New file.
2369         * libc_pthread_init.c: New file.
2370         * pt-system.c: New file.
2371         * pthread.c: Remove locale.h.
2372         (__pthread_manager_thread): Initialize multiple_threads.
2373         (__pthread_multiple_threads): Declare.
2374         (pthread_functions): New variable.
2375         (__pthread_initialize_minimal): Remove __uselocale call.
2376         Call __libc_pthread_init.
2377         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2378         initial thread's multiple_threads and __libc_multiple_threads.
2379         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2380         multiple_threads.
2381         (pthread_setschedparam, pthread_getschedparam): Rename to __
2382         prefixed variants.  Add strong_alias.
2383         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2384         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2385         (init_rtsigs): Use __libc_current_sigrtmin_private.
2386         (pthread_initialize): Only call init_rtsigs if
2387         !__ASSUME_REALTIME_SIGNALS.
2388         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2389         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2390         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2391         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2392         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2393         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2394         __pthread_attr_getscope, __pthread_cond_init,
2395         __pthread_cond_destroy, __pthread_cond_wait,
2396         __pthread_cond_signal, __pthread_cond_broadcast,
2397         __pthread_condattr_init, __pthread_condattr_destroy,
2398         __pthread_equal, __pthread_getschedparam,
2399         __pthread_setschedparam, __pthread_setcancelstate,
2400         __pthread_setcanceltype, __pthread_enable_asynccancel,
2401         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2402         (__pthread_mutex_init, __pthread_mutex_destroy,
2403         __pthread_mutex_lock, __pthread_mutex_unlock,
2404         __pthread_mutex_trylock): Likewise.
2405         Add hidden_proto.
2406         (struct pthread_functions): New type.
2407         (__libc_pthread_functions): New variable.
2408         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2409         * descr.h (struct _pthread_descr_struct): Add
2410         p_header.data.multiple_threads field.
2411         * manager.c (pthread_handle_create): Initialize multiple_threads.
2412         * cancel.c (__pthread_enable_asynccancel,
2413         __pthread_disable_asynccancel): New functions.
2414         (__pthread_provide_wrappers): Remove.
2415         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2416         prefixed variants.  Add strong_alias.
2417         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2418         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2419         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2420         * join.c (pthread_exit): Likewise.
2421         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2422         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2423         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2424         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2425         pthread_attr_getinheritsched, pthread_attr_setscope,
2426         pthread_attr_getscope): Likewise.
2427         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2428         __pthread_mutex_lock, __pthread_mutex_unlock,
2429         __pthread_mutex_trylock): Add hidden_def.
2430         * Versions (libc): Add __libc_pthread_init,
2431         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2432         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2433         * lockfile.c: Remove some USE_IN_LIBIO guards.
2434         (__pthread_provide_lockfile): Remove.
2435         * pt-allocrtsig.c: New file.
2436         * tst-cancel-wrappers.sh: New test.
2437
2438 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2439
2440         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2441         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2442         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2443         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2444
2445 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2446
2447         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2448         weak.  There is no reason for that.
2449         (CANCELABLE_SYSCALL_VA): Likewise.
2450
2451 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2452
2453         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2454         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2455         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2456         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2457         libpthread in version GLIBC_2.3.2.
2458
2459 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2460
2461         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2462
2463 2002-12-05  Roland McGrath  <roland@redhat.com>
2464
2465         * pthread.c (__pthread_initialize_minimal)
2466         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2467         TCB if the dynamic linker didn't do it at startup.
2468
2469         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2470         string.
2471         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2472         Submacros updated.
2473         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2474         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2475
2476 2002-12-03  Roland McGrath  <roland@redhat.com>
2477
2478         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2479         from dynamic linker internal cell to new libc cell.
2480
2481 2002-11-28  Roland McGrath  <roland@redhat.com>
2482
2483         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2484         before other headers, so FLOATING_STACKS is not defined wrongly.
2485
2486         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2487         even if [! FLOATING_STACKS].
2488         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2489         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2490         dl_osversion >= 2.3.99 and fatal if not.
2491         (TLS_DO_MODIFY_LDT): Use it.
2492
2493 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2494
2495         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2496         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2497         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2498
2499 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2500
2501         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2502         not defined in libc.
2503         * Makefile (shared-only-routines): Add weaks.
2504         * weaks.c: Remove functions which are not exported from libc.so.
2505
2506 2002-11-14  Roland McGrath  <roland@redhat.com>
2507
2508         * libc-tsd.c: New file.
2509         * Makefile (distribute): Add it.
2510         (libc-link.so): New variable.
2511         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2512         (libc-ok-for-link): New variable.
2513         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2514         libc-ok-for-link to $(use-thread).
2515         [$(libc-ok-for-link) = no]
2516         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2517         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2518         New targets.
2519         (generated): Append them.
2520         (extra-objs): Append libc-tsd.os.
2521
2522         * libc-tls-loc.c: New file.
2523         * Makefile (libpthread-routines): Add it.
2524
2525 2002-11-14  Andreas Schwab  <schwab@suse.de>
2526
2527         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2528         string.
2529
2530 2002-11-13  Roland McGrath  <roland@redhat.com>
2531
2532         * Examples/ex6.c (main): Improve error reporting.
2533
2534 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2535
2536         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2537         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2538
2539         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2540         register number.
2541         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2542
2543 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2544
2545         * manager.c (pthread_start_thread): Call __uselocale even
2546         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2547
2548 2002-10-17  Roland McGrath  <roland@redhat.com>
2549
2550         * Makefile (unload): Don't link in libpthread.so.
2551         ($(objpfx)unload.out): Do depend on it.
2552         * unload.c (main): Improve error reporting.
2553
2554 2002-10-09  Roland McGrath  <roland@redhat.com>
2555
2556         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2557         Under [__PIC__], call the function via the pointer fetched for
2558         comparison rather than a call by name that uses the PLT.
2559         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2560         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2561         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2562         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2563         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2564         (__libc_atfork): Use it.
2565
2566         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2567         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2568         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2569         (ld: GLIBC_PRIVATE): Set removed.
2570
2571 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2572
2573         * sysdeps/unix/sysv/linux/execve.c: New file.
2574
2575 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2576
2577         * no-tsd.c: Include stdlib.h.
2578
2579 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2580
2581         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2582         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2583         field.
2584         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2585         Pass stack size to caller.
2586         (pthread_handle_create): Set p_alloca_cutoff.
2587         * pthread.c (__pthread_initial_thread): Use C99 designated
2588         initializers.  Set p_alloca_cutoff.
2589         (__pthread_manager_thread): Likewise.
2590         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2591         for initial thread.
2592         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2593         for initial thread.
2594         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2595         for manager thread.
2596         * specific.c (__libc_alloca_cutoff): New function.
2597         * no-tsd.c (__libc_alloca_cutoff): New function.
2598         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2599         and libpthread.
2600
2601 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2602
2603         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2604         * sysdeps/sh/tls.h: Likewise.
2605         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2606
2607 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2608
2609         * sysdeps/pthread/tst-timer.c (main): Clear
2610         SIGEV2.sigev_notify_attributes.
2611
2612 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2613
2614         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2615         INLINE_SYSCALL for set_thread_area syscall.
2616
2617 2002-09-28  Roland McGrath  <roland@redhat.com>
2618
2619         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2620         Don't call setrlimit, since we did no prior bogon we need to undo.
2621
2622 2002-09-27  Roland McGrath  <roland@redhat.com>
2623
2624         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2625
2626 2002-09-24  Roland McGrath  <roland@redhat.com>
2627
2628         * sysdeps/x86_64/tls.h: New file.
2629
2630 2002-09-23  Roland McGrath  <roland@redhat.com>
2631
2632         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2633
2634 2002-09-18  Bruno Haible  <bruno@clisp.org>
2635
2636         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2637         an unexpected error code.
2638
2639         * internals.h (__pthread_message): Add const to first parameter type.
2640         * pthread.c (__pthread_message): Likewise.
2641
2642         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2643
2644 2002-09-17  Roland McGrath  <roland@redhat.com>
2645
2646         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2647         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2648         offset (positive or negative) relative to the thread struct.
2649         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2650
2651 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2652
2653         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2654         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2655         Replace /usr/lib/crt[in].o with crt[in].o too.
2656
2657 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2658
2659         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2660
2661 2002-09-04  Bruno Haible  <bruno@clisp.org>
2662
2663         * pthread.c: Include <sys/time.h>.
2664         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2665         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2666         * Makefile (distribute): Add smp.h to the list.
2667
2668 2002-09-04  Bruno Haible  <bruno@clisp.org>
2669
2670         * sysdeps/alpha/pt-machine.h: Choose different include file location
2671         on non-Linux platforms.
2672
2673         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2674         (open, open64): Change va_arg argument type to the integral type to
2675         which mode_t promotes.
2676
2677         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2678         the structure of 'struct sigevent'.
2679
2680         * errno.c (__errno_location, __h_errno_location, __res_state):
2681         Use prototype function definitions.
2682
2683 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2684
2685         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2686         * sysdeps/powerpc/pt-machine.h: moved to...
2687         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2688         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2689
2690 2002-09-02  Roland McGrath  <roland@redhat.com>
2691
2692         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2693
2694 2002-09-01  Roland McGrath  <roland@redhat.com>
2695
2696         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2697         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2698
2699         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2700         (__libc_internal_tsd_address): Declare it.
2701         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2702         __libc_internal_tsd_address.
2703         * specific.c (libc_internal_tsd_address): New function.
2704         (__libc_internal_tsd_address): New variable.
2705         * no-tsd.c (__libc_internal_tsd_address): New variable.
2706
2707 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2708
2709         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2710         crti.o and crtn.o.
2711
2712 2002-08-30  Roland McGrath  <roland@redhat.com>
2713
2714         * Makefile (extra-objs, omit-deps): Add crtn.
2715         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2716         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2717         ($(objpfx)crtn.S): New target.
2718         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2719         (generated): Add crtn.S.
2720
2721         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2722         crtn.o pathname too.
2723
2724 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2725
2726         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2727         if [! SHARED].
2728
2729 2002-08-30  Roland McGrath  <roland@redhat.com>
2730
2731         * tst-static-locale.c: New file.
2732         * Makefile (tests, tests-static): Add it.
2733
2734 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2735
2736         * spinlock.c (__pthread_lock): Fix spurious wakeup
2737         handling.  Don't clear lowest bit of list pointer as sign the thread
2738         is still on the wait list.  Don't restart after spurious wakeup
2739         with spinning to get the lock.
2740         (__pthread_unlock): Take set lowest bit into account when handling
2741         pointer to list elements.
2742         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2743
2744 2002-08-28  Roland McGrath  <roland@redhat.com>
2745
2746         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2747
2748 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2749
2750         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2751         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2752         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2753
2754 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2755
2756         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2757         type to void and add casts in use to avoid warnings with all gcc
2758         versions.
2759
2760 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2761
2762         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2763         Bump to 16384.
2764         * manager.c (__pthread_handles): Remove.
2765         * pthandles.c: New file.
2766         * pthread.c (__pthread_initialize_minimal): Initialize
2767         __pthread_handles[0] and __pthread_handles[1].
2768         * Makefile (libpthread-routines): Add pthandles (must be last).
2769
2770 2002-08-26  Brian Youmans  <3diff@gnu.org>
2771
2772         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2773         permission notice from 2 to 2.1.
2774         * Examples/ex11.c: Likewise.
2775         * Examples/ex13.c: Likewise.
2776         * Examples/ex8.c: Likewise.
2777         * Examples/ex9.c: Likewise.
2778         * barrier.c: Likewise.
2779         * events.c: Likewise.
2780         * lockfile.c: Likewise.
2781         * no-tsd.c: Likewise.
2782         * pt-machine.c: Likewise.
2783         * ptclock_gettime.c: Likewise.
2784         * ptclock_settime.c: Likewise.
2785         * rwlock.c: Likewise.
2786         * sysdeps/alpha/pspinlock.c: Likewise.
2787         * sysdeps/alpha/pt-machine.h: Likewise.
2788         * sysdeps/arm/pspinlock.c: Likewise.
2789         * sysdeps/arm/pt-machine.h: Likewise.
2790         * sysdeps/cris/pspinlock.c: Likewise.
2791         * sysdeps/cris/pt-machine.h: Likewise.
2792         * sysdeps/hppa/pspinlock.c: Likewise.
2793         * sysdeps/hppa/pt-machine.h: Likewise.
2794         * sysdeps/i386/i686/pt-machine.h: Likewise.
2795         * sysdeps/i386/pspinlock.c: Likewise.
2796         * sysdeps/i386/pt-machine.h: Likewise.
2797         * sysdeps/i386/useldt.h: Likewise.
2798         * sysdeps/ia64/pspinlock.c: Likewise.
2799         * sysdeps/ia64/pt-machine.h: Likewise.
2800         * sysdeps/m68k/pspinlock.c: Likewise.
2801         * sysdeps/m68k/pt-machine.h: Likewise.
2802         * sysdeps/mips/pspinlock.c: Likewise.
2803         * sysdeps/mips/pt-machine.h: Likewise.
2804         * sysdeps/powerpc/pspinlock.c: Likewise.
2805         * sysdeps/powerpc/pt-machine.h: Likewise.
2806         * sysdeps/pthread/bits/initspin.h: Likewise.
2807         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2808         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2809         * sysdeps/pthread/getcpuclockid.c: Likewise.
2810         * sysdeps/pthread/posix-timer.h: Likewise.
2811         * sysdeps/pthread/timer_create.c: Likewise.
2812         * sysdeps/pthread/timer_delete.c: Likewise.
2813         * sysdeps/pthread/timer_getoverr.c: Likewise.
2814         * sysdeps/pthread/timer_gettime.c: Likewise.
2815         * sysdeps/pthread/timer_routines.c: Likewise.
2816         * sysdeps/pthread/timer_settime.c: Likewise.
2817         * sysdeps/pthread/tst-timer.c: Likewise.
2818         * sysdeps/s390/pspinlock.c: Likewise.
2819         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2820         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2821         * sysdeps/sh/pspinlock.c: Likewise.
2822         * sysdeps/sh/pt-machine.h: Likewise.
2823         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2824         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2825         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2826         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2827         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2828         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2829         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2830         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2831         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2832         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2833         * tststack.c: Likewise.
2834         * unload.c: Likewise.
2835         * weaks.c: Likewise.
2836         * wrapsyscall.c: Likewise.
2837
2838         * sysdeps/pthread/pt-initfini.c: Changed copying
2839         permission notice to Lesser GPL from Library GPL, including the
2840         references in the special exception.
2841         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2842         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2843         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2844         Likewise.
2845         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2846         Likewise.
2847         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2848
2849 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2850
2851         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2852         overflow [PR libc/4244].
2853
2854 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2855
2856         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2857         compiler happy by adding a return statement which will never be
2858         reached.
2859
2860         * tst-context.c (main): Cast to long before casting to pointer.
2861
2862         * Examples/ex17.c (main): Use correct format string.
2863
2864         * Examples/ex9.c (thread): Remove incorrect return statement.
2865
2866 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2867
2868         * pthread.c (__linuxthreads_version): New global constant.
2869
2870 2002-08-23  Andreas Jaeger  <aj@suse.de>
2871
2872         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2873         as thread specific register.
2874         (testandset): Fix inline asm.
2875         (THREAD_GETMEM): Fix inline asm.
2876
2877 2002-08-22  Roland McGrath  <roland@redhat.com>
2878
2879         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2880         conditional.
2881         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2882         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2883         macro.  That chooses whether to reuse %gs value or let kernel set it.
2884         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2885         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2886         not constant 0.
2887
2888 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2889
2890         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2891         also to the third definition of this macro.
2892
2893 2002-06-17  Andreas Jaeger  <aj@suse.de>
2894
2895         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2896         Set it.
2897
2898 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2899
2900         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2901         loading/reading segment registers.  Some old hardware doesn't
2902         handle the 32-bit instructions as expected.
2903         * sysdeps/i386/tls.h: Likewise.
2904
2905         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2906         renamed to secondcall and use is negated.
2907         (TLS_SETUP_GS_SEGMENT): Likewise.
2908         (TLS_INIT_TP): Likewise.
2909         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2910         secondcall.
2911
2912         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2913         registers.  No need to mask upper 16 bits in this case.
2914         * sysdeps/i386/useldt.h: Likewise.
2915         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2916         is the same since the GDT content changed.
2917
2918         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2919         to TLS_SETUP_GS_SEGMENT.
2920         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2921         TLS_DO_SET_THREAD_AREA.
2922         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2923         entry number from %gs value.
2924         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2925         ignore it.
2926
2927         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2928         Pass true to _dl_deallocate_tls.
2929         (pthread_free): Likewise.
2930         * pthread.c (__pthread_initialize_manager): Likewise.
2931
2932 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2933
2934         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2935         computing index from %gs value.
2936
2937 2002-08-16  Roland McGrath  <roland@redhat.com>
2938
2939         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2940         register value from entry number properly.
2941
2942         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2943         optimally conditional on [__PIC__].
2944         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2945         without touching errno, and use latest modify_ldt-like interface.
2946         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2947         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2948         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2949         existing %gs value as the segment to set.
2950         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2951         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2952         by the first thread's early TLS setup.
2953
2954 2002-08-15  Roland McGrath  <roland@redhat.com>
2955
2956         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2957         return a value as callers now expect.
2958
2959 2002-08-11  Roland McGrath  <roland@redhat.com>
2960
2961         * pthread.c (__pthread_initialize_manager): Initialize
2962         p_header.data.tcb field of manager thread's descriptor.
2963         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2964         field, already done by TLS_INIT_TP.
2965
2966         * manager.c (pthread_handle_create): Move p_header field initializers
2967         together.
2968
2969 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2970
2971         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2972
2973 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2974
2975         * pthread.c (__linuxthreads_initial_report_events): New variable.
2976         (__pthread_initialize_manager): Use it to initialize p_report_events
2977         of initial thread.
2978         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2979
2980 2002-08-07  Roland McGrath  <roland@redhat.com>
2981
2982         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2983         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2984
2985 2002-08-02  Roland McGrath  <roland@redhat.com>
2986
2987         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2988         Add _LIBC_TSD_KEY_LOCALE.
2989         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2990         Call __uselocale to initialize our per-thread locale pointer to
2991         the global one.
2992         * pthread.c (__pthread_initialize_minimal): Likewise.
2993
2994         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2995
2996 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2997
2998         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2999         internally.
3000
3001         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
3002         Don't use p_libc_specific element in thread descriptor.
3003
3004 2002-07-30  Roland McGrath  <roland@redhat.com>
3005
3006         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
3007         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
3008         which does the right thing when __thread support is available.
3009         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
3010         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
3011         `p_h_errno', `p_resp', and `p_res' members.
3012         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
3013         Don't initialize `p_errnop' and `p_h_errnop' members.
3014         (__pthread_reset_main_thread): Likewise.
3015         (__pthread_initialize_manager): Likewise.
3016         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
3017         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
3018         Don't initialize `p_resp' member.
3019         (__pthread_reset_main_thread): Likewise.
3020         * manager.c (pthread_handle_create): Likewise.
3021         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
3022         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
3023         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
3024         * errno.c [USE_TLS && HAVE___THREAD]
3025         (__h_errno_location, __res_state): Don't define these at all.
3026
3027         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
3028         (INSTALL_NEW_DTV, GET_DTV): Likewise.
3029         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
3030
3031         * weaks.c: Don't include <errno.h> here.
3032
3033 2002-08-01  Roland McGrath  <roland@redhat.com>
3034
3035         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
3036         TLS_INIT_TP.
3037         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
3038         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
3039         (TLS_INIT_TP): Use that.
3040
3041 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
3042
3043         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
3044         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
3045         (FREE_THREAD): Avoid modify_ldt if using GDT.
3046         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
3047
3048 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
3049
3050         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
3051         * sysdeps/i386/pt-machine.h: Likewise.
3052         * sysdeps/i386/useldt.h: Likewise.
3053
3054 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
3055
3056         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
3057         call __libc_setup_tls first.
3058         * Makefile: Actually create tst-signal.out file when running the test.
3059         (tests): Add tststatic.
3060         * Examples/tststatic.c: New file.
3061
3062 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
3063
3064         * errno.c (__errno_location): Don't define unless !USE_TLS
3065         || !HAVE___THREAD.
3066         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
3067         * sysdeps/i386/tls.h: Likewise.
3068         * sysdeps/i386/useldt.h: Likewise.
3069         * sysdeps/i386/i686/pt-machine.h: Likewise.
3070
3071 2002-07-02  H.J. Lu  <hjl@gnu.org>
3072
3073         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
3074         use ll/sc.
3075         * sysdeps/mips/pt-machine.h: Likewise.
3076
3077 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
3078
3079         * manager.c (pthread_handle_create): Initialize self-reference in
3080         descriptor.
3081
3082 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
3083
3084         * Examples/ex9.c (main): Remove unused th variable.
3085
3086 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
3087
3088         * wrapsyscall.c: Add __nanosleep alias.
3089         * Versions (GLIBC_2.2.6): Add __nanosleep.
3090         * bug-sleep.c: New file.
3091         * Makefile (tests): Add bug-sleep.
3092
3093 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
3094
3095         * Examples/ex9.c (main):  Use list of children and join them.
3096         (thread): Do not call exit.
3097
3098 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
3099
3100         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
3101         Unconditionally use the code using spinlock.  Use __pthread_release
3102         to free a spinlock.
3103         (wait_node_free): Likewise.
3104         (__pthread_acquire, __pthread_release): Unconditionally define.
3105
3106 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
3107
3108         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
3109
3110 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
3111
3112         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
3113
3114 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
3115
3116         * sysdeps/pthread/pthread.h (pthread_create): Rename first
3117         parameter.
3118         (pthread_cancel): Likewise.
3119         * internals.h (__pthread_create_2_1): Likewise.
3120         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
3121
3122 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
3123
3124         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
3125         Patch by Glen Nakamura <gen@flex.com>.
3126
3127 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
3128
3129         * signals.c: Move sighandler functions to...
3130         * sighandler.c: ...here.  New file.
3131         * signals.c: Move signal handler related type definitions to...
3132         * internals.h: ...here.  Add prototypes for signal handlers.
3133         * Makefile (libpthread-routines): Add sighandler.
3134         (CFLAGS-sighandler.c): Add $(exceptions).
3135
3136 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
3137
3138         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
3139
3140 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
3141
3142         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
3143         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
3144         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
3145         based on previous one and not on current time.  Count overruns.
3146         Patch by Eric F. Sorton <eric@cctcorp.com>.
3147
3148         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
3149
3150 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3151
3152         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
3153         if it isn't defined yet.
3154         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
3155         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3156         Likewise.
3157         * sysdeps/sh/tls.h: New file.
3158
3159 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
3160
3161         * manager.c (__pthread_manager_event): Use self instead of arg
3162         for INIT_THREAD_SELF.
3163         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
3164         _pthread_descr_struct) instead of sizeof (*descr).
3165
3166 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
3167
3168         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
3169         * sysdeps/alpha/pt-machine.h: Likewise.
3170         * sysdeps/arm/pt-machine.h: Likewise.
3171         * sysdeps/cris/pt-machine.h: Likewise.
3172         * sysdeps/hppa/pt-machine.h: Likewise.
3173         * sysdeps/m68k/pt-machine.h: Likewise.
3174         * sysdeps/mips/pt-machine.h: Likewise.
3175         * sysdeps/powerpc/pt-machine.h: Likewise.
3176         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
3177         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3178         * sysdeps/sh/pt-machine.h: Likewise.
3179         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3180         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3181         * sysdeps/x86_64/pt-machine.h: Likewise.
3182
3183 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
3184
3185         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
3186         instead of pthread_mutexattr_setkind_np.
3187         (pthread_mutexattr_gettype): Similarly.
3188         * man/pthread_mutexattr_setkind_np.man: New.
3189         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
3190
3191 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
3192
3193         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
3194
3195 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
3196
3197         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
3198
3199 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
3200
3201         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
3202
3203 2002-03-17  Andreas Jaeger  <aj@suse.de>
3204
3205         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
3206         prototpyes.
3207         * sysdeps/alpha/pt-machine.h: Likewise.
3208         * sysdeps/arm/pt-machine.h: Likewise.
3209         * sysdeps/cris/pt-machine.h: Likewise.
3210         * sysdeps/hppa/pt-machine.h: Likewise.
3211         * sysdeps/i386/i686/pt-machine.h: Likewise.
3212         * sysdeps/ia64/pt-machine.h: Likewise.
3213         * sysdeps/m68k/pt-machine.h: Likewise.
3214         * sysdeps/mips/pt-machine.h: Likewise.
3215         * sysdeps/powerpc/pt-machine.h: Likewise.
3216         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
3217         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3218         * sysdeps/sh/pt-machine.h: Likewise.
3219         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3220         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3221         * sysdeps/x86_64/pt-machine.h: Likewise.
3222
3223         * internals.h: Move testandset and __compare_and_swap prototypes
3224         to pt-machine.h.
3225
3226 2002-03-03  Andreas Jaeger  <aj@suse.de>
3227
3228         * errno.c: Include resolv.h to avoid warning.
3229
3230 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
3231
3232         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
3233         stack limit.
3234
3235 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
3236
3237         * attr.c (pthread_getattr_np): Don't take thread descriptor size
3238         into account if USE_TLS.
3239         * manager.c (pthread_handle_create): Free TLS data structures if call
3240         failed.  Pass correct stack to clone if USE_TLS.
3241         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
3242         * sysdeps/i386/i686/pt-machine.h: Likewise.
3243         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
3244
3245         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
3246         Add p_stackaddr element #if USE_TLS.
3247         * internals.c: Include <tls.h>.
3248         * manager.c: Integrate creating and handling of thread descriptor
3249         for TLS.
3250         * pthread.c: Likewise.
3251         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
3252         Include <linuxthreads/descr.h> only if TLS is really used.
3253         (GET_DTV): New macro.
3254         (TLS_INIT_TP): Initialize self pointer.
3255
3256 2002-02-17  Andreas Schwab  <schwab@suse.de>
3257
3258         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
3259         not NULL.
3260
3261 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
3262
3263         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
3264         (INSTALL_DTV): Adjust for being passed pointer to element with length.
3265
3266 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3267
3268         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
3269
3270 2002-02-08  Richard Henderson  <rth@redhat.com>
3271
3272         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
3273
3274 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3275
3276         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
3277         after all.
3278
3279 2002-02-07  H.J. Lu  <hjl@gnu.org>
3280
3281         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
3282         gcc warning.
3283         (__pthread_spin_lock): Remove ".set noreorder".
3284         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
3285
3286 2002-02-05  H.J. Lu  <hjl@gnu.org>
3287
3288         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
3289         branch likely.
3290         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3291         (__compare_and_swap): Likewise.
3292
3293 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
3294
3295         * internals.h: Move declarations/definitions of
3296         __pthread_initial_thread_bos, __pthread_initial_thread,
3297         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3298         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3299         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3300         * descr.h: ...here.
3301         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3302         Define THREAD_GETMEM accordingly.
3303
3304 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
3305
3306         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3307
3308         * sysdeps/i386/tls.h: Define THREAD_DTV.
3309
3310 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
3311
3312         * internals.h: Move thread descriptor definition...
3313         * descr.h.: ...here.  New file.
3314         * sysdeps/i386/tls.h: New file.
3315
3316 2002-02-01  H.J. Lu  <hjl@gnu.org>
3317
3318         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3319         different register in the delayed slot.  Use branch likely.
3320
3321         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3322         (__compare_and_swap): Return 0 only when failed to compare. Use
3323         branch likely.
3324
3325 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3326
3327         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3328         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3329         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3330         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3331         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3332         * sysdeps/sparc/sparc64/Versions: New file.
3333         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3334
3335 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3336
3337         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3338         in SHARED code, use GL(dl_cpuclock_offset).
3339
3340 2002-01-28  Andreas Jaeger  <aj@suse.de>
3341
3342         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3343         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3344
3345 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3346
3347         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3348         (CURRENT_STACK_FRAME): Remove duplicate definition.
3349         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3350
3351 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3352
3353         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3354         automatic inline.
3355
3356 2002-01-12  Andreas Schwab  <schwab@suse.de>
3357
3358         * Makefile (test-srcs): Add tst-signal.
3359         (tests): Run tst-signal.
3360         (distribute): Add tst-signal.sh.
3361         * tst-signal.c, tst-signal.sh: New files.
3362
3363 2002-01-14  Andreas Jaeger  <aj@suse.de>
3364
3365         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3366
3367 2002-01-11  Andreas Schwab  <schwab@suse.de>
3368
3369         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3370         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3371
3372 2002-01-06  Richard Henderson  <rth@redhat.com>
3373
3374         * sysdeps/alpha/elf/pt-initfini.c: New file.
3375
3376 2001-12-29  Andreas Jaeger  <aj@suse.de>
3377
3378         * Examples/ex9.c: Add noreturn attribute for thread.
3379         * Examples/ex10.c: Likewise.
3380         * Examples/ex13.c (thread_start): Likewise.
3381         * Examples/ex15.c (worker): Likewise.
3382
3383         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3384
3385 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3386
3387         * man/pthread_atfork.man: Adjust description of mutex handling
3388         after fork for current implementation.
3389         * linuxthreads.texi: Likewise [PR libc/2519].
3390
3391 2001-12-13  Andreas Schwab  <schwab@suse.de>
3392
3393         * specific.c (pthread_key_delete): Don't contact the thread
3394         manager if no threads have been created yet.
3395
3396 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3397
3398         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3399         qualifier to be safe.
3400
3401 2001-11-30  Andreas Schwab  <schwab@suse.de>
3402
3403         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3404         that self is the manager thread, and initialize the thread
3405         register if not.
3406         (thread_self_stack) [THREAD_SELF]: New function to find self via
3407         stack pointer.
3408         * manager.c (pthread_handle_create): Don't block cancel signal any
3409         more.
3410
3411 2001-11-29  Andreas Jaeger  <aj@suse.de>
3412
3413         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3414         (THREAD_SELF): New.
3415         (INIT_THREAD_SELF): New.
3416         (THREAD_GETMEM): New.
3417         (THREAD_GETMEM_NC):
3418         (THREAD_SETMEM): New.
3419         (THREAD_SETMEM_NC): New.
3420         (FLOATING_STACKS): Define.
3421         (ARCH_STACK_MAX_SIZE): Define.
3422
3423 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3424
3425         Bugfix to pthread_key_delete. It was iterating over the thread
3426         manager's linked list of threads, behind the thread manager's
3427         back causing a race. The fix is to have the manager iterate over
3428         the threads instead, using a new request type for doing so.
3429         * internals.h (struct pthread_request): New manager request type
3430         REQ_FOR_EACH_THREAD.
3431         * manager.c (pthread_for_each_thread): New function.
3432         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3433         * specific.c (struct pthread_key_delete_helper_args): New type.
3434         (pthread_key_delete_helper): New static function.
3435         (pthread_key_delete): Use the new thread manager
3436         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3437         the delete key slot to a null value in each thread.
3438         * Examples/ex18.c: New test.
3439         * Makefile (tests): Add ex18.
3440
3441 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3442
3443         * pthread.c (pthread_onexit_process): Don't call free
3444         after threads have been asynchronously terminated.
3445
3446         * manager.c (pthread_handle_exit): Surround cancellation
3447         of threads with __flockfilelist()/__funlockfilelist().
3448
3449 2001-11-26  Andreas Schwab  <schwab@suse.de>
3450
3451         * manager.c (pthread_handle_create): Start the child thread with
3452         the cancel signal blocked, so that it does not handle it before
3453         the thread register is set up.  Save errno from failed clone call.
3454
3455 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3456
3457         * sysdeps/i386/i686/Implies: Removed.
3458         * sysdeps/i386/i686/Versions: New file.
3459
3460 2001-10-31  Andreas Jaeger  <aj@suse.de>
3461
3462         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3463
3464 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3465
3466         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3467         to __linuxthreads_pthread_sizeof_descr to match name used by
3468         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3469         linuxthreads_db/td_symbol_list.c.
3470
3471 2001-09-22  Andreas Jaeger  <aj@suse.de>
3472
3473         * linuxthreads/tst-context.c: Avoid compile warning.
3474
3475 2001-09-20  Andreas Jaeger  <aj@suse.de>
3476
3477         * shlib-versions: Add x86-64.
3478
3479 2001-09-19  Andreas Jaeger  <aj@suse.de>
3480
3481         * sysdeps/x86_64/Makefile: New file.
3482         * sysdeps/x86_64/pspinlock.c: New file.
3483         * sysdeps/x86_64/pt-machine.h: New file.
3484
3485 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3486
3487         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3488         for SIGEV_NONE.
3489         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3490
3491 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3492             Wolfram Gloger <wg@malloc.de>
3493
3494         * join.c: Protect all communications from and to manager with
3495         TEMP_FAILURE_RETRY.
3496         * manager.c: Likewise.
3497         * pthread.c: Likewise.
3498         * smeaphore.c: Likewise.
3499
3500 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3501
3502         * spinlock.c (__pthread_lock): Top max_count value with
3503         MAX_ADAPTIVE_SPIN_COUNT.
3504         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3505
3506         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3507         help P4.
3508
3509 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3510
3511         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3512         non-opaque type if __USE_UNIX98.
3513
3514 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3515
3516         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3517         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3518
3519 2001-08-23  Roland McGrath  <roland@frob.com>
3520
3521         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3522         new first argument, skip the cleanup handler if it's zero.
3523         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3524         (__libc_lock_define_initialized_recursive): Use it.
3525         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3526         The sysdeps/generic file from the main tree now suffices.
3527
3528 2001-08-22  Roland McGrath  <roland@frob.com>
3529
3530         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3531         instead of <pthread.h>.
3532         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3533         (_IO_lock_initializer): Add braces.
3534         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3535         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3536
3537         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3538         (__libc_lock_define_initialized_recursive): Use it.
3539         (__libc_lock_init_recursive): Likewise.
3540         (__libc_lock_fini_recursive): Likewise.
3541         (__libc_lock_lock_recursive): Likewise.
3542         (__libc_lock_trylock_recursive): Likewise.
3543         (__libc_lock_unlock_recursive): Likewise.
3544         (__libc_lock_define_recursive): New macro.
3545
3546 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3547
3548         * lockfile.c (__pthread_provide_lockfile): New variable.
3549         * pthread.c (__pthread_require_lockfile): New variable.
3550         * cancel.c (__pthread_require_lockfile): New variable.
3551
3552 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3553
3554         * tst-context.c (threadfct): Initialize context before calling
3555         makecontext.
3556
3557         * Examples/ex17.c: Make sure test thread is around long enough.
3558
3559 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3560
3561         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3562
3563 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3564
3565         * tst-context.c (main): Print explanation before bailing out
3566         because context handling is not supported.
3567
3568 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3569
3570         * Makefile (tests): Add tst-context.
3571         * tst-context.c: New file.
3572
3573         * sysdeps/pthread/bits/stdio-lock.h: Define
3574         _IO_cleanup_region_start_noarg.
3575
3576 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3577
3578         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3579         (ARCH_STACK_MAX_SIZE): Define.
3580         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3581         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3582
3583 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3584
3585         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3586
3587         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3588         (ARCH_STACK_MAX_SIZE): Define.
3589         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3590         NEED_SEPARATE_REGISTER_STACK.
3591
3592 2001-07-16  Andreas Schwab  <schwab@suse.de>
3593
3594         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3595         (omit-deps): Add crti.
3596         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3597         it is filtered out of the link command.
3598
3599 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3600
3601         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3602         to find the right value for __pthread_initial_thread_bos, it's not
3603         used.  If not FLOATING_STACKS first run
3604         __pthread_init_max_stacksize.
3605
3606 2001-06-16  H.J. Lu  <hjl@gnu.org>
3607
3608         * internals.h: Include <stackinfo.h>.
3609
3610         * attr.c: Don't include <stackinfo.h> here.
3611         * cancel.c: Likewise.
3612         * manager.c: Likewise.
3613         * pthread.c: Likewise.
3614         * ptlongjmp.c: Likewise.
3615
3616 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3617
3618         * attr.c: Make _STACK_GROWS_UP work.
3619         * internals.h: Likewise.
3620         * manager.c: Likewise.
3621         * pthread.c: Likewise.
3622
3623 2001-06-15  H.J. Lu  <hjl@gnu.org>
3624
3625         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3626
3627 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3628
3629         * semaphore.h: Use struct _pthread_fastlock as an element of
3630         sem_t instead of an identical struct.
3631         * rwlock.c: Remove casts.
3632         * semaphore.c: Likewise.
3633
3634 2001-04-30  Alan Modra  <amodra@one.net.au>
3635
3636         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3637
3638 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3639
3640         * linuxthreads.texi: Spelling corrections.
3641
3642 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3643
3644         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3645         returning successfully.
3646         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3647
3648 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3649
3650         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3651         serious work try once whether the lock is uncontested.
3652         Remove duplicate reading of __status before loop.
3653         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3654
3655         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3656         (__pthread_alt_trylock): Likewise.
3657
3658 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3659
3660         Memory barrier overhaul following line by line inspection.
3661         * mutex.c (pthread_once): Missing memory barriers added.
3662         * pthread.c (__pthread_wait_for_restart_signal,
3663         __pthread_timedsuspend_new, __pthread_restart_new): Added
3664         memory barriers ``just in case'' and for documentary value.
3665         * spinlock.c (__pthread_release): New inline function for releasing
3666         spinlock, to complement __pthread_acquire.  Includes memory
3667         barrier prior to assignment to spinlock, and __asm __volatile
3668         dance to prevent reordering or optimization of the spinlock access.
3669         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3670         __pthread_alt_timedlock, __pthread_alt_unlock,
3671         __pthread_compare_and_swap): Updated to use new __pthread_release
3672         instead of updating spinlock directly.
3673         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3674         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3675         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3676         Memory barrier overhaul.  Lots of missing memory barriers added,
3677         a couple needless ones removed.
3678         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3679         removed, just calls __pthread_acquire, which has the new read
3680         barrier in it before its testandset.
3681
3682 2001-05-20  Roland McGrath  <roland@frob.com>
3683
3684         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3685
3686 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3687
3688         * sysdeps/powerpc/pt-machine.h
3689         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3690         (__compare_and_swap): Remove memory barriers.
3691         (__compare_and_swap_with_release_semantics): New function.
3692
3693 2001-04-24  Andreas Jaeger  <aj@suse.de>
3694
3695         * wrapsyscall.c: send* and recv* return ssize_t.
3696
3697         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3698         mutex instead of double locking it.
3699         Reported by Pierre Artaud <partaud@sodatec.com>.
3700
3701 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3702
3703         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3704         using #ifdef whether the clock is available.
3705         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3706
3707         * sysdeps/ia64/Versions: New file.
3708
3709         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3710         have to call __gmon_start__ in the libpthread DSO.
3711         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3712
3713         * Makefile (libpthread-routines): Add ptclock_gettime and
3714         ptclock_settime.
3715         * internals.h: Don't use cpuclock-init.h definitions, use
3716         hp-timing.h definitions.
3717         * pthread.c: Likewise.
3718         * manager.c: Likewise.
3719         * ptclock_gettime.c: New file.
3720         * ptclock_settime.c: New file.
3721         * internals.h: Fix parameter type for __pthread_clock_gettime and
3722         __pthread_clock_settime.
3723
3724         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3725         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3726         * sysdeps/i386/i586/Makefile: Removed.
3727
3728 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3729
3730         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3731         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3732
3733 2001-04-21  Andreas Jaeger  <aj@suse.de>
3734
3735         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3736         attribute, remove statements that will never be executed.
3737         (thread_func): Remove mutex_unlock call since it's never executed.
3738         (thread_func): Fix comment as suggested by Jakub Jelinek.
3739
3740         * manager.c (__pthread_manager): Add noreturn
3741         attribute.
3742         (pthread_start_thread): Likewise, remove return statement.
3743         (pthread_start_thread_event): Likewise.
3744         Add noreturn attribute for pthread_handle_exit.
3745         * weaks.c: Add noreturn attribute for pthread_exit.
3746
3747         * internals.h: Add __pthread_clock_gettime and
3748         __pthread_clock_settime prototypes.
3749
3750 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3751
3752         * internals.h: Include <cpuclock-init.h>.
3753         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3754         CPUCLOCK_VARDEF is defined.
3755         * pthread.c (__pthread_initialize_minimal): Initialize
3756         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3757         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3758         for new thread to current CPU clock value.
3759
3760         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3761
3762         * sysdeps/i386/i586/Makefile: New file.
3763         * sysdeps/i386/i586/Versions: New file.
3764         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3765         * sysdeps/i386/i586/ptclock_settime.c: New file.
3766         * sysdeps/i386/i686/Implies: New file.
3767
3768 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3769
3770         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3771         $generated, not $postclean-generated.
3772
3773 2001-04-18  Andreas Jaeger  <aj@suse.de>
3774
3775         * Makefile (otherlibs): Added.
3776
3777 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3778
3779         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3780
3781 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3782
3783         * signals.c (sigwait): NSIG is no signal number.  Block all
3784         signals while in signal handler for signals in SET.
3785         Patch by Manfred Spraul <manfred@colorfullife.com>.
3786
3787 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3788
3789         * tst-cancel.c: Disable most tests.  Add new test where all
3790         cleanup handlers must run.
3791         * Makefile (tests): Add tst-cancel again.
3792
3793         * cancel.c (__pthread_perform_cleanup): Correct condition for
3794         leaving cleanup loop early.
3795
3796         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3797         all the files which use CURRENT_STACK_FRAME.
3798         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3799         __builtin_frame_address.
3800         * sysdeps/i386/i686/pt-machine.h: Likewise.
3801
3802 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3803
3804         * Makefile (tests): Comment out tst-cancel for now.
3805
3806         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3807         temporary file in object directory.
3808         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3809         Pass $(objpfx) to tst-cancel.
3810
3811 2001-04-11  David S. Miller  <davem@redhat.com>
3812
3813         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3814         up closer to user local variables so that new cleanup heuristics work.
3815         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3816
3817 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3818
3819         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3820         and remove it.
3821         (_pthread_cleanup_push_defer): Likewise.
3822
3823         * tst-cancel.c (main): Fix loop printing cleanup output.
3824
3825 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3826
3827         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3828         test.
3829         (__pthread_spin_trylock): Likewise.
3830         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3831
3832 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3833
3834         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3835         which takes an extra parameter with the current frame pointer.
3836         Call new function with CURRENT_STACK_FRAME.
3837         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3838         with the new parameter.
3839         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3840         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3841         this parameter as the initial value the cleanup handler records are
3842         compared against.  No active cleanup handler record must have an
3843         address lower than the previous one and the initial record must be
3844         above (below on PA) the frame address passed in.
3845         (pthread_setcancelstate): Call __pthread_do_exit instead of
3846         pthread_exit.
3847         (pthread_setcanceltype): Likewise.
3848         (pthread_testcancel): Likewise.
3849         (_pthread_cleanup_pop_restore): Likewise.
3850         * condvar.c (pthread_cond_wait): Likewise.
3851         (pthread_cond_timedwait_relative): Likewise.
3852         * manager.c (pthread_start_thread): Likewise.
3853         * oldsemaphore.c (__old_sem_wait): Likewise.
3854         * pthread.c (pthread_handle_sigcancel): Likewise.
3855         * semaphore.c (__new_sem_wait): Likewise.
3856         (sem_timedwait): Likewise.
3857         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3858         to limit the cleanup handlers which get run.
3859         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3860         for __pthread_perform_cleanup.
3861
3862         * Makefile (tests): Add tst-cancel.
3863         * tst-cancel.c: New file.
3864
3865 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3866
3867         * sysdeps/cris/pt-machine.h: New file.
3868         * sysdeps/cris/pspinlock.c: New file.
3869
3870 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3871
3872         * shlib-versions: Add case for Linux on CRIS.
3873
3874 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3875
3876         * attr.c (pthread_getattr_np): Correct computation of stack size
3877         for machiens with register stack.
3878
3879         * Examples/ex17.c (main): Correct detection of failed mmap call.
3880
3881 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3882
3883         * pthread.c (__pthread_initialize_manager): Fix a typo.
3884
3885 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3886
3887         * attr.c (__pthread_attr_setstack): Fix alignment check.
3888         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3889         * Makefile (tests): Add ex17 test.
3890         * Examples/ex17.c: New test.
3891
3892 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3893
3894         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3895         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3896         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3897
3898 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3899
3900         * Makefile: When generating DSO link with libc_nonshared.a.
3901
3902 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3903
3904         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3905
3906 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3907
3908         * internals.h (__pthread_init_max_stacksize): New prototype.
3909         * attr.c (__pthread_attr_setstacksize): Call
3910         __pthread_init_max_stacksize if not yet initialized.
3911         * pthread.c (__pthread_init_max_stacksize): New function.
3912         (__pthread_initialize_manager): Call it.
3913         Patch by <dtc@cmucl.cons.org>.
3914
3915 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3916
3917         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3918
3919 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3920
3921         * shlib-versions: Add rule for Linux on 64 bit S/390.
3922         * sysdeps/s390/s390-64/pt-machine.h: New file.
3923         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3924
3925 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3926
3927         * sysdeps/s390/pt-machine.h: Move to...
3928         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3929         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3930
3931 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3932
3933         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3934         * attr.c: Implement pthread_getattr_np.
3935         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3936         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3937         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3938
3939 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3940
3941         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3942         code alignment.
3943
3944 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3945
3946         * manager.c (manager_mask): Removed static vesion.  Now always local
3947         to __pthread_manager().
3948         (manager_mask_all): Removed completely.
3949         (__pthread_manager): Remove manager_mask_all initialization.
3950         (pthread_handle_create): Remove code to set and reset signal mask
3951         around __clone2() calls.
3952
3953 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3954
3955         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3956         memory on every spin.
3957
3958 2001-02-10  Andreas Jaeger  <aj@suse.de>
3959
3960         * Makefile (extra-objs): New.
3961
3962 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3963
3964         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3965         __pthread_initialize_minimal prototype.
3966
3967 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3968
3969         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3970
3971 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3972
3973         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3974
3975 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3976
3977         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3978         broken code.  Patch by Jes Sorensen.
3979
3980 2001-02-06  Andreas Jaeger  <aj@suse.de>
3981
3982         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3983         to...
3984         * internals.h: ...here.
3985
3986 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3987
3988         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3989
3990 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3991
3992         * Versions: Remove __pthread_initialize_minimal.
3993
3994 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3995
3996         * Makefile: Add rules to build crti.o and make it being used in
3997         building libpthread.so.
3998         * sysdeps/i386/Makefile: New file.
3999         * sysdeps/pthread/pt-initfini.c: New file.
4000
4001         * pthread.c: Cleanups.
4002
4003 2001-01-28  Andreas Jaeger  <aj@suse.de>
4004
4005         * oldsemaphore.c (__old_sem_init): Adjust for last change.
4006         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4007         * spinlock.c: Likewise.
4008
4009 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
4010
4011         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
4012         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
4013         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
4014         * pthread.c: Likewise.
4015         * spinlock.h: Likewise.
4016         * sysdeps/pthread/pthread.h: Likewise.
4017
4018 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
4019
4020         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
4021         as struct __pthread_attr_s.
4022
4023         * semaphore.h (sem_t): Cleanup namespace, rename status and
4024         spinlock elements.
4025
4026 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
4027
4028         * pthread.c (pthread_onexit_process): Clear
4029         __pthread_manager_thread_bos after freeing it.
4030         * Makefile (tests): Add ex16.
4031         * Examples/ex16.c: New file.
4032
4033 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
4034
4035         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
4036         -z nodelete.
4037         * pthread.c (pthread_exit_process): Rename to...
4038         (pthread_onexit_process): ...this.
4039         (pthread_atexit_process, pthread_atexit_retcode): New.
4040         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
4041         and only if HAVE_Z_NODELETE is not defined.
4042         (__pthread_initialize_manager): Register pthread_atexit_retcode
4043         with __cxa_atexit.
4044
4045 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
4046
4047         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
4048
4049 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
4050
4051         * Makefile (tests): Add ex15.
4052         * Examples/ex15.c: New test.
4053
4054 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
4055
4056         * pthread.c (pthread_exit_process): Free memory allocated for
4057         manager stack.
4058
4059 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
4060
4061         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
4062         (pthread_free): Always unmap the stack.  It's safe now that we don't
4063         use MAP_FIXED to allocate stacks.
4064
4065 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
4066
4067         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
4068
4069         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
4070
4071 2000-11-15  Wolfram Gloger  <wg@malloc.de>
4072
4073         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
4074         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
4075
4076 2000-12-27  Andreas Jaeger  <aj@suse.de>
4077
4078         * Examples/ex13.c: Make local functions static.
4079         * ecmutex.c: Likewise.
4080         * joinrace.c: Likewise.
4081         * Examples/ex14.c: Likewise.
4082
4083         * Examples/ex2.c: Make local functions static; reformat.
4084         * Examples/ex1.c: Likewise.
4085         * Examples/ex4.c: Likewise.
4086         * Examples/ex5.c: Likewise.
4087         * Examples/ex7.c: Likewise.
4088
4089         * oldsemaphore.c: Add prototypes to shut up GCC.
4090         * pt-machine.c: Likewise.
4091
4092         * weaks.c: Add prototype for pthread_exit.
4093
4094         * internals.h: Add some prototypes, format prototypes and add
4095         missing externs.
4096         Move __libc_waitpid prototype to include/sys/wait.h.
4097
4098         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
4099         * mutex.c: Likewise.
4100         * specific.c: Likewise.
4101         * ptfork.c: Likewise.
4102
4103         * lockfile.c: Include internals.h to get prototypes.
4104         * events.c: Likewise.
4105         * sysdeps/alpha/pspinlock.c: Likewise.
4106         * sysdeps/arm/pspinlock.c: Likewise.
4107         * sysdeps/hppa/pspinlock.c: Likewise.
4108         * sysdeps/i386/pspinlock.c: Likewise.
4109         * sysdeps/ia64/pspinlock.c: Likewise.
4110         * sysdeps/m68k/pspinlock.c: Likewise.
4111         * sysdeps/mips/pspinlock.c: Likewise.
4112         * sysdeps/powerpc/pspinlock.c: Likewise.
4113         * sysdeps/s390/pspinlock.c: Likewise.
4114         * sysdeps/sh/pspinlock.c: Likewise.
4115         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
4116         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
4117         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
4118
4119 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
4120
4121         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
4122         (__pthread_attr_getstack): Return correct address.
4123         Add warnings for using pthread_attr_getstackaddr and
4124         pthread_attr_setstackaddr.
4125
4126 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
4127
4128         * Examples/ex6.c (test_thread): Make static.
4129         * Examples/ex12.c (test_thread): Make static and add noreturn
4130         attribute.
4131
4132 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
4133
4134         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
4135         and compare_and_swap_with_release_semantics returns int not long.
4136
4137 2000-12-17  Andreas Jaeger  <aj@suse.de>
4138
4139         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
4140         value.
4141         * sysdeps/arm/pt-machine.h (testandset): Likewise.
4142         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
4143         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
4144         * sysdeps/sh/pt-machine.h (testandset): Likewise.
4145         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
4146         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
4147
4148 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
4149
4150         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
4151         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
4152
4153 2000-12-17  Andreas Jaeger  <aj@suse.de>
4154
4155         * internals.h: Add prototypes for testandset and
4156         __compare_and_swap to shut up gcc warnings.
4157
4158 2000-12-06  Wolfram Gloger  <wg@malloc.de>
4159
4160         * join.c (pthread_detach): Allow case where the thread has already
4161         terminated.
4162
4163 2000-12-05  Andreas Jaeger  <aj@suse.de>
4164
4165         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
4166         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4167         (__compare_and_swap): Likewise.
4168         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
4169
4170 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
4171
4172         * Examples/ex3.c (main): Cast int to long before casting to void *.
4173         (search): Cast void * to long, not int.
4174         * Examples/ex8.c (main, thread): Similarly.
4175         * Examples/ex11.c (main): Similarly.
4176         * Examples/ex14.c (worker, do_test): Similarly.
4177         * ecmutex.c (worker, do_test): Similarly.
4178         (nlocks): Cast to int.
4179
4180 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
4181
4182         * linuxthreads.texi:  Add documentation for pthreads attributes
4183         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
4184         patch.  Document pthread_[sg]etconcurrency().  Mark
4185         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
4186
4187 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
4188
4189         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4190         Don't define it.
4191         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4192         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
4193
4194 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
4195
4196         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
4197         not doing it right now.
4198         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
4199
4200 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
4201
4202         * Examples/ex4.c (main): Don't use exit() to avoid warning with
4203         broken compilers.
4204
4205 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
4206
4207         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
4208         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
4209
4210         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
4211         discussing mutexes. (As per the Unix98 name for the API.)
4212         Changes documentation for pthread_mutexattr_setkind_np() and
4213         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
4214         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
4215         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
4216         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
4217         Begins to introduce discussion of the ``timed'' mutex type.  This
4218         discussion is currently incomplete.
4219         Patch by Bruce Mitchener <bruce@cubik.org>.
4220
4221 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4222             Yutaka Niibe  <gniibe@chroot.org>
4223
4224         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
4225         has restrictions, use register.
4226
4227 2000-10-23  Andreas Schwab  <schwab@suse.de>
4228
4229         * Examples/ex14.c (TIMEOUT): Override default timeout.
4230
4231 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
4232
4233         * specific.c: Protect tsd array modification in thread data
4234         structures by getting the thread lock in pthread_key_delete and
4235         __pthread_destroy_specifics.
4236         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
4237
4238 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4239
4240         * sysdeps/pthread/bits/initspin.h: New file.
4241         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
4242         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
4243         (__pthread_alt_init_lock): Likewise.
4244         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
4245
4246 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
4247
4248         * oldsemaphore.c (__old_sem_init): Release lock with
4249         LT_SPINLOCK_INIT, not zero.
4250         * spinlock.c (__pthread_unlock): Likewise.
4251         (__pthread_alt_lock): Likewise.
4252         (__pthread_alt_timedlock): Likewise.
4253         (__pthread_alt_unlock): Likewise.
4254         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
4255         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
4256         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
4257         LT_SPINLOCK_INIT do initialize spinlocks not 0.
4258
4259 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
4260
4261         * shlib-versions: Add version definitions for hppa-linux.
4262
4263 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4264
4265         * sysdeps/hppa/pspinlock.c: New file.
4266         * sysdeps/hppa/pt-machine.h: New file.
4267         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
4268
4269 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
4270
4271         * mutex.c (__pthread_mutex_destroy): Correct test of
4272         busy mutex for mutexes using alternate fastlocks.
4273         Patch by dtc@cmucl.cons.org.
4274
4275 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
4276
4277         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
4278
4279 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
4280
4281         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
4282         test for owner first.
4283         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4284
4285         * cancel.c (pthread_cancel): Don't do anything if cancelation is
4286         disabled.
4287
4288 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
4289
4290         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4291         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4292
4293         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4294         _POSIX_MONOTONIC_CLOCK.
4295
4296         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4297         and explain why.
4298
4299 2000-09-20  Andreas Jaeger  <aj@suse.de>
4300
4301         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4302         "testrtsig.h" conditional.
4303
4304 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
4305
4306         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4307         pthread_attr_setstack.
4308         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4309         pthread_attr_setstack.
4310         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4311
4312 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
4313
4314         * Examples/ex14.c: New file.
4315         * Makefile (tests): Add ex14.
4316
4317         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4318         mutex.  Patch by dtc@cmucl.cons.org.
4319
4320         * ecmutex.c: New file.
4321         * Makefile (tests): Add ecmutex.
4322
4323 2000-09-04  H.J. Lu  <hjl@gnu.org>
4324
4325         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4326         instead of roundup to round up to the page size.
4327
4328 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4329
4330         * manager.c (pthread_exited): Correctly report event as TD_REAP
4331         instead of TD_DEATH.  Fix comments.
4332
4333 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4334
4335         * spinlock.h (testandset): Add cast to avoid warning.
4336         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4337
4338 2000-09-02  Andreas Jaeger  <aj@suse.de>
4339
4340         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4341         prototype.
4342
4343 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4344
4345         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4346         Fix typo in last patch (_mode -> _flags).
4347
4348         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4349         Provide definition which respects _IO_USER_LOCK flag.
4350
4351 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4352
4353         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4354         mmaped.
4355
4356 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4357
4358         * Makefile: Add rules to build and run unload.
4359         * unload.c: New file.
4360
4361         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4362
4363         * sysdeps/pthread/pthread.h
4364         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4365         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4366
4367 2000-08-24  Andreas Jaeger  <aj@suse.de>
4368
4369         * Examples/ex13.c: Include <string.h> for strerror prototype and
4370         <stdlib.h> for abort prototype.
4371         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4372         (thread_start): Remove unused variable err.
4373         (main): Silence GCC warnings.
4374
4375 2000-08-22  Andreas Jaeger  <aj@suse.de>
4376
4377         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4378
4379         * Makefile (tests): Add ex13.
4380
4381 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4382
4383         * semaphore.h: Add restrict where required by AGd4.
4384         * sysdeps/pthread/pthread.h: Likewise.
4385         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4386
4387 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4388
4389         * Makefile (tests): Add ex12.  Add rule to build it.
4390         * Examples/ex12.c: New file.
4391
4392 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4393
4394         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4395         even though the implementation is not quite complete (but it reports
4396         it).  Define _POSIX_MESSAGE_PASSING to -1.
4397         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4398
4399 2000-08-12  Andreas Jaeger  <aj@suse.de>
4400
4401         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4402         assembler.
4403         (__compare_and_swap): Likewise.
4404         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4405
4406 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4407
4408         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4409         p_h_errnop correctly and not to NULL.
4410
4411 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4412
4413         * Banner: Bump version number to 0.9.
4414
4415 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4416
4417         * Makefile (tests): Add tststack.  Add rule to build the program.
4418         * tststack.c: New file.
4419
4420         * internals.h: Declare __pthread_max_stacksize.
4421         * pthread.c (__pthread_max_stacksize): New variable.
4422         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4423         value.
4424         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4425         (pthread_allocate_stack): Allow kernel to choose stack address if
4426         FLOATING_STACKS.  This also handles variable-sized stacks.
4427         Always allocate stack and guardpage together.  Use mprotect to
4428         change guardpage access.
4429         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4430         ARCH_STACK_MAX_SIZE.
4431
4432         * attr.c (__pthread_attr_setstacksize): Also test value against
4433         upper limit.
4434
4435         * manager.c (__pthread_nonstandard_stacks): Define only if
4436         THREAD_SELF is not defined.
4437         (pthread_allocate_stack): Always initialize gardaddr to a correct
4438         value.
4439         (pthread_handle_create): Unmap thread with one call.
4440         (pthread_free): Remove test for initial thread before removing stack.
4441         Unmap stack with one call.
4442
4443         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4444         1 to avoid removing the stack.
4445
4446 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4447
4448         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4449         load of spin lock to prime the cache before the atomic compare and
4450         exchange operation (cmpxchg4). This avoids the spinning on the
4451         cmpxchg4 instruction and reduces movement of the cache line back
4452         and forth between the processors (explanation by Asis K. Mallick
4453         from Intel). This basically makes the implementation operate the
4454         same as the Linux kernel implementation.
4455
4456         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4457         * sysdeps/ia64/pspinlock.c: New file.
4458
4459 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4460
4461         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4462         * spinlock.h: ...here.  Remove locking.
4463         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4464
4465         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4466         (rwlock_rd_extricate_func): Don't determine self, let
4467         __pthread_lock do it.
4468         (rwlock_wr_extricate_func): Likewise.
4469         (rwlock_have_already): Optimize *pself handling a bit.
4470
4471         * mutex.c: Use __builtin_expect.
4472         * pthread.c: Likewise.
4473
4474 2000-08-02  Andreas Jaeger  <aj@suse.de>
4475
4476         * sysdeps/s390/pspinlock.c: New file.
4477         * sysdeps/s390/pt-machine.h: New file.
4478         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4479
4480 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4481
4482         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4483         R3K.
4484         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4485
4486 2000-07-26  Andreas Jaeger  <aj@suse.de>
4487
4488         * pthread.c: Initialize p_sem_avail.
4489
4490 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4491
4492         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4493         * semaphore.c: Handle spurious wakeups.
4494
4495         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4496         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4497
4498         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4499         (__pthread_wait_for_restart): Likewise.
4500
4501         * condvar.c (pthread_cond_wait): Also check whether thread is
4502         cancelable before aborting loop.
4503         (pthread_cond_timedwait): Likewise.
4504
4505         * signals.c (pthread_sighandler): Remove special code to restrore
4506         %gs on x86.
4507         (pthread_sighandler_t): Likewise.
4508
4509 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4510
4511         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4512         * pthread.c: Include <resolv.h>.
4513         (_res): Undefine.  Add extern declaration.
4514
4515 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4516
4517         * pthread.c (__pthread_initial_thread): Update initializer.
4518         (__pthread_manager_thread): Likewise.
4519         (pthread_initialize): Move setrlimit call to...
4520         (__pthread_initialize_manager): ...here.
4521         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4522
4523         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4524         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4525
4526 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4527
4528         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4529         __compare_and_swap to define testandset.
4530         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4531         Define IMPLEMENT_TAS_WITH_CAS.
4532
4533 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4534
4535         * Makefile: Pass -z nodelete to linker for libpthread.so
4536         generation if it understand this option.
4537
4538 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4539
4540         * manager.c (pthread_handle_create): Remove initialization of
4541         new_thread->p_res._sock.
4542
4543 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4544
4545         Bugfixes to the variant of the code for machines with no compare
4546         and swap.
4547
4548         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4549         node was not being properly enqueued, due to failing to update
4550         the lock->__status field.
4551
4552         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4553         being set inappropriately, causing the suspend function to be called
4554         with a null self pointer and crash.
4555
4556 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4557
4558         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4559         compare&swap is available.
4560
4561         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4562         compare_and_swap.
4563
4564         * pthread.c (pthread_initialize): Don't use sysconf to determine
4565         whether the machine has more than one processor.
4566
4567         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4568         removed thread_self calls.
4569
4570 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4571
4572         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4573         __compare_and_swap to compare_and_swap in code which assumes
4574         compare swap is available.
4575
4576 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4577
4578         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4579         bug whereby thr field of waitnode structure would not be correctly
4580         set unless a null self pointer is passed to the functions.
4581         Eliminated redundant calls to thread_self().
4582
4583 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4584
4585         * pthread.c (__pthread_initialize_manager): Lock
4586         __pthread_manager_thread.p_lock before calling clone.
4587
4588 2000-05-05  H.J. Lu  <hjl@gnu.org>
4589
4590         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4591         have acquire semantics.
4592         (__compare_and_swap_with_release_semantics): New inline
4593         function.
4594         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4595
4596 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4597
4598         * manager.c: Fix the problem with signals at startup.
4599         Change the way that thread stacks are allocated on IA64.
4600         Clean up some of the guard page allocation stuff.
4601
4602 1999-12-19  H.J. Lu  <hjl@gnu.org>
4603
4604         * internals.h (page_roundup): New.
4605         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4606         instead of roundup.
4607         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4608         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4609         is define.
4610
4611 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4612
4613         * manager.c (pthread_allocate_stack): Unmap the stack top
4614         if failed to map the stack bottom.
4615         Fix the guard page.
4616         (pthread_free): Fix the guard page.
4617
4618         * pthread.c (pthread_initialize): Set rlimit correctly for
4619         NEED_SEPARATE_REGISTER_STACK.
4620
4621 1999-12-16  H.J. Lu  <hjl@gnu.org>
4622
4623         * pthread.c (__pthread_initialize_manager): Pass
4624         __pthread_manager_thread_bos instead of
4625         __pthread_manager_thread_tos to __clone2.
4626
4627 1999-12-16  H.J. Lu  <hjl@gnu.org>
4628
4629         * manager.c (pthread_allocate_stack): Correct the calculation
4630         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4631         stack bottom.
4632
4633 1999-12-13  H.J. Lu  <hjl@gnu.org>
4634
4635         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4636         bit after setting ar.ccv.
4637
4638 1999-12-12  H.J. Lu  <hjl@gnu.org>
4639
4640         * manager.c (pthread_allocate_stack): Make the starting
4641         address of the stack bottom page aligned. FIXME: it may
4642         need changes in other places.
4643         (pthread_handle_create): Likewise.
4644
4645 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4646
4647         * manager.c (pthread_allocate_stack): Handle
4648         NEED_SEPARATE_REGISTER_STACK.
4649         (pthread_handle_create): Likewise.
4650         * pthread.c (__pthread_initialize_manager): Likewise.
4651
4652         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4653
4654 1999-12-02  H.J. Lu  <hjl@gnu.org>
4655
4656         * sysdeps/ia64/pt-machine.h: New.
4657
4658 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4659
4660         * wrapsyscall.c: Mark non-__ protected names as weak.
4661         PR libc/1466.
4662
4663 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4664
4665         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4666
4667 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4668
4669         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4670         Add tests also to new alternative spinlock implementation.
4671         * spinlock.h: Likewise.
4672         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4673
4674 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4675
4676         * Version: Export __sigaction.
4677         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4678         of __sigaction.
4679         * pthread.c: Use __libc_sigaction instead of __sigaction.
4680
4681         * condvar.c: Implement pthread_condattr_getpshared and
4682         pthread_condattr_setpshared.
4683         * mutex.c: Implement pthread_mutexattr_getpshared and
4684          pthread_mutexattr_setpshared.
4685         * Versions: Export new functions.
4686         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4687
4688         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4689         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4690         is not selected.
4691
4692 2000-07-04  Greg McGary  <greg@mcgary.org>
4693
4694         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4695         pragmas.  Include bp-sym.h only if _LIBC.
4696
4697 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4698
4699         * spinlock.c (__pthread_unlock): Properly place write barrier.
4700         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4701
4702 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4703
4704         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4705         faster on SMP systems.  No more emulation of compare&swap for adaptive
4706         spinlocks.
4707         * spinlock.h: Likewise.
4708         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4709         Replace fast with adaptive mutex.
4710         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4711         * condvar.c: Likewise.
4712         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4713         * internals.h: Declare __pthread_smp_kernel.
4714         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4715         _pthread_fastlock structure.
4716         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4717
4718         * pthread.c: Remove initialization to zero from global variables.
4719
4720 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4721
4722         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4723
4724 2000-06-28  Greg McGary  <greg@mcgary.org>
4725
4726         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4727         pthread functions that have pointers in their return+arg signatures.
4728
4729 2000-06-27  Greg McGary  <greg@mcgary.org>
4730
4731         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4732         extern declarations of pthread functions that have pointers in
4733         their return+arg signatures.
4734
4735 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4736
4737         * Makefile (tests): Add ex11.  Add rules to build it.
4738         * Examples/ex11.c: New file.
4739         * rwlock.c: Fix complete braindamaged previous try to implement
4740         timedout functions.
4741
4742         * spinlock.c: Pretty print.
4743
4744 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4745
4746         * Makefile (tests): Add ex10.  Add rules to build it.
4747         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4748         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4749         * condvar.c (pthread_cond_wait): Allow mutex of kind
4750         PTHREAD_MUTEX_TIMED_NP.
4751         (pthread_cond_timedwait_relative): Likewise.
4752         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4753         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4754         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4755         (__pthread_mutex_lock): Use __pthread_alt_lock for
4756         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4757         (__pthread_mutex_timedlock): New function.
4758         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4759         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4760         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4761         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4762         * spinlock.c: Implement alternate fastlocks.
4763         * spinlock.h: Add prototypes.
4764         * Examples/ex10.c: New file.
4765         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4766         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4767
4768         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4769         (__pthread_rwlock_timedrdlock): New function.
4770         (__pthread_rwlock_timedwrlock): New function.
4771         Use laternate fastlock function everywhere.
4772
4773 2000-06-21  Andreas Jaeger  <aj@suse.de>
4774
4775         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4776         prototype.
4777
4778         * join.c: Include <stdlib.h> for exit prototype.
4779
4780 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4781
4782         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4783
4784         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4785         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4786
4787         * Makefile (libpthread-routines): Add barrier.
4788         (tests): Add ex9.  Add rule to build ex9.
4789         * Versions: Export barrier functions.
4790         * barrier.c: New file.
4791         * Examples/ex9.c: New file.
4792         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4793         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4794         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4795
4796 2000-06-19  H.J. Lu  <hjl@gnu.org>
4797
4798         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4799         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4800         (compare_and_swap_with_release_semantics): New. Default to
4801         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4802         is not defined.
4803
4804         * spinlock.c (__pthread_unlock): Call
4805         compare_and_swap_with_release_semantics () instead of
4806         compare_and_swap ().
4807
4808 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4809
4810         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4811         to errno directly.
4812         * sysdeps/pthread/timer_delete.c: Likewise.
4813         * sysdeps/pthread/timer_getoverr.c: Likewise.
4814         * sysdeps/pthread/timer_gettime.c: Likewise.
4815         * sysdeps/pthread/timer_settime.c: Likewise.
4816
4817 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4818
4819         Timer nodes are now reference counted, and can be marked
4820         as deleted. This allows for the safe release of the global mutex
4821         in the middle without losing the timer being operated on.
4822
4823         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4824         member is now an enum with three values, so that an intermediate
4825         state can be represented (deleted but not free for reuse yet).
4826         New refcount member added.
4827         * sysdeps/pthread/timer_routines.c: Likewise.
4828
4829         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4830         timer_valid): New inline functions added.
4831
4832         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4833         restructured, recursive deadlock bug fixed.
4834
4835         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4836         timer_addref to ensure that timer won't be deleted while mutex is not
4837         held. Also uses timer_invalid to perform validation of timer handle.
4838         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4839         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4840
4841 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4842
4843         * shlib-versions: Add entry for SH.
4844         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4845
4846 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4847
4848         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4849         tightened up some critical regions and micro-optimized some list
4850         manipulation code.
4851
4852         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4853         Returns int value now to indicate whether timer was queued at head.
4854         * sysdeps/pthread/posix-timer.h: Likewise.
4855         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4856         new return value from __timer_thread_queue_timer to avoid waking
4857         up timer thread unnecessarily.
4858
4859         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4860         inuse flag, because this requires mutex to be held.  Callers updated
4861         to do the check when they have the mutex.
4862         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4863
4864         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4865         regions: avoids making system calls while holding timer mutex, and
4866         a few computations were moved outside of the mutex as well.
4867         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4868
4869         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4870         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4871         changed to get better better code out of gcc.
4872         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4873         version of list_unlink added here.
4874         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4875         function in all places: idempotent one for timers, non-idempotent
4876         one for thread nodes.
4877         * sysdeps/pthread/timer_settime: Likewise.
4878         * sysdeps/pthread/timer_routines.c: Likewise.
4879
4880 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4881
4882         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4883         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4884
4885         * sysdeps/pthread/Makefile: Remove tests definition.
4886
4887 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4888             Yutaka Niibe  <gniibe@chroot.org>
4889
4890         * sysdeps/sh/pspinlock.c: New file.
4891         * sysdeps/sh/pt-machine.h: New file.
4892
4893 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4894
4895         * Makefile (tests): Add joinrace.
4896
4897         * Examples/ex6.c: Test return value of pthread_join.
4898
4899 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4900
4901         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4902         (__pthread_spin_trylock): Implement.
4903         (__pthread_spin_unlock): Implement.
4904         (__pthread_spin_init): Implement.
4905         (__pthread_spin_destroy): Implement.
4906
4907 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4908
4909         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4910         really append the entry.
4911
4912 2000-06-10  Andreas Jaeger  <aj@suse.de>
4913
4914         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4915
4916 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4917
4918         * sysdeps/pthread/timer_create.c: Thread matching now done on
4919         clock type as well as thread attributes.
4920         There are individual global signal-delivering threads for
4921         different clock types.
4922         * sysdeps/pthread/posix-timer.h: Likewise.
4923         * sysdeps/pthread/timer_routines.c: Likewise.
4924
4925         * sysdeps/pthread/timer_routines.c: Thread allocation and
4926         deallocation function now remembers to put thread on active
4927         list and remove from active list.
4928         Thus now the feature of binding multiple timers
4929         to a single thread actually works.
4930
4931 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4932
4933         * pthread.c (__pthread_create_2_1): Optimize a bit.
4934
4935         * internals.h (invalid_handle): Also test for p_terminated != 0.
4936         (nonexisting_handle): New function.  Same as old invalid_handle.
4937         * join.c (pthread_join): Use nonexisting_handle instead of
4938         invalid_handle to test for acceptable thread handle.
4939         * manager.c (pthread_handle_free): Likewise.
4940         * joinrace.c: New file.
4941         Reported by Permaine Cheung <pcheung@cygnus.com>.
4942
4943 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4944
4945         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4946         Correct handling of matching variable.
4947
4948         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4949         avoid warnings.
4950
4951         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4952         Be prepared for empty timer list.
4953
4954         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4955         CPUTIME clock ID.  Add support for thread clocks.
4956
4957         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4958         subtraction were switched.
4959
4960         * sysdeps/pthread/timer_routines.c (init_module): Use
4961         THREAD_MAXNODES threads.
4962
4963         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4964         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4965         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4966         with sigqueueinfo is this system call is available.
4967
4968         * sysdeps/pthread/timer_create.c (timer_create): Allow
4969         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4970
4971         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4972         functionality.
4973         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4974
4975 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4976
4977         * sysdeps/pthread/posix-timer.h: New file.
4978         * sysdeps/pthread/timer_create.c: New file.
4979         * sysdeps/pthread/timer_delete.c: New file.
4980         * sysdeps/pthread/timer_getoverr.c: New file.
4981         * sysdeps/pthread/timer_gettime.c: New file.
4982         * sysdeps/pthread/timer_routines.c: New file.
4983         * sysdeps/pthread/timer_settime.c: New file.
4984         * sysdeps/pthread/tst-timer.c: New file.
4985
4986 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4987
4988         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4989         LINK_MAX definitions if necessary.
4990
4991 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4992
4993         Added missing fork time handling of global libio lock.
4994
4995         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4996         not just the individual stream locks. Rewritten to use new
4997         iterator interface provided by libio rather than accessing
4998         global variable.
4999
5000         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
5001         which lock and unlock the stream list using the new interface
5002         provied by libio.
5003         * internals.h: Likewise.
5004
5005         * ptfork.c (__fork): Now calls __flockfilelist before fork,
5006         and __funlockfilelist in the parent after the fork.
5007         Child still calls __fresetlockfiles as before.
5008
5009         * linuxthreads.texi: Now explains what happens to streams at
5010         fork time. Also whole new section on forking and thread added.
5011         Definition of pthread_atfork moved out of Miscellaneous Functions
5012         to this new section.
5013
5014 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
5015
5016         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
5017         Add missing register.
5018         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
5019
5020 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
5021
5022         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
5023         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
5024         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
5025
5026 2000-05-31  Andreas Jaeger  <aj@suse.de>
5027
5028         * sysdeps/mips/pspinlock.c: Implement spinlocks.
5029
5030 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
5031
5032         * spinlock.c (__pthread_lock): Remove ASSERT.
5033
5034         * Makefile (tests): Add ex8.
5035         * Examples/ex8.c: New file.
5036
5037 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
5038
5039         Bugfix: The pthread_atfork mechanism now takes care of its
5040         own internal mutex at fork time.
5041
5042         * ptfork.c (__fork): Revised so that the mutex is held across
5043         the fork operation and while the handlers are called, and so that
5044         the child resets the mutex.
5045
5046         * linuxthreads.texi: Updated pthread_atfork documentation to make
5047         it clear that fork and pthread_atfork can't be reentered from
5048         atfork handlers, that pthread_atfork and fork are mutually atomic,
5049         and that the handlers are inherited by the child process.
5050
5051 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
5052
5053         * Makefile (libpthread-routines): Add pspinlock.
5054         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
5055         Use struct _pthread_fastlock instead of pthread_spinlock_t.
5056         * condvar.c: Likewise.
5057         * internals.h: Likewise.
5058         * join.c: Likewise.
5059         * manager.c: Likewise.
5060         * mutex.c: Likewise.
5061         * pthread.c: Likewise.
5062         * rwlock.c: Likewise.
5063         * semaphore.c: Likewise.
5064         * signals.c: Likewise.
5065         * spinlock.h: Likewise.
5066         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
5067         * sysdeps/alpha/pspinlock.c: New file.
5068         * sysdeps/arm/pspinlock.c: New file.
5069         * sysdeps/i386/pspinlock.c: New file.
5070         * sysdeps/m68k/pspinlock.c: New file.
5071         * sysdeps/mips/pspinlock.c: New file.
5072         * sysdeps/powerpc/pspinlock.c: New file.
5073         * sysdeps/sparc/sparc32/pspinlock.c: New file.
5074         * sysdeps/sparc/sparc64/pspinlock.c: New file.
5075         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
5076         back to _pthread_fastlock.  Define new pthread_spinlock_t.
5077
5078 2000-05-24  Andreas Jaeger  <aj@suse.de>
5079
5080         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
5081
5082 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
5083
5084         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
5085
5086 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
5087
5088         * internals.h (__RES_PTHREAD_INTERNAL): Define.
5089
5090 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
5091
5092         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
5093         object state is represented with additional bits which distinguish
5094         whether that state was set up in the current process, or
5095         in an ancestor process. If that state was set in an ancestor,
5096         it means that a fork happened while thread was executing the init
5097         function. In that case, the state is reset to NEVER.
5098         * mutex.c (__pthread_once_fork_prepare): New function.
5099         (__pthread_once_fork_child): Likewise
5100         (__pthread_once_fork_parent): Likewise
5101         (__pthread_reset_pthread_once): Removed.
5102         * ptfork.c (__fork): Call new handlers in mutex.c.
5103         * internals.h: Declarations of new mutex.c functions added.
5104         Declaration of removed function deleted.
5105         * linuxthreads.texi: Updated documentation about pthread_once
5106         to clarify what happens under cancellation and forking.
5107
5108 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
5109
5110         * internals.h: New thread manager request type, REQ_KICK.
5111         * join.c (pthread_exit): main thread now calls exit() instead
5112         of _exit() in order to proper process cleanup.
5113         * manager.c (__pthread_manager): Do not terminate manager
5114         after unblocking main thread; wait for main thread's
5115         REQ_PROCESS_EXIT request instead.
5116         Also, added REQ_KICK case to handle new request; this just does
5117         nothing.
5118         * manager.c (pthread_exited): Do not terminate manager after
5119         unblocking main thread.
5120         * manager.c (__pthread_manager_sighandler): If the main thread
5121         is waiting for all other threads to die, send a REQ_KICK into
5122         the thread manager request pipe to get it to clean out the threads
5123         and unblock the main thread as soon as possible. This fixes
5124         the 2000 millisecond hang on shutdown bug.
5125         * Examples/ex7.c: New file, tests shutdown behavior when all threads
5126         including the main one call pthread_exit(), or implicitly do so.
5127         * Makefile (tests): Add ex7.
5128
5129 2000-05-05  Andreas Jaeger  <aj@suse.de>
5130
5131         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5132         (pthread_getcpuclockid): Correct test for ourselves.
5133
5134 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
5135
5136         * internals.h (struct _pthread_descr_struct): Reorganization.
5137         Allocate room for 16 pointers at head of the structure for future
5138         thread-local data handling.  Move p_self member in this area.
5139         * manager.c (pthread_handle_create): Adjust use of p_self.
5140         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
5141         * pthread.c (__pthread_initial_thread): Adjust initialization.
5142         (__pthread_manager_thread): Likewise.
5143
5144 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
5145
5146         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
5147         for eventmask larger than 1 word.
5148
5149 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
5150
5151         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
5152         * pthread.c (__pthread_initialize_minimal): New function.  Perform
5153         minimal initialization.
5154         (pthread_initialize): Remove this code here.
5155         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
5156         are working around the problem in glibc.
5157
5158 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
5159
5160         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
5161         now.  First gcc must be fixed (more concrete: libgcc).
5162
5163 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
5164
5165         * pthread.c: Remove special treatement for interrupt handlers on x86.
5166         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
5167         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
5168         necessary.
5169         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
5170
5171 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
5172
5173         * join.c (pthread_exit): Set p_terminated after reporting the
5174         termination event instead of before.
5175
5176 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
5177
5178         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
5179         if __USE_UNIX98.
5180
5181 2000-04-18  Andreas Jaeger  <aj@suse.de>
5182
5183         * Versions: Use ld instead of ld.so.
5184
5185 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
5186
5187         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
5188         Remove the typedef keyword.
5189
5190 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
5191
5192         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
5193         not stbar.
5194         (READ_MEMORY_BARRIER): Define.
5195         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
5196         MEMORY_BARRIER.
5197         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
5198         headers.
5199
5200 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
5201
5202         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5203         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
5204         use thread_handle().
5205
5206 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
5207
5208         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
5209         if fast mutex is used.  Don't initialize `already_canceled' twice.
5210         Correctly test for return value of timedsuspend.
5211
5212         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
5213         therefore don't need the _rt versions of the signal handlers.
5214
5215 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5216
5217         * pthread.c (pthread_yield): New function.
5218         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
5219         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
5220         * internals.h: Declare __pthread_yield.
5221
5222         * pthread.c (pthread_initialize): Avoid a bit more code if
5223         realtime signals are known to exist.
5224
5225         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
5226         to dynamically detect RT signals and avoid generating compatibility
5227         functions with old kernel.
5228         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
5229         __pthread_restart_new directly.
5230         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
5231         __pthread_wait_for_restart_signal directly.
5232         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
5233         __pthread_timedsuspend_new directly.
5234
5235 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5236
5237         * condvar.c: Remove all the special code to handle cond_timedwait.
5238         Use timedsuspend instead.
5239         * internals.h: Declare __pthread_timedsuspend_old,
5240         __pthread_timedsuspend_new, and __pthread_timedsuspend.
5241         Remove declaration of __pthread_init_condvar.
5242         * pthread.c: Define __pthread_timedsuspend variable.
5243         (__pthread_timedsuspend_old): New function.  Timed suspension
5244         implementation for old Linux kernels.
5245         (__pthread_timedsuspend_new): New function.  Timed suspension
5246         implementation for new Linux kernels.
5247         * restart.h (timedsuspend): New function.  Call appropriate
5248         suspension function through __pthread_timedsuspend.
5249         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
5250         the code.
5251         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5252
5253         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
5254         undefined.
5255         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
5256         where possible.
5257         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
5258         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5259
5260         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
5261         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5262
5263 2000-04-14  Andreas Jaeger  <aj@suse.de>
5264
5265         * weaks.c: Fix typo.
5266
5267         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
5268         2.2 for linuxthreads.
5269
5270 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
5271
5272         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5273         (pthread_getcpuclockid): Fix typo.
5274
5275 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
5276
5277         * Makefile (libpthread-routines): Add getcpuclockid.
5278         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
5279         * sysdeps/pthread/getcpuclockid.c: New file.
5280         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
5281         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
5282
5283         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
5284         Defined.
5285         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5286
5287         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
5288         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5289         and pthread_spin_unlock.
5290         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5291         into pthread_spinlock_t.  Change all uses.
5292         * spinlock.c: Implement pthread_spin_lock.
5293         Rename __pthread_unlock to __pthread_spin_unlock and define weak
5294         alias for real name.
5295         Define pthread_spin_trylock, pthread_spin_init, and
5296         pthread_spin_destroy.
5297         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5298         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5299         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5300         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5301         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5302         and pthread_spin_unlock.
5303         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5304         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5305         * condvar.c: Likewise.
5306         * internals.h: Likewise.
5307         * join.c: Likewise.
5308         * manager.c: Likewise.
5309         * mutex.c: Likewise.
5310         * pthread.c: Likewise.
5311         * rwlock.c: Likewise.
5312         * semaphore.c: Likewise.
5313         * signals.c: Likewise.
5314
5315         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5316         macros.
5317         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5318
5319 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5320
5321         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5322         _POSIX_SHARED_MEMORY_OBJECTS.
5323
5324 2000-04-11  Andreas Jaeger  <aj@suse.de>
5325
5326         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5327         (__compare_and_swap): Mark as modifying memory.
5328
5329 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5330
5331         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5332         __volatile__.
5333         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5334         Don't have the 'asm' __volatile__.
5335
5336 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5337
5338         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5339         * spinlock.c (__pthread_lock): Add memory barriers.
5340         (__pthread_unlock): Likewise.
5341         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5342         instruction.
5343         (RELEASE): Not needed anymore.
5344         (__compare_and_swap): Mark asm as modifying memory.
5345         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5346         of MEMORY_BARRIER.
5347         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5348         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5349         (MEMORY_BARRIER): Define using stbar.
5350         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5351         stbar.
5352         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5353         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5354         Mike Burrows <m3b@pa.dec.com>.
5355
5356 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5357
5358         * signals.c (sigaction): Fix return value for the case SIG is one
5359         of the signals the implementation uses.
5360         Patch by Xavier.Leroy@inria.fr.
5361
5362 2000-04-01  Andreas Jaeger  <aj@suse.de>
5363
5364         * attr.c: Use shlib-compat macros.
5365         * oldsemaphore.c: Likewise.
5366         * pthread.c: Likewise.
5367         * weaks.c: Likewise.
5368
5369 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5370
5371         * semaphore.c (sem_timedwait): New function.
5372         Patch by Carl Mailloux <carlm@oricom.ca>.
5373         * semaphore.h: Declare sem_timedwait.
5374         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5375
5376 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5377
5378         * sysdeps/pthread/Makefile: File removed.
5379
5380 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5381
5382         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5383         * internals.h (__pthread_reset_pthread_once): Add prototype.
5384         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5385
5386         * manager.c (pthread_handle_create): Store ID of new thread before
5387         clone call.
5388
5389 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5390
5391         * attr.c: Use new macros from shlib-compat.h to define versions.
5392         * oldsemaphore.c: Likewise.
5393         * semaphore.c: Likewise.
5394         * weaks.c: Likewise.
5395
5396         * pthread.c: Update for new SHLIB_COMPAT definition.
5397
5398         * manager.c (__pthread_manager): Unmask debug signal.
5399
5400         * pthread.c (pthread_initialize): Test for address of __dso_handle
5401         being NULL, not value.  Use __on_exit, not on_exit.
5402         Patch by Andreas Jaeger <aj@suse.de>.
5403
5404         * pthread.c: Use new macros from shlib-compat.h to define versions.
5405
5406 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5407
5408         * pthread.c (pthread_initialize): Instead of on_exit use
5409         __cxa_atexit if __dso_label is available to allow unloading the
5410         libpthread shared library.
5411
5412 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5413
5414         * condvar.c: Make tests for ownership of mutex less strict.
5415
5416 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5417
5418         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5419         current thread and return error if not.
5420         (pthread_cond_timedwait_relative_old): Likewise.
5421         (pthread_cond_timedwait_relative_new): Likewise.
5422
5423         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5424         (pthread_once_cancelhandler): New function.
5425         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5426
5427 2000-03-14  Andreas Jaeger  <aj@suse.de>
5428
5429         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5430         REG_GS.
5431         (pthread_handle_sigrestart_rt): Likewise.
5432         * signals.c (pthread_sighandler_rt): Likewise.
5433
5434 2000-03-02  Andreas Jaeger  <aj@suse.de>
5435
5436         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5437         Reported by Sean Chen <sean.chen@turbolinux.com>.
5438
5439 2000-02-28  Andreas Jaeger  <aj@suse.de>
5440
5441         * rwlock.c: Fix typo.
5442
5443 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5444
5445         * rwlock.c: Define __* variants of the functions and make old names
5446         aliases.
5447         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5448         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5449
5450 2000-02-25  Andreas Jaeger  <aj@suse.de>
5451
5452         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5453         pwrite64, lseek64, open64, and __open64 with version 2.2.
5454
5455 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5456
5457         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5458
5459 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5460
5461         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5462         nanosleep does not work either.  Get absolute time inside the
5463         loop.
5464         (pthread_cond_timedwait_relative_new): Likewise.
5465         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5466
5467 2000-02-13  Andreas Jaeger  <aj@suse.de>
5468
5469         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5470         (pthread_cond_timedwait_relative_old): Likewise.
5471
5472 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5473
5474         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5475         but keep the code around.  A bug in the kernel prevent us from
5476         using the code.
5477         (pthread_cond_timedwait_relative_new): Likewise.
5478         (PR libc/1597 and libc/1598).
5479
5480 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5481
5482         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5483         loop around nanosleep calls instead of around most of the function
5484         (pthread_cond_timedwait_relative_new): Likewise.
5485         body.  Got rid of backwards goto and one local.
5486
5487 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5488
5489         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5490         before every nanosleep call to account for time spent in the rest
5491         of the function.
5492         (pthread_cond_timedwait_relative_new): Likewise.
5493         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5494
5495 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5496
5497         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5498         from nanosleep call so that in case we restart we only wait for the
5499         remaining time.
5500         (pthread_cond_timedwait_relative_new): Likewise.
5501         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5502
5503 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5504
5505         * manager.c (pthread_allocate_stack): Compute guard page address
5506         correctly.  Patch by HJ Lu.
5507
5508         * sysdeps/pthread/pthread.h: Define
5509         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5510
5511 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5512
5513         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5514         preference handling.
5515         (pthread_rwlockattr_setkind_np): Allow
5516         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5517         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5518
5519 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5520
5521         * internals.h (pthread_readlock_info): New structure.
5522         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5523         p_untracked_readlock_count.
5524         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5525         Add initializers for new fields.
5526         * manager.c (pthread_free): Free read/write lock lists.
5527         * queue.h (queue_is_empty): New function.
5528         * rwlock.c: Implement requirements about when readers should get
5529         locks assigned.
5530         * sysdeps/pthread/pthread.h
5531         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5532         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5533         Define this name as well.
5534         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5535
5536 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5537
5538         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5539         Adjust initializers for struct _pthread_descr_struct change.
5540         * internals.h (struct _pthread_descr_struct): Move new elements to
5541         the end.
5542
5543 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5544
5545         Redesigned how cancellation unblocks a thread from internal
5546         cancellation points (sem_wait, pthread_join,
5547         pthread_cond_{wait,timedwait}).
5548         Cancellation won't eat a signal in any of these functions
5549         (*required* by POSIX and Single Unix Spec!).
5550         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5551         simultaneous condition variable signal (not required by POSIX
5552         or Single Unix Spec, but nice).
5553         * spinlock.c: __pthread_lock queues back any received restarts
5554         that don't belong to it instead of assuming ownership of lock
5555         upon any restart; fastlock can no longer be acquired by two threads
5556         simultaneously.
5557         * restart.h: Restarts queue even on kernels that don't have
5558         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5559         avoiding a rare race condition in pthread_cond_timedwait.
5560
5561 1999-12-31  Andreas Jaeger  <aj@suse.de>
5562
5563         * internals.h: Remove duplicate prototype declarations.
5564
5565         * weaks.c: Remove __THROW from prototypes since the file is not
5566         compiled by a C++ compiler.
5567         * internals.h: Likewise.
5568
5569 1999-12-30  Andreas Jaeger  <aj@suse.de>
5570
5571         * sysdeps/pthread/pthread.h: Move internal functions to...
5572         * sysdeps/pthread/bits/libc-lock.h: ...here.
5573
5574 1999-12-29  Andreas Jaeger  <aj@suse.de>
5575
5576         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5577
5578 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5579
5580         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5581         beginning.
5582
5583         * manager.c (__pthread_start): Add one more cast to prevent
5584         warning on 64bit machines.
5585
5586 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5587
5588         * manager.c (pthread_handle_create): Set p_pid of new thread
5589         before calling the callback function to report a new thread.
5590
5591 1999-12-20  Andreas Jaeger  <aj@suse.de>
5592
5593         * pthread.c (pthread_initialize): Move getrlimit call after
5594         setting of errno.
5595
5596 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5597
5598         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5599         pwrite64, lseek64, open64, and __open64.
5600         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5601         pwrite64, lseek64, open64, and __open64.
5602
5603         * manager.c (pthread_allocate_stack): Correct computation of
5604         new_thread_bottom.  Correct handling of stack size and when the
5605         rlimit method to guard for stack growth is used.
5606         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5607         minus one pagesize (not two).
5608
5609 1999-12-03  Andreas Jaeger  <aj@suse.de>
5610
5611         * Versions: Add __res_state with version GLIBC_2.2.
5612
5613         * errno.c (__res_state): New function to return thread specific
5614         resolver state.
5615
5616         * pthread.c (pthread_initialize): Initialize p_resp.
5617         (__pthread_reset_main_thread): Also set p_resp.
5618
5619         * manager.c (pthread_handle_create): Initialize p_resp.
5620
5621         * internals.h: Add thread specific resolver state.
5622         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5623
5624 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5625
5626         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5627         beginning.
5628         * sysdeps/i386/i686/pt-machine.h: Likewise.
5629         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5630
5631 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5632
5633         * manager.c (pthread_start_thread_event): Initialize p_pid already
5634         here.
5635
5636 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5637
5638         * internals.h: Add prototype for __pthread_manager_event.
5639         * manager.c (__pthread_manager_event): New function.
5640         (pthread_start_thread_event): Correct computation of self.
5641         Use INIT_THREAD_SELF.
5642         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5643         (__pthread_initialize_manager): Respect event flags also for creation
5644         of the manager thread.
5645
5646 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5647
5648         * pthread.c (__pthread_initialize_manager): Initialize
5649         __pthread_manager_thread.p_tid.
5650
5651 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5652
5653         * internals.h: Declare __pthread_last_event.
5654         * manager.c: Define __pthread_last_event.
5655         (pthread_handle_create): Set __pthread_last_event.
5656         (pthread_exited): Likewise.
5657         * join.c (pthread_exit): Likewise.
5658
5659         * Makefile (libpthread-routines): Add events.
5660         * events.c: New file.
5661         * internals.h: Protect against multiple inclusion.
5662         Include thread_dbP.h header.
5663         (struct _pthread_descr_struct): Add new fields p_report_events and
5664         p_eventbuf.
5665         Declare event reporting functions.
5666         * join.c (pthread_exit): Signal event if this is wanted.
5667         * manager.c (__pthread_threads_events): New variable.
5668         (pthread_handle_create): Take new parameters with event information.
5669         Signal TD_CREATE event if wanted.
5670         (__pthread_manager): Adjust pthread_handle_create call.
5671         (pthread_start_thread_event): New function.  Block until manager is
5672         finished and then call pthread_start_thread.
5673         (pthread_exited): Signal TD_REAP event if wanted.
5674
5675 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5676
5677         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5678
5679         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5680
5681 1999-10-25  Andreas Jaeger  <aj@suse.de>
5682
5683         * internals.h: Remove K&R compatibility.
5684         * no-tsd.c: Likewise.
5685         * semaphore.h: Likewise.
5686         * signals.c: Likewise.
5687         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5688         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5689         * weaks.c: Likewise.
5690
5691 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5692
5693         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5694         pthread_handle_sigcancel with functions that restore %gs from the
5695         signal context.  For each signal handling function, two wrappers
5696         are required, one for a non-RT signal and one for a RT signal.
5697         * signal.c: For i386, add code to restore %gs from the signal
5698         context in pthread_sighandler and pthread_sighandler_rt.
5699
5700 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5701
5702         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5703
5704 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5705
5706         * pthread.c (__pthread_initial_thread): Pass argument to
5707         PTHREAD_START_ARGS_INITIALIZER.
5708         (__pthread_manager_thread): Likewise.
5709
5710         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5711         initialize function.
5712
5713         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5714
5715         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5716
5717 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5718
5719         * internals.h: Correct return types for __libc_read and __libc_write.
5720
5721 1999-10-09  Andreas Jaeger  <aj@suse.de>
5722
5723         * internals.h: Add __new_sem_post to get prototype in
5724         manager.c; include semaphore.h for needed types.
5725
5726 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5727
5728         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5729         directly instead of calling sem_post which should not be necessary
5730         but is faster and might help in some case to work around problems.
5731         Patch by khendricks@ivey.uwo.ca [libc/1382].
5732
5733 1999-10-08  Andreas Schwab  <schwab@suse.de>
5734
5735         * sysdeps/pthread/Subdirs: New file.
5736         * Implies: Removed.
5737
5738 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5739
5740         * Implies: New file.
5741         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5742         * manager.c (pthread_handle_create): Initialize p_startfct.
5743         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5744
5745 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5746
5747         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5748         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5749         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5750
5751         * condvar.c (pthread_cond_timedwait_relative): Never return with
5752         EINTR.  Patch by Andreas Schwab.
5753
5754 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5755
5756         * signals.c (sigaction): Correct last patch.  Don't select
5757         pthread_sighandler_rt based on the signal number but instead of
5758         the SA_SIGINFO flag.
5759
5760 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5761
5762         * specific.c: Move definitions of struct pthread_key_struct and
5763         destr_function to ...
5764         * internals.h: ...here.
5765
5766 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5767
5768         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5769         this instead of pthread_handle_sigrestart if the signal is an RT
5770         signal.
5771
5772         * signals.c: Handle passing through of sighandler arguments also
5773         for real-time signals.
5774
5775 1999-09-03  Andreas Schwab  <schwab@suse.de>
5776
5777         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5778         fork as weak alias.
5779         (__vfork): New function, alias vfork.
5780         * Versions: Export __fork, vfork, and __vfork in libpthread.
5781
5782 1999-08-23  Andreas Schwab  <schwab@suse.de>
5783
5784         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5785         call to signal handler.
5786
5787 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5788
5789         * pthread.c (__pthread_reset_main_thread): Undo last change.
5790         (__pthread_kill_other_threads_np): Reset signal handlers for the
5791         signals we used in the thread implementation here.
5792
5793 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5794
5795         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5796         for the signals we used in the thread implementation [PR libc/1234].
5797
5798         * Versions: Export __pthread_kill_other_threads_np from libpthread
5799         for GLIBC_2.1.2.
5800
5801         * signals.c: Pass sigcontext through wrapper to the user function.
5802
5803 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5804
5805         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5806         __libc_internal_tsd_set.
5807
5808 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5809
5810         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5811         needed anymore.
5812
5813 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5814
5815         * internals.h: Align _pthread_descr_struct to 32 bytes.
5816         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5817         libc/1206.
5818
5819 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5820
5821         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5822         swap function.
5823
5824 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5825
5826         * Makefile (libpthread-routines): Add oldsemaphore routine.
5827         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5828         sem_trywait, and sem_wait to GLIBC_2.1.
5829         * oldsemaphore.c: New file.
5830         * semaphore.c: Add default_symbol_versions for the changed functions.
5831         (__new_sem_init): Rename from sem_init.
5832         (__new_sem_post): Rename from sem_post.
5833         (__new_sem_wait): Rename from sem_wait.
5834         (__new_sem_trywait): Rename from sem_trywait.
5835         (__new_sem_getvalue): Rename from sem_getvalue.
5836         (__new_sem_destroy): Rename from sem_destroy.
5837
5838 1999-06-23  Robey Pointer  <robey@netscape.com>
5839
5840         * internals.h: Added p_nextlock entry to separate queueing for a
5841         lock from queueing for a CV (sometimes a thread queues on a lock
5842         to serialize removing itself from a CV queue).
5843         * pthread.c: Added p_nextlock to initializers.
5844         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5845
5846 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5847
5848         * manager.c (pthread_handle_create): Free mmap region after stack
5849         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5850
5851 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5852
5853         * man/pthread_cond_init.man: Correct example.
5854         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5855
5856         * linuxthreads.texi (Condition Variables): Likewise.
5857
5858 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5859
5860         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5861         casx not cas, also successful casx returns the old value in rd
5862         and not the new value.
5863
5864 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5865
5866         * manager.c: If pthread_create() is given a NULL attribute
5867         and the thread manager runs with a realtime policy, set the
5868         scheduling policy of the newly created thread back to SCHED_OTHER.
5869         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5870         initialize the schedpolicy field of new_thread->p_start_args
5871         to that of the calling thread.
5872
5873 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5874
5875         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5876         instruction does not allow memory element to use offset.
5877
5878 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5879
5880         * manager.c (pthread_allocate_stack): Optimize initialization of new
5881         thread descriptor.
5882
5883         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5884         Don't use initializer since it is all zeroes.
5885         (__libc_once_define): Likewise.
5886
5887 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5888
5889         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5890         doesn't exist anymore.
5891         * sysdeps/i386/Implies: Likewise.
5892         * sysdeps/m68k/Implies: Likewise.
5893         * sysdeps/mips/Implies: Likewise.
5894         * sysdeps/powerpc/Implies: Likewise.
5895         * sysdeps/sparc/sparc32/Implies: Likewise.
5896         * sysdeps/sparc/sparc64/Implies: Likewise.
5897
5898 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5899
5900         * sysdeps/alpha/bits/semaphore.h: Removed.
5901         * sysdeps/powerpc/bits/semaphore.h: Removed.
5902         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5903         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5904         * Makefile (headers): Remove bits/semaphore.h.
5905
5906         * semaphore.h: Define _pthread_descr if necessary.
5907         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5908         Define SEM_FAILED.
5909         (sem_t): Protect element names with leading __.
5910         Add declarations for sem_close, sem_open, and sem_unlink.
5911         * semaphore.c: Adjust all functions for new element names.
5912         Define sem_close, sem_open, and sem_unlink.
5913         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5914         GLIBC_2.1.1.
5915         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5916         necessary.
5917
5918 1999-03-16  H.J. Lu  <hjl@gnu.org>
5919
5920         * specific.c (pthread_key_delete): Check th->p_terminated to see
5921         if the thread is running.
5922
5923         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5924         Added to GLIBC_2.0 for libc.so.
5925
5926 1999-02-12  H.J. Lu  <hjl@gnu.org>
5927
5928         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5929         __libc_allocate_rtsig): Added to GLIBC_2.1.
5930
5931         * internals.h (DEFAULT_SIG_RESTART): Removed.
5932         (DEFAULT_SIG_CANCEL): Removed.
5933
5934         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5935         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5936         (__pthread_sig_restart, __pthread_sig_cancel,
5937         __pthread_sig_debug): Initialized.
5938         (pthread_initialize): Call init_rtsigs () to initialize
5939         real-time signals.
5940
5941 1999-02-03  H.J. Lu  <hjl@gnu.org>
5942
5943         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5944         Don't restart the thread which sent REQ_DEBUG.
5945         (pthread_start_thread): Check if __pthread_sig_debug > 0
5946         before debugging.
5947
5948         * pthread.c (__pthread_initialize_manager): Suspend ourself
5949         after sending __pthread_sig_debug to gdb instead of
5950         __pthread_sig_cancel.
5951
5952 1999-01-24  H.J. Lu  <hjl@gnu.org>
5953
5954         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5955         from mask if __pthread_sig_debug > 0.
5956         (pthread_handle_create): Increment __pthread_handles_num.
5957
5958         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5959         * pthread.c (__pthread_initialize_manager): Likewise.
5960
5961         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5962         instead of __libc_allocate_rtsig (2).
5963         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5964         instead of __pthread_sig_cancel.
5965         (pthread_handle_sigdebug): Fix comments.
5966
5967 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5968
5969         * manager.c (pthread_allocate_stack): Set
5970         __pthread_nonstandard_stacks if user-specified stack is used.
5971
5972 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5973
5974         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5975         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5976
5977 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5978
5979         * pthread.c: Use a third signal __pthread_sig_debug distinct
5980         from __pthread_sig_cancel to notify gdb when a thread is
5981         created
5982         * manager.c: Likewise.
5983         * internals.h: Likewise.
5984         * signals.c: The implementation of sigwait(s) assumed that
5985         all signals in s have signal handlers already attached.
5986         This is not required by the standard, so make it work
5987         also if some of the signals have no handlers.
5988
5989 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5990
5991         * linuxthreads.texi: Remove pointers from first @node.  Move old
5992         @node spec inside comment.
5993
5994 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5995
5996         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5997         _IO_lock_unlock.
5998
5999 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
6000
6001         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
6002         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
6003
6004 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
6005
6006         * manager.c: Threads now send __pthread_sig_cancel on termination.
6007         Change clone call and signal masks.
6008         * thread.c (pthread_handle_sigrestart): Remove special code for
6009         manager.
6010         (pthread_handle_sigcancel): In manager thread call
6011         __pthread_manager_sighandler.
6012         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
6013         * sysdeps/i386/i686/pt-machine.h: Likewise.
6014         Patches by Xavier Leroy.
6015
6016 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
6017
6018         * spinlock.c (__pthread_unlock): Don't crash if called for an
6019         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
6020
6021         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
6022         overall runtime.
6023
6024 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
6025
6026         * Examples/ex3.c: Wait until all threads are started before
6027         searching for the number to avoid race condition on very fast
6028         systems.
6029
6030 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6031
6032         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
6033         declaration since it's not needed.
6034
6035         * sysdeps/pthread/pthread.h: Move internal functions to ...
6036         * internals.h: ...here.
6037
6038 1998-12-02  H.J. Lu  <hjl@gnu.org>
6039
6040         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
6041         SIGRTMIN is defined.
6042         (__pthread_sig_cancel): Likewise.
6043
6044 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6045
6046         * wrapsyscall.c: Include <sys/mman.h> for msync,
6047         <stdlib.h> for system and <termios.h> for tcdrain prototype.
6048         Correct msync declaration.
6049
6050 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
6051
6052         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
6053         __libc_tsd_set): New macros for new interface.
6054         * no-tsd.c: New file, provide uninitialized defns of
6055         __libc_internal_tsd_get and __libc_internal_tsd_set.
6056         * Makefile (routines): Add no-tsd.
6057
6058 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
6059
6060         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
6061         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
6062         __libc_internal_tsd_set): Move decls to ...
6063         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
6064         declarations.
6065
6066         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
6067         __libc_internal_tsd_set): Make these pointers to functions, not
6068         functions; remove #pragma weak decls for them.
6069         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
6070         Define static functions and initialized pointers to them.
6071
6072 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
6073
6074         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
6075         (CFLAGS-specific.c): Likewise.
6076         (CFLAGS-pthread.c): Likewise.
6077         (CFLAGS-ptfork.c): Likewise.
6078         (CFLAGS-cancel.c): Likewise.
6079         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
6080         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
6081
6082         * mutex.c (pthread_mutex_init): Define as strong symbol.
6083         (pthread_mutex_destroy): Likewise.
6084         (pthread_mutex_trylock): Likewise.
6085         (pthread_mutex_lock): Likewise.
6086         (pthread_mutex_unlock): Likewise.
6087         (pthread_mutexattr_init): Likewise.
6088         (pthread_mutexattr_destroy): Likewise.
6089         (pthread_once): Likewise.
6090         * ptfork.c (pthread_atfork): Likewise.
6091         * specific.c (pthread_key_create): Likewise.
6092         (pthread_setspecific): Likewise.
6093         (pthread_getspecific): Likewise.
6094
6095 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6096
6097         * linuxthreads.texi: Fix punctuation after xref.
6098
6099 1998-11-10  H.J. Lu  <hjl@gnu.org>
6100
6101         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
6102         if it is defined in <linux/limits.h>.
6103
6104 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
6105
6106         * spinlock.h (__pthread_trylock): Define inline.
6107         (__pthread_lock): Add extra parameter to declaration.  Declare
6108         using internal_function.
6109         (__pthread_unlock): Declare using internal_function.
6110         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
6111         of local variable self.  Avoid recomputing self.  Define using
6112         internal_function.
6113         (__pthread_trylock): Remove.
6114         (__pthread_unlock): Define using internal_function.
6115         * cancel.c: Adjust for __pthread_lock interface change.  Use already
6116         computed self value is possible.
6117         * condvar.c: Likewise.
6118         * join.c: Likewise.
6119         * manager.c: Likewise.
6120         * mutex.c: Likewise.
6121         * pthread.c: Likewise.
6122         * rwlock.c: Likewise.
6123         * semaphore.c: Likewise.
6124         * signals.c: Likewise.
6125
6126 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
6127
6128         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
6129         __ to field names of the struct.
6130         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
6131         Likewise.
6132         (pthread_attr_t): Likewise.
6133         (pthread_cond_t): Likewise.
6134         (pthread_condattr_t): Likewise.
6135         (pthread_mutex_t): Likewise.
6136         (pthread_mutexattr_t): Likewise.
6137         (pthread_rwlock_t): Likewise.
6138         (pthread_rwlockattr_t): Likewise.
6139         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
6140         * cancel.c: Likewise.
6141         * condvar.c: Likewise.
6142         * manager.c: Likewise.
6143         * mutex.c: Likewise.
6144         * pthread.c: Likewise.
6145         * ptlongjmp.c: Likewise.
6146         * rwlock.c: Likewise.
6147         * spinlock.c: Likewise.
6148
6149 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
6150
6151         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
6152         also with PT_EI.
6153
6154         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
6155         definitions.
6156
6157         * Makefile (libpthread-routines): Add pt-machine.
6158         * pt-machine.c: New file.
6159         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
6160         yet defined.  Use PT_EI in extern inline definitions.
6161         * sysdeps/arm/pt-machine.h: Likewise.
6162         * sysdeps/i386/pt-machine.h: Likewise.
6163         * sysdeps/i386/i686/pt-machine.h: Likewise.
6164         * sysdeps/m68k/pt-machine.h: Likewise.
6165         * sysdeps/mips/pt-machine.h: Likewise.
6166         * sysdeps/powerpc/pt-machine.h: Likewise.
6167         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
6168         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6169
6170 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6171
6172         * semaphore.h: Include <sys/types.h> so that _pthread_descr
6173         is declared.
6174
6175 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
6176
6177         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
6178         argument.
6179         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
6180
6181 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6182
6183         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
6184         guard.
6185
6186 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6187
6188         * signals.c (sigaction): Check that sig is less than NSIG to avoid
6189         array index overflow.
6190
6191 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
6192
6193         * sysdeps/pthread/semaphore.h: New file.
6194
6195 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
6196
6197         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
6198         _LIBC_TSD_KEY_DL_ERROR.
6199
6200 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
6201
6202         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
6203         * sysdeps/i386/pt-machine.h: Likewise.
6204         Suggested by Roland McGrath.
6205
6206 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
6207
6208         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
6209         access thread data with non-constant offsets.
6210         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
6211         necessary.
6212
6213         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
6214         THREAD_SETMEM_NC definitions.
6215
6216         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
6217         THREAD_SETMEM_NC.
6218         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6219
6220 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
6221
6222         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
6223         not already defined.
6224         (struct _pthread_descr_struct): Add p_self and p_nr field.
6225         * manager.c (__pthread_handles): Define second element to point
6226         to manager thread.
6227         (__pthread_handles_num): Initialize to 2.
6228         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
6229         (pthread_start_thread): Likewise.
6230         (pthread_handle_create): Start search for free slot at entry 2.
6231         Initialize new fields p_self and p_nr.
6232         Call __clone with CLONE_PTRACE if available.
6233         (pthread_free): Call FREE_THREAD_SELF if available.
6234         * pthread.c (__pthread_initial_thread): Initialize new fields.
6235         (__pthread_manager_thread): Likewise.
6236         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
6237
6238         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
6239         elements of the thread descriptor.
6240         * condvar.c: Likewise.
6241         * errno.c: Likewise.
6242         * join.c: Likewise.
6243         * manager.c: Likewise.
6244         * pthread.c: Likewise.
6245         * ptlongjmp.c: Likewise.
6246         * semaphore.c: Likewise.
6247         * signals.c: Likewise.
6248         * specific.c: Likewise.
6249         * spinlock.c: Likewise.
6250
6251         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
6252
6253         * sysdeps/i386/useldt.h: New file.
6254         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
6255
6256         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
6257         THREAD_SETMEM using __thread_self.
6258         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6259
6260 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
6261
6262         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
6263         turned out that we didn't need to queue after all.
6264
6265 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
6266
6267         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
6268         and wastes space; correct types.
6269
6270 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
6271
6272         * signals.c (sigaction): Handle NULL argument.
6273
6274 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
6275
6276         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
6277         of sigset_t.
6278
6279 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6280
6281         * Makefile (linuxthreads-version): Extract correct number from
6282         Banner.
6283
6284 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
6285
6286         * Banner: Bump version number to 0.8
6287         * FAQ.html: Many updates, in particular w.r.t. debugging.
6288         * manager.c: Support for non-default stacksize for
6289         LinuxThreads-allocated stacks;
6290         don't use guard pages for stacks with default size, rely on
6291         rlimit(RLIMIT_STACK) instead (it's cheaper).
6292         * attr.c: Likewise.
6293         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6294         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6295         * condvar.c: Likewise.
6296         * internals.h: Likewise.
6297         * restart.h: Likewise.
6298         * signals.c: Likewise.
6299         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6300
6301 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6302
6303         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6304         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
6305         * Versions: Put __pthread_mutexattr_settype under version
6306         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
6307         __pthread_mutexattr_gettype.
6308
6309 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6310
6311         * sysdeps/pthread/bits/libc-lock.h: Make
6312         __pthread_mutexattr_settype weak.  Don't make
6313         __pthread_mutexattr_setkind_np weak.
6314
6315 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
6316
6317         * manager.c (pthread_handle_create): Check whether sched_setscheduler
6318         call can succeed here.
6319
6320         * mutex.c: Define __pthread_mutexattr_settype and make
6321         __pthread_mutexattr_setkind_np an alias.
6322         Likewise for __pthread_mutexattr_gettype.
6323
6324 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6325
6326         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6327         is root.
6328
6329 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6330
6331         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6332
6333 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6334
6335         * Examples/ex6.c: Include <unistd.h> for usleep.
6336
6337 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6338
6339         * Examples/ex4.c (main): Use exit, not pthread_exit.
6340
6341 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6342
6343         * Versions: Add __pthread_mutexattr_gettype and
6344         __pthread_mutexattr_settype.
6345         * lockfile.c: Use __pthread_mutexattr_settype instead of
6346         __pthread_mutexattr_setkind_np.
6347         * mutex.c: Define __pthread_mutexattr_gettype and
6348         __pthread_mutexattr_settype.
6349         * weak.c: Likewise.
6350         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6351         __pthread_mutexattr_settype.
6352         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6353         Use __pthread_mutexattr_settype.
6354
6355 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6356
6357         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6358         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6359         pthread_mutexattr_settype.
6360         * sysdeps/pthread/pthread.h: Declare these functions.
6361         Move pthread_sigmask and pthread_kill declaration in separate header.
6362         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6363
6364 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6365
6366         * Makefile: Add rules to compile and run tests.
6367         * Examples/ex1.c: Little changes to fix warnings.
6368         * Examples/ex2.c: Likewise.
6369         * Examples/ex3.c: Likewise.
6370         * Examples/ex4.c: Likewise.
6371         * Examples/ex5.c: Likewise.
6372         * Examples/ex6.c: New file.
6373
6374 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6375
6376         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6377
6378 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6379
6380         * attr.c: Include <string.h>.
6381
6382 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6383
6384         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6385         * internals.h: Include limits.h.
6386         * manager.c: Use memcpy to copy sched_param.
6387         * ptfork.c: Include errno.h.
6388         * pthread.c: Likewise.
6389         * semaphore.c: Likewise.
6390         * specific.c: Likewise.
6391         * spinlock.h: Likewise.
6392         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6393         type definition to ...
6394         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6395
6396 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6397
6398         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6399
6400         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6401         as macros as demanded in POSIX.1, Annex C.
6402
6403 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6404
6405         * internals.h (struct pthread_request): For free use pthread_t
6406         instead of pthread_descr.
6407         * join.c (pthread_join): Pass thread_id, not th to manager.
6408         (pthread_detach): Likewise.
6409         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6410         (pthread_exited): Remove detached queue code.
6411         (pthread_handle_free): Expect thread ID parameter and use it to
6412         validate the thread decsriptor.  Don't use detached queue.
6413         Patches by Xavier Leroy.
6414
6415 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6416
6417         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6418         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6419         __pthread_atfork, __pthread_key_create, __pthread_once.
6420         * internals.h: Doc fix.
6421         * pthread.c (__pthread_initialize): Define again.
6422
6423 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6424
6425         * manager.c (pthread_exited): If thread is not detached put it on
6426         special list.
6427         (pthread_handle_free): If thread is not on list with living threads
6428         search on list with detached threads.
6429
6430         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6431         for new definition of pthread_rwlock_t.
6432
6433         * spinlock.c: Correct test whether to compile
6434         __pthread_compare_and_swap or not.
6435
6436 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6437
6438         * attr.c: Finish user stack support.  Change locking code to be safe
6439         in situations with different priorities.
6440         * cancel.c: Likewise.
6441         * condvar.c: Likewise.
6442         * internals.h: Likewise.
6443         * join.c: Likewise.
6444         * manager.c: Likewise.
6445         * mutex.c: Likewise.
6446         * pthread.c: Likewise.
6447         * ptlongjmp.c: Likewise.
6448         * queue.h: Likewise.
6449         * rwlock.c: Likewise.
6450         * semaphore.c: Likewise.
6451         * semaphore.h: Likewise.
6452         * signals.c: Likewise.
6453         * spinlock.c: Likewise.
6454         * spinlock.h: Likewise.
6455         * sysdeps/pthread/pthread.h: Likewise.
6456         Patches by Xavier Leroy.
6457
6458         * sysdeps/i386/i686/pt-machine.h: New file.
6459
6460 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6461
6462         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6463         [sg]et_stackaddr prototypes always available.
6464
6465         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6466         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6467
6468 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6469
6470         * manager.c (pthread_free): Undo patch from 980430.
6471         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6472
6473 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6474
6475         * manager.c: Define __pthread_manager_adjust_prio and use it to
6476         increase priority when needed.
6477         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6478         * mutex.c: Optimize mutexes to wake up only one thread.
6479         * pthread.c: Move PID of manager for global variable in structure
6480         element.
6481         Patches by Xavier Leroy.
6482
6483 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6484
6485         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6486
6487 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6488
6489         * attr.c: Correct typo.
6490
6491 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6492
6493         * manager.c (pthread_free): Unmap guard before the stack.
6494         Patch by Matthias Urlichs.
6495
6496 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6497
6498         * manager.c (pthread_free): Detect already free child.
6499         Patch by Xavier Leroy, reported by Matthias Urlichs.
6500
6501 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6502
6503         * Makefile (linuxthreads-version): Renamed back from
6504         libpthread-version.
6505
6506 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6507
6508         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6509         __libc_longjmp.
6510
6511 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6512
6513         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6514         * internals.h: Add definitions for new spinlock implementation.
6515         * ptlongjmp.c: New file.
6516         * spinlock.c: New file.
6517         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6518         new function __pthread_acquire to prevent deadlocks with thread
6519         with different priorities.
6520         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6521
6522 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6523
6524         * manager.c (__pthread_manager): Reduce first argument to select
6525         to include just the needed file descriptor.
6526
6527 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6528
6529         * manager.c: Fix last patch which caused core dumps.
6530
6531         * pthread.c: Correctly handle missing SIGRTMIN.
6532
6533 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6534
6535         * libpthread.map: Add __libc_internal_tsd_get and
6536         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6537         libc internal versions of the cancelable functions.
6538
6539 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6540
6541         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6542
6543 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6544
6545         * attr.c: Implement pthread_attr_[gs]etguardsize,
6546         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6547         Change pthread_attr_init to have two interfaces.
6548         * internals.h (struct _pthread_descr_struct): Add new fields for
6549         above functions.
6550         * libpthread.map: Add names in GLIBC_2.1 section.
6551         * manager.c (pthread_handle_create): Implement guardsize and
6552         user stack.
6553         (pthread_free): Likewise.
6554         * pthread.c (pthread_create): Add new interface for changed
6555         pthread_attr_t.
6556         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6557         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6558         PTHREAD_STACK_MIN.
6559
6560 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6561
6562         * manager.c: Enable resetting of the thread scheduling policy
6563         to SCHED_OTHER when the parent thread has a different one.
6564
6565 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6566
6567         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6568         _POSIX_ASYNCHRONOUS_IO.
6569
6570         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6571         mutexes.
6572         * mutex.c: Implement new mutex types.
6573
6574         * internals.h: Include <signal.h>.
6575
6576         * libpthread.map: Add __erno_location and __h_errno_location.
6577
6578         * errno.c: Return pointer to variable actually in use.  This might
6579         not be the one in the thread structure.
6580         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6581         and p_h_errnop.
6582         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6583         of manager thread structure.
6584         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6585         thread.
6586         * pthread.c: Adapt initializer for thread structures.
6587         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6588         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6589         current thread to global variables.
6590
6591 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6592
6593         * rwlock.c: New file.
6594         * Makefile (libpthread-routines): Add rwlock.
6595         * sysdeps/pthread/pthread.h: Define data structures and declare
6596         functions.
6597         * libpthread.map: Add new functions.
6598
6599 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6600
6601         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6602         * sysdeps/arm/Implies: likewise.
6603         * README: Document it.
6604
6605 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6606
6607         * signals.c: Remove unneeded initializer for sigwaited, saving a
6608         warning.
6609
6610 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6611
6612         * semaphore.c (sem_init): Set sem_spinlock only if available.
6613
6614 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6615
6616         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6617         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6618
6619         * Makefile: Update from LinuxThreads 0.7.
6620         * internals.h. Likewise.
6621         * manager.c: Likewise.
6622         * mutex.c: Likewise.
6623         * pthread.c: Likewise.
6624         * signals.c: Likewise.
6625         * specific.c: Likewise.
6626         * Examples/ex3.c: Likewise.
6627
6628 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6629
6630         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6631         open.
6632
6633 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6634
6635         * wrapsyscall.c: Add socket functions which are also cancelation
6636         points.
6637
6638 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6639
6640         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6641         New functions for fast thread specific data within libc.
6642
6643         * internals.h: Add new array p_libc_specific to struct
6644         _pthread_descr_struct.
6645
6646         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6647
6648 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6649
6650         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6651         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6652
6653 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6654
6655         * internals.h (struct _pthread_descr_struct): Add definitions for
6656         two-level specific key handling.
6657         * manager.c (pthread_handle_create): Initialize specific memory array.
6658         * specific.c: Implement two-level key handling.
6659         * weaks.c: Don't provide dummy key handling.
6660         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6661         Add definition of __libc_key_t.
6662         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6663         as 1024.
6664         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6665         PTHREAD_DESTRUCTOR_ITERATIONS.
6666
6667         * manager.c (pthread_handle_create): Compare mmap result with
6668         MAP_FAILED.
6669
6670         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6671         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6672
6673 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6674
6675         sysdeps/sparc -> sysdeps/sparc/sparc32
6676         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6677
6678         * internals.h: Change definition of THREAD_SELF to be an expression,
6679         not a statement that did a return.
6680         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6681         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6682         Follow Solaris and use a "system reserved" register (%g6) to hold
6683         the thread descriptor.
6684         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6685
6686 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6687
6688         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6689         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6690         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6691
6692         * semaphore.c: Include spinlock.h only when needed.
6693
6694         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6695         keys for entries not in use.
6696
6697         * weaks.c: Implement key handling functions for real.
6698
6699 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6700
6701         Initial sparc64-linux support:
6702         * sysdeps/sparc64/Implies: New file.
6703         * sysdeps/sparc64/pt-machine.h: Likewise.
6704
6705 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6706
6707         * semaphore.c: Include spinlock.h at correct place.
6708         Patch by HJ Lu.
6709
6710 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6711
6712         The Great Bit File Move:
6713         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6714         * sysdeps/powerpc/semaphorebits.h: Likewise.
6715         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6716         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6717         * sysdeps/pthread/libc-lock.h: -> bits/
6718         * sysdeps/pthread/stdio-lock.h: Likewise.
6719         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6720         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6721         * semaphore.h: Likewise.
6722         * sysdeps/pthread/pthread.h: Likewise.
6723
6724         * lockfile.c: <foo.h> -> <bits/foo.h>.
6725         * semaphore.h: Likewise.
6726
6727         * Makefile: (headers): foo.h -> bits/foo.h.
6728         * sysdeps/pthread/Makefile: Likewise.
6729
6730 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6731
6732         * semaphore.c (sem_init): Set sem_spinlock only if available.
6733
6734         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6735         asm constraints.
6736
6737 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6738
6739         Update from LinuxThreads 0.6.
6740
6741         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6742         and __sched_get_priority_min instead of names without `__'.
6743
6744         * manager.c: Rewrite large parts to implement opaque pthread_t.
6745
6746         * cancel.c: Adapt for opaque pthread_t type.
6747         * condvar.c: Likewise.
6748         * errno.c: Likewise.
6749         * join.c: Likewise.
6750         * mutex.c: Likewise.
6751         * pthread.c: Likewise.
6752         * signals.c: Likewise.
6753         * specific.c: Likewise.
6754         * restart.h: Likewise.
6755         * queue.h: Likewise.
6756         * Examples/ex3.c: Likewise.
6757         * Examples/ex4.c: Likewise.
6758         * sysdeps/pthread/pthread.h: Likewise.
6759
6760         * pthread.c: Accumulate time for all threads in thread manager.
6761
6762         * semaphore.c: Implement fallback implementation for architectures
6763         sometimes missing compare-exchange operations.
6764
6765         * cancel.c (pthread_cancel): Validate handle argument.
6766         * join.c (pthread_join): Likewise.
6767         (pthread_detach): Likewise.
6768         * signals.c (pthread_kill): Likewise.
6769
6770         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6771
6772         * queue.h (enqueue): Enqueue thread according to priority.
6773
6774         * internals.c (struct pthread_start_args): New struct for passing
6775         args to cloning function.
6776         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6777         opaque pthread_t.
6778
6779         * Examples/Makefile (clean): Pass -f option to rm.
6780
6781         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6782         and define TEST_FOR_COMPARE_AND_SWAP.
6783         * sysdeps/i386/i486/pt-machine.h: Removed.
6784
6785         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6786         to 1024.
6787
6788 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6789
6790         * restart.h (suspend): Clear p_signal before suspending.
6791         (suspend_with_cancellation): Likewise.
6792         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6793
6794         * weaks.c: Make __pthread_key_create return 1.
6795         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6796         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6797         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6798         using libio.
6799
6800 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6801
6802         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6803
6804 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6805
6806         * sysdeps/powerpc/Implies: Added.
6807         * sysdeps/powerpc/pt-machine.h: Added.
6808         * sysdeps/powerpc/semaphorebits.h: Added.
6809
6810 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6811
6812         * pthread.c (__pthread_initial_thread): Correct
6813         initializer.
6814         (__pthread_manager_thread): Likewise.
6815         Reported by Andreas Jaeger.
6816
6817 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6818
6819         Since sigset_t no longer fits in a register, we can't pass in the
6820         thread's initial mask so easily.  Take this opportunity to simplify
6821         the clone implementation by only accepting a single void* argument.
6822
6823         * manager.c (__pthread_manager): Put thread vitals in the thread
6824         struct instead of as arguments through clone.
6825         (pthread_start_thread): Look for them there.
6826         * internals.h (struct _pthread): Add p_initial_fn,
6827         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6828         * pthread.c (pthread_initialize_manager): Revise clone invocation.