Update.
[kopensolaris-gnu/glibc.git] / linuxthreads / ChangeLog
1 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
2
3         * Makefile (tests): Add tst-tls1.
4         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
5         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6         ($(objpfx)tst-tls1): New.
7         ($(objpfx)tst-tls2.out): Likewise.
8         (tests): Depend on $(objpfx)tst-tls2.out.
9         * tst-tls1.c: New test.
10         * tst-tls1.h: New.
11         * tst-tls1mod.c: New.
12         * tst-tls1moda.c: New.
13         * tst-tls1modb.c: New.
14         * tst-tls1modc.c: New.
15         * tst-tls1modd.c: New.
16         * tst-tls1mode.c: New.
17         * tst-tls1modf.c: New.
18         * tst-tls2.sh: New test.
19
20 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
21
22         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
23         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
24         __THROW to match NPTL.
25
26 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
27
28         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
29         -DBROKEN_THREAD_SIGNALS.
30
31 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
32
33         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
34         Correct spelling of per thread resolver state.
35
36 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
37
38         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
39         (__rtld_lock_default_lock_recursive,
40         __rtld_lock_default_unlock_recursive): Define.
41         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
42         __rtld_lock_unlock_recursive): Define using
43         GL(_dl_rtld_*lock_recursive).
44         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
45         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
46         number of times as GL(_dl_load_lock) using non-mt implementation was
47         nested.
48
49 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
50
51         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
52         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
53         Likewise.
54         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
55         Likewise.
56         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
57
58         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
59         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
60         PTHREAD_STACK_MIN in comments.
61
62         * sysdeps/alpha/pt-machine.h (PT_EI): Add
63         __attribute__((always_inline)).
64         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
65         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
66         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
67         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
68         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
69         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
70         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
71         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
72         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
73         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
74         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
75         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
76         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
77         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
78         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
79         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
80         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
81         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
82         (__thread_self).
83         * Examples/ex13.c (main): Change res type to void * to avoid
84         warnings.
85         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
86
87 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
88
89         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
90         functions.
91         (pthread_initialize): Initialize GL(dl_init_static_tls).
92
93 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
94
95         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
96         before __timer_dealloc.
97         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
98         Don't call list_unlink.
99
100 2003-07-29  Roland McGrath  <roland@redhat.com>
101
102         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
103
104 2003-07-25  Roland McGrath  <roland@redhat.com>
105
106         * manager.c (pthread_start_thread): Fix typo in last change.
107
108 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
109
110         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
111         use L() for local labels.
112
113 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
114
115         * descr.h (struct _pthread_descr_struct): Provide p_res member
116         even if USE_TLS && HAVE___THREAD.
117         * sysdeps/pthread/res-state.c (__res_state): Return __resp
118         if USE___THREAD.
119         * manager.c: Include resolv.h.
120         (pthread_start_thread): Initialize __resp.
121         * libc-tls-loc.c (__res_state): Return __resp.
122         * Makefile (tests): Add tst-_res1.
123         (modules-names, extra-objs, test-extras, test-modules): Add support
124         for test modules.
125         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
126         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
127         -lpthread.
128         * tst-_res1.c: New test.
129         * tst-_res1mod1.c: New test.
130         * tst-_res1mod2.c: New test.
131
132 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
133
134         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
135         __libc_cleanup_pop.
136
137         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
138
139 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
140
141         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
142         in test for compilation in libc.
143
144 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
145
146         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
147         different symbol for the cancellation syscall wrapper and
148         non-cancellation syscall wrapper.
149         (PSEUDO_END): Define.
150
151 2003-07-05  Richard Henderson  <rth@redhat.com>
152
153         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
154
155 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
156
157         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
158         in librt.
159
160 2003-06-21  Andreas Schwab  <schwab@suse.de>
161
162         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
163         in librt.
164
165 2003-06-20  Richard Henderson  <rth@redhat.com>
166
167         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
168         Remove ptw-osf_sigprocmask.
169
170 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
171
172         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
173         __librt_disable_asynccancel): Declare.
174         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
175         for IS_IN_librt.
176         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
177         in librt.
178         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
179         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
180         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
181         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
182         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
183         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
184         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
185         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
186         * sysdeps/x86_64/tcb-offsets.sym: New file.
187         * sysdeps/x86_64/Makefile: New file.
188         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
189         * Versions (libc): Export __librt_enable_asynccancel,
190         __librt_disable_asynccancel and __librt_multiple_threads as
191         GLIBC_PRIVATE.
192         * libc-cancellation.c (__librt_multiple_threads,
193         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
194
195 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
196
197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
198         (SINGLE_THREAD_P): Replace @ got notation with @toc.
199
200 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
201
202         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
203         initializer [PR libc/5052].
204
205 2003-06-09  Andreas Schwab  <schwab@suse.de>
206
207         * Makefile: Move inclusion of ../Rules down after extra-objs is
208         fully known.
209
210 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
211
212         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
213         5+ arg syscalls only needed for PIC.
214         Patch by Ralph Siemsen <ralphs@netwinder.org>.
215
216 2003-06-05  Richard Henderson  <rth@redhat.com>
217
218         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
219         and require CFI assembler directives.
220         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
221
222 2003-05-30  Andreas Jaeger  <aj@suse.de>
223
224         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
225         (SAVESTK_0): Add CFI directives.
226         (SAVESTK_3): Likewise.
227         (SAVESTK_5): Likewise.
228         (RESTSTK_0): Likewise.
229         (RESTSTK_3): Likewise.
230         (RESTSTK_5): Likewise.
231
232 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
233
234         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
235         messages.
236
237 2003-05-04  Roland McGrath  <roland@redhat.com>
238
239         * Makefile ($(objpfx)../libc.so): New target.
240
241 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
242
243         * pthread.c (__pthread_initialize_manager): Remove one last
244         p_multiple_threads call.
245
246 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
247
248         * pthread.c (__pthread_initialize_manager): Subtract
249         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
250         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
251         instead of sizeof (pthread_descr).
252         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
253         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
254         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
255         pthread_descr.
256         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
257         to TLS_TCB_ALIGN.
258         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
259         tcbp.
260         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
261         unneccessarily.
262         (NO_TLS_OFFSET): Define.
263
264 2003-04-22  Roland McGrath  <roland@redhat.com>
265
266         * Makeconfig (shared-thread-library): Reverse link order to work
267         around linker bug.
268
269 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
270
271         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
272         compiler knows we use the ldt_entry variable and that the syscall
273         modifies the memory.
274
275         * internals.h: Split pthread_functions definition into...
276         * sysdeps/pthread/pthread-functions.h: ...new file.
277
278         * sysdeps/i386/useldt.h: Include <sysdep.h>.
279
280 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
281
282         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
283         match changes in NPTL sysdep-cancel.h.
284
285 2003-04-11  Roland McGrath  <roland@redhat.com>
286
287         * Makefile (multidir): Don't set the variable here with $(shell ...).
288         ($(objpfx)multidir.mk): New target, generated makefile; include that.
289         (generated): Append it.
290
291 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
292
293         * Makefile (multidir, crti-objs, crtn-objs): New variables.
294         (generated-dirs): Add pathname component of multidir.
295         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
296         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
297         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
298         $(objpfx)$(multidir)/crtn.o): New.
299         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
300         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
301         before-compile, generated): Don't generate and use specs.
302         ($(objpfx)specs): Remove.
303
304 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
305
306         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
307
308 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
309
310         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
311         missing ; after ENTRY use [PR libc/4997].
312
313 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
314
315         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
316         in case the parent blocked it.
317
318 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
319
320         * Makefile (libpthread-routines): Add pthread_atfork.
321         (libpthread-static-only-routines): Add pthread_atfork.
322
323 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
324
325         * pthread.c (__pthread_wait_for_restart_signal): Use
326         __pthread_sigsuspend instead of sigsuspend.
327         * internals.h (__pthread_sigsuspend): New prototype.
328         * Makefile (libpthread-routines): Add pt-sigsuspend.
329         (tests): Add tst-cancel7.
330         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
331         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
332         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
333         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
334         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
335         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
336         * tst-cancel7.c: New test.
337
338 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
339
340         * alloca_cutoff.c: Include internals.h.
341         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
342         * sysdeps/pthread/herrno-loc.c: Likewise.
343         * sysdeps/pthread/res-state.c: Likewise.
344
345 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
346
347         * sysdeps/pthread/bits/typesizes.h: New file.
348         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
349         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
350
351 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
352
353         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
354         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
355
356 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
357
358         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
359
360 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
361
362         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
363         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
364
365 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
366
367         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
368         (TLS_SETUP_GS_SEGMENT): Fix a typo.
369
370 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
371
372         * sysdeps/pthread/Makefile: Fix cut&paste error.
373
374 2003-03-18  Roland McGrath  <roland@redhat.com>
375
376         * Versions (libpthread: GLIBC_2.2): Remove
377         pthread_barrierattr_getpshared, never really existed.
378         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
379         (libpthread: GLIBC_PRIVATE): ... here.
380
381 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
382
383         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
384         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
385         path for crt[in].o.
386
387 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
388
389         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
390         mips2 on new abi.
391         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
392         Handle 64-bit longs on n64.
393
394 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
395
396         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
397         __pthread_spin_trylock): Rewritten.
398
399 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
400
401         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
402         recent kernels.
403
404 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
405
406         * sysdeps/pthread/timer_create.c (timer_create): Return correct
407         error for CPU clocks.
408
409         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
410         _POSIX_MONOTONIC_CLOCK.
411         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
412
413 2003-03-01  Roland McGrath  <roland@redhat.com>
414
415         * sysdeps/powerpc/powerpc64/pt-machine.h
416         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
417         New macros.
418         * sysdeps/powerpc/tls.h: Don't define those here.
419
420         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
421         tcbhead_t with multiple_threads member.
422         [USE_TLS] (tcbhead_t): Define minimal one-word version.
423         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
424         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
425         derive thread register offset of p_multiple_threads member.
426
427         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
428         Conditionalize p_header member on this.
429         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
430         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
431         * sysdeps/sh/tls.h: Likewise.
432         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
433         * sysdeps/sh/tcb-offsets.sym: Likewise.
434         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
435         (SINGLE_THREAD_P): Likewise.
436         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
437         (SINGLE_THREAD_P): Likewise.
438         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
439         (SINGLE_THREAD_P): Likewise.
440         * pthread.c (__pthread_initialize_manager): Likewise.
441         * manager.c (pthread_handle_create): Likewise.
442
443         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
444         related macros.
445
446 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
447
448         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
449         Conditionalize .toc section magic on this.
450
451 2003-02-21  Roland McGrath  <roland@redhat.com>
452
453         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
454         instead of __rpc_thread_destroy.
455
456 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
457
458         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
459         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
460         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
461         Fix typo.
462         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
463         to crti.o and crtn.o.
464         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
465
466 2003-02-21  Roland McGrath  <roland@redhat.com>
467
468         * Makefile (install-lib-ldscripts): New variable.
469
470 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
471
472         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
473         interprocedure branches.
474
475 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
476
477         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
478         need the target thread's lock.
479
480 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
481
482         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
483         and LOGIN_NAME_MAX.
484
485 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
486             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
487
488         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
489         * sysdeps/powerpc/tcb-offsets.sym: New file.
490         * sysdeps/powerpc/tls.h: New file.
491         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
492         (ARCH_STACK_MAX_SIZE): Define.
493         (THREAD_SELF): Define.
494         (INIT_THREAD_SELF): Define.
495         (THREAD_GETMEM): Define.
496         (THREAD_GETMEM_NC): Define.
497         (THREAD_SETMEM): Define.
498         (THREAD_SETMEM_NC): Define.
499         (__thread_self): Declare.
500         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
501         for thread register.
502
503 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
504
505         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
506         Check pthread_create existance, not __pthread_fork.
507
508 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
509
510         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
511
512 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
513
514         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
515         pthread_create existance, not __pthread_fork.
516         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
517         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
518         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
519         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
520         Likewise.
521         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
522         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
523         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
524         Add .weak pthread_create.
525         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
526         Check pthread_create existance, not __pthread_fork.
527         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
528         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
529         __fork whenever libpthread.so is loaded.
530
531 2003-02-09  Andreas Jaeger  <aj@suse.de>
532
533         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
534         Rework: %r9 is destroyed by functions so don't use it as
535         temporary, align stack correctly, fix parameter for CDISABLE.
536
537 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
538
539         * sysdeps/sh/Makefile: New file.
540         * sysdeps/sh/tcb-offsets.sym: Likewise.
541         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
542         of linuxthreads/descr.h after the definition of THREAD_SELF.
543         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
544         (TLS_TCB_SIZE): Set size of tcbhead_t.
545         (TLS_PRE_TCB_SIZE): Define.
546         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
547         a member of thread structure.
548         (THREAD_DTV): Likewise.
549         (TLS_INIT_TP_EXPENSIVE): Remove.
550         (TLS_INIT_TP): Set gbr register only.
551         (THREAD_SELF): New.
552         (INIT_THREAD_SELF): Likewise.
553         (NONTLS_INIT_TP): New.
554         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
555         Remove.
556         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
557         SYSCALL_INST_PAD macro after DO_CALL.
558         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
559         correct variable.
560         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
561         whenever libpthread.so is loaded.
562
563 2003-02-08  Andreas Schwab  <schwab@suse.de>
564
565         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
566         libpthread.so is loaded.
567
568 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
569
570         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
571         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
572         no __NR_vfork definition.
573
574 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
575
576         * tst-popen2.c: New test.
577         * Makefile (tests): Add tst-popen2.
578         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
579         whenever libpthread.so is loaded.
580         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
581         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
582         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
583         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
584         Likewise.
585         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
586         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
587         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
588
589 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
590
591         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
592         variable for non-libpthread case to the same value the
593         pthread_once function would use.
594
595 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
596
597         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
598         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
599
600 2003-02-04  Andreas Jaeger  <aj@suse.de>
601
602         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
603         multi-line strings.
604
605 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
606
607         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
608
609 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
610
611         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
612         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
613         variable.
614         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
615         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
616         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
617         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
618         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
619         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
620         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
621         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
622         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
623         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
624         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
625         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
626
627 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
628
629         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
630         Define TLS versions.
631         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
632         Likewise.
633         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
634         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
635         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
636         Define.
637         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
638         branch with 32 bit offset.
639         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
640
641 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
642
643         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
644         as required by TLS ABI.
645         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
646         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
647         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
648         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
649         Define.
650         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
651         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
652         instead of %g6 for thread pointer.
653         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
654         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
655         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
656
657 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
658
659         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
660         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
661
662 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
663
664         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
665         reference to __fork.
666
667 2003-01-17  Richard Henderson  <rth@redhat.com>
668
669         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
670         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
671         (TLS_PRE_TCB_SIZE): New.
672         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
673         new ia64-style thread pointer layout.
674         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
675         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
676         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
677         if !SHARED.
678
679 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
680
681         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
682         if USE_TLS only.
683         (NONTLS_INIT_TP): Revert last change.
684         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
685         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
686
687 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
688
689         * pthread.c (_pthread_initialize_minimal): Use
690         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
691         been already initialized.
692
693 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
694
695         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
696         if not SHARED.
697
698 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
699
700         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
701         __libc_lock_init_recursive): Initialize fields directly.
702
703 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
704
705         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
706         __fork to be far away from __vfork ifndef SHARED.
707         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
708         Likewise.
709         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
710         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
711         Add a missing instruction.
712         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
713         branch to __fork even if __NR_vfork is not defined.
714
715 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
716
717         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
718         as well.
719
720 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
721
722         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
723
724 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
725
726         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
727
728 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
729
730         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
731         unterminated string literals.
732         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
733
734 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
735
736         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
737         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
738         PSEUDO_END to PSEUDO.
739         (PSEUDO_END): Remove.
740         (SINGLE_THREAD_P): Save an instruction.
741         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
742         parameter to SINGLE_THREAD_P call.
743         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
744         Code reordering.
745
746 2003-01-10  Andreas Schwab  <schwab@suse.de>
747
748         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
749
750 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
751
752         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
753         backchain in pseudo_cancel.  Minor code improvements.
754         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
755         Likewise.
756
757 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
758
759         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
760         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
761
762 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
763
764         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
765
766 2002-01-09  Richard Henderson  <rth@redhat.com>
767
768         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
769         ret follows pseudo, and thus avoid branch-to-branch in cancel
770         case.  Use SYSCALL_ERROR_LABEL.
771
772 2003-01-11  Philip Blundell  <philb@gnu.org>
773
774         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
775         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
776         Correctly unstack lr.
777         (UNDOARGS_5): Fix ordering of pushes and pops.
778         (SINGLE_THREAD_P_PIC): New.
779         (SINGLE_THREAD_P_INT): New.
780         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
781         was stacked.
782         (PSEUDO): Use SINGLE_THREAD_P_INT.
783
784 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
785
786         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
787
788 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
789
790         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
791         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
792         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
793         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
794         INIT_THREAD_SELF): Define.
795         [HAVE_TLS_SUPPORT]: Include descr.h.
796         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
797         struct _pthread_descr_struct.
798         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
799         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
800         not __thread_self.
801         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
802         computation.
803         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
804         for TCB pointer.
805         (__pthread_initialize_manager): Rename tcb to mgr.
806         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
807         _pthread_descr) below tcbp, otherwise to tcbp.
808         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
809         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
810         before freeing.  Fix clone arguments if report_events and USE_TLS.
811         (pthread_free): Adjust th back before freeing.
812
813 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
814
815         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
816         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
817         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
818
819 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
820
821         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
822         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
823         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
824         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
825         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
826         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
827         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
828         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
829         * tst-popen.c: New test.
830         * Makefile (tests): Add tst-popen.
831
832 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
833
834         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
835         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
836
837 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
838
839         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
840         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
841
842 2003-01-06  Philip Blundell  <philb@gnu.org>
843
844         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
845
846 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
847
848         * internals.h (LIBC_CANCEL_HANDLED): Define.
849         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
850         * signals.c (LIBC_CANCEL_HANDLED): Add.
851         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
852         * tst-cancel-wrappers.sh: Remove all exceptions.
853
854         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
855
856 2003-01-05  Andreas Schwab  <schwab@suse.de>
857
858         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
859         objects.
860
861         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
862         Fix for PIC.
863         (CENABLE): Likewise.
864         (CDISABLE): Likewise.
865
866 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
867
868         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
869         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
870
871         * Makefile (libc.so-no-z-defs): Define to yes.
872
873 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
874
875         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
876         (tcbhead_t): Add multiple_threads member.
877         (TLS_INIT_TP_EXPENSIVE): Define.
878         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
879         strings.  Remove unused code.
880         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
881
882 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
883
884         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
885         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
886
887 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
888
889         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
890         even if NOT_IN_libc is defined.
891
892 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
893
894         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
895         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
896         * sysdeps/s390/Makefile: New file.
897         * sysdeps/s390/tcb-offsets.sym: New file.
898         * sysdeps/s390/tls.h: New file.
899
900 2003-01-03  Richard Henderson  <rth@redhat.com>
901
902         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
903
904 2003-01-03  Andreas Jaeger  <aj@suse.de>
905
906         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
907
908 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
909
910         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
911
912 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
913
914         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
915         cancellation tests.
916
917 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
918
919         * internals.h (struct pthread_functions): Rename
920         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
921         * pthread.c (pthread_functions): Adjust.
922         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
923         pthread_cond_*@GLIBC_2.0 compatibility symbols.
924         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
925         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
926         and pthread_cond_wait.
927
928         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
929         type.
930         (pthread_cond_t): Add __align member, shorten __padding.
931         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
932         __padding and __align too.
933
934         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
935         __builtin_expect.
936         * sysdeps/pthread/sigaction.c: New file.
937         * sysdeps/unix/sysv/linux/raise.c: New file.
938         * sysdeps/unix/sysv/linux/sigwait.c: New file.
939         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
940         weak_extern with #ifndef SHARED.
941         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
942         Likewise.
943         * signals.c (__sigaction): Renamed to...
944         (__pthread_sigaction): ... this.
945         (__sigaction): New strong alias, #ifdef SHARED only.
946         (sigaction): Protect with #ifdef SHARED.
947         (sigwait): Renamed to...
948         (__pthread_sigwait): ... this.
949         (sigwait): New strong alias, #ifdef SHARED only.
950         (raise): Renamed to...
951         (__pthread_raise): ... this.
952         (raise): New strong alias, #ifdef SHARED only.
953         * internals.h (__pthread_sigaction, __pthread_sigwait,
954         __pthread_raise): New prototypes.
955         (struct pthread_functions): Add ptr_pthread_sigaction,
956         ptr_pthread_sigwait, ptr_pthread_raise.
957         * pthread.c (pthread_functions): Renamed to...
958         (__pthread_functions): ... this.  No longer static, no longer
959         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
960         and ptr_pthread_raise.
961         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
962         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
963         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
964         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
965
966         * Makefile (tests, tests-static): Add tst-cancel-static.
967         * tst-cancel-static.c: New test.
968
969 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
970
971         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
972
973 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
974
975         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
976         * condvar.c: Add symbol versioning.  The compatibility versions
977         are the same as the change in the interface does not effect this
978         implementation.
979         * Versions [libpthread]: Add definitions for new pthread_cond_*
980         interfaces for version GLIBC_2.3.2.
981
982 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
983
984         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
985         __register_atfork.
986         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
987         for __register_atfork.
988
989 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
990
991         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
992         ASSEMBLER test macro.
993         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
994         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
995         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
996         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
997         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
998         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
999
1000         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1001         libc_hidden_def.
1002         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1003         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1004         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1005         __libc_current_sigrtmax): Likewise.
1006         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1007         __libc_internal_tsd_set, __libc_internal_tsd_address,
1008         __libc_alloca_cutoff.
1009         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1010         __libc_internal_tsd_set, __libc_internal_tsd_address.
1011
1012         * sysdeps/pthread/list.h: Remove assert.h include.
1013         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1014
1015         * sysdeps/pthread/list.h: New file.
1016         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1017         * sysdeps/unix/sysv/linux/fork.c: New file.
1018         * sysdeps/unix/sysv/linux/fork.h: New file.
1019         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1020         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1021         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1022         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1023         * sysdeps/unix/sysv/linux/Makefile: New file.
1024         * sysdeps/unix/sysv/linux/Versions: New file.
1025         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1026         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1027         use it instead of currentframe.  No longer static.
1028         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1029         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1030         (struct pthread_functions): Add ptr_pthread_fork,
1031         ptr_pthread_cleanup_upto.
1032         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1033         ptr_pthread_cleanup_upto.
1034         * ptfork.c: Include fork.h.
1035         (struct handler_list, struct handler_list_block): Remove.
1036         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1037         pthread_atfork_child): Remove.
1038         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1039         (__pthread_fork): New function.
1040         (__fork, __vfork): Call __libc_fork.
1041         * Makefile (libpthread-routines): Add old_pthread_atfork.
1042         (libpthread-nonshared): Add pthread_atfork.
1043         (others): Depend on $(objpfx)libpthread_nonshared.a.
1044         ($(objpfx)libpthread_nonshared.a): New rule.
1045         (install): Depend on $(inst_libdir)/libpthread.so.
1046         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1047         New rules.
1048         (tests): Depend on libpthread_nonshared.a too.
1049         * old_pthread_atfork.c: New file.
1050         * pthread_atfork.c: New file.
1051         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1052         too.
1053
1054 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1055
1056         * forward.c: Make all functions available by default again.  It
1057         caused too much trouble.
1058         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1059         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1060         ptr___pthread_attr_init_2_*.
1061         * pthread.c (pthread_functions): Adjust.
1062
1063 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1064
1065         * libc_pthread_init.c (__libc_pthread_init): Remove
1066         MULTIPLE_THREADS_OFFSET check.
1067         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1068         (SYSINFO_OFFSET): Remove.
1069         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1070         tcb-offsets.sym.
1071         * sysdeps/i386/tcb-offsets.sym: New file.
1072         * sysdeps/pthread/tcb-offsets.h: New file.
1073         * sysdeps/sparc/sparc32/tls.h: Removed.
1074         * sysdeps/sparc/sparc64/tls.h: Move...
1075         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1076         * sysdeps/sparc/Makefile: New file.
1077         * sysdeps/sparc/tcb-offsets.sym: New file.
1078         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1079         * sysdeps/ia64/Makefile: New file.
1080         * sysdeps/ia64/tcb-offsets.sym: New file.
1081         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1082         (MULTIPLE_THREADS_OFFSET): Remove.
1083         Replace defined MULTIPLE_THREADS_OFFSET
1084         with defined FLOATING_STACKS && USE___THREAD.
1085         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1086         (MULTIPLE_THREADS_OFFSET): Remove.
1087         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1088         (MULTIPLE_THREADS_OFFSET): Remove.
1089         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1090         (MULTIPLE_THREADS_OFFSET): Remove.
1091         * pthread.c (__pthread_initialize_manager): Remove
1092         MULTIPLE_THREADS_OFFSET cbeck.
1093
1094         * tst-cancel-wrappers.sh: Add line continuations.
1095
1096 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1097
1098         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1099         and bits/libc-lock.h.
1100         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1101         __libc_internal_tsd_address): Remove.
1102         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1103         __pthread_internal_tsd_set): New weak_externs.
1104         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1105         using __libc_maybe_call2.
1106         (__libc_tsd_key_t): Move to ...
1107         * descr.h (__libc_tsd_key_t): ...here.
1108         Remove bits/libc-tsd.h include.
1109         * sysdeps/pthread/errno-loc.c: New file.
1110         * sysdeps/pthread/herrno-loc.c: New file.
1111         * sysdeps/pthread/res-state.c: New file.
1112         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1113         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1114         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1115         of THREAD_[SG]ETMEM.
1116         * specific.c (libc_internal_tsd_set): Renamed to...
1117         __pthread_internal_tsd_set.  Remove static.
1118         (libc_internal_tsd_get): Renamed to...
1119         __pthread_internal_tsd_get.  Remove static.
1120         (libc_internal_tsd_address): Renamed to...
1121         __pthread_internal_tsd_address.  Remove static.
1122         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1123         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1124         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1125         Define.
1126         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1127         __pthread_internal_tsd_address): New prototypes.
1128         (struct pthread_functions): Add
1129         ptr_pthread_internal_tsd_([sg]et|address) fields.
1130         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1131         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1132         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1133         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1134         * alloca_cutoff.c: New file.
1135         * no-tsd.c: Removed.
1136         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1137         * pt-system.c (system): Remove cancellation handling.
1138         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1139         cancellation routines.
1140
1141         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1142         (tcbhead_t): Add sysinfo field.
1143         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1144         (TLS_INIT_TP): Use INIT_SYSINFO.
1145         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1146         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1147         (MULTIPLE_THREADS_OFFSET): Adjust.
1148         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1149         (MULTIPLE_THREADS_OFFSET): Likewise.
1150         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1151         (MULTIPLE_THREADS_OFFSET): Likewise.
1152         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1153         (MULTIPLE_THREADS_OFFSET): Likewise.
1154         * descr.h: Include stdint.h.
1155         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1156
1157 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1158
1159         * libc_pthread_init.c: Include stdlib.h.
1160         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1161         (TLS_INIT_TP_EXPENSIVE): Define.
1162         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1163         __libc_maybe_call2): In _LIBC check SHARED define.
1164         * sysdeps/ia64/tls.h: New file.
1165         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1166         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1167         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1168         * sysdeps/sparc/sparc32/tls.h: New file.
1169         * sysdeps/sparc/sparc64/tls.h: New file.
1170         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1171         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1172         * Makefile (tests): Add tst-cancel[1-6].
1173         (tests-reverse): Add tst-cancel5.
1174         Link libc.so before libpthread.so for tests-reverse.
1175         * tst-cancel1.c: New file.
1176         * tst-cancel2.c: New file.
1177         * tst-cancel3.c: New file.
1178         * tst-cancel4.c: New file.
1179         * tst-cancel5.c: New file.
1180         * tst-cancel6.c: New file.
1181
1182 2002-12-27  Andreas Schwab  <schwab@suse.de>
1183
1184         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1185
1186 2002-12-22  Roland McGrath  <roland@redhat.com>
1187
1188         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1189
1190 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1191
1192         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1193         Reported by Art Hass <ahaas@airmail.net>.
1194
1195 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1196
1197         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1198         Use return 0 as 6th argument to FORWARD4.
1199
1200 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1201
1202         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1203         define if __ASSUME_LDT_WORKS > 0.
1204         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1205         struct member access if !FLOATING_STACKS.
1206         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1207
1208 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1209
1210         * internals.h (__pthread_thread_self): New prototype.
1211         (struct pthread_functions): Add ptr_pthread_thread_self field.
1212         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1213         (__pthread_thread_self): New function.
1214         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1215         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1216         use thread_self() directly if not FLOATING_STACKS.
1217
1218 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1219
1220         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1221         with #ifndef __ASSEMBLER__.
1222         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1223         pthread_attr_init_2_0 use.
1224
1225 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1226
1227         * wrapsyscall.c: Removed.
1228         * weaks.c: Removed.
1229         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1230         (routines): Remove weaks.  Add forward,
1231         libc_pthread_init, libc-cancellation.
1232         (shared-only-routines): Remove weaks.  Add forward.
1233         (libpthread-routines): Remove wrapsyscall.
1234         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1235         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1236         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1237         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1238         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1239         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1240         (libpthread-shared-only-routines): Add pt-allocrtsig.
1241         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1242         ($(objpfx)tst-cancel-wrappers.out): New rule.
1243         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1244         if in libc.
1245         (__libc_maybe_call): In libpthread.* don't check for existance
1246         of the function.
1247         (__libc_maybe_call2): Define.
1248         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1249         __libc_lock_trylock, __libc_lock_unlock): Use it.
1250         * sysdeps/pthread/flockfile.c: New file.
1251         * sysdeps/pthread/ftrylockfile.c: New file.
1252         * sysdeps/pthread/funlockfile.c: New file.
1253         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1254         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1255         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1256         * libc-cancellation.c: New file.
1257         * forward.c: New file.
1258         * libc_pthread_init.c: New file.
1259         * pt-system.c: New file.
1260         * pthread.c: Remove locale.h.
1261         (__pthread_manager_thread): Initialize multiple_threads.
1262         (__pthread_multiple_threads): Declare.
1263         (pthread_functions): New variable.
1264         (__pthread_initialize_minimal): Remove __uselocale call.
1265         Call __libc_pthread_init.
1266         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1267         initial thread's multiple_threads and __libc_multiple_threads.
1268         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1269         multiple_threads.
1270         (pthread_setschedparam, pthread_getschedparam): Rename to __
1271         prefixed variants.  Add strong_alias.
1272         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1273         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1274         (init_rtsigs): Use __libc_current_sigrtmin_private.
1275         (pthread_initialize): Only call init_rtsigs if
1276         !__ASSUME_REALTIME_SIGNALS.
1277         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1278         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1279         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1280         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1281         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1282         __pthread_attr_getinheritsched, __pthread_attr_setscope,
1283         __pthread_attr_getscope, __pthread_cond_init,
1284         __pthread_cond_destroy, __pthread_cond_wait,
1285         __pthread_cond_signal, __pthread_cond_broadcast,
1286         __pthread_condattr_init, __pthread_condattr_destroy,
1287         __pthread_equal, __pthread_getschedparam,
1288         __pthread_setschedparam, __pthread_setcancelstate,
1289         __pthread_setcanceltype, __pthread_enable_asynccancel,
1290         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1291         (__pthread_mutex_init, __pthread_mutex_destroy,
1292         __pthread_mutex_lock, __pthread_mutex_unlock,
1293         __pthread_mutex_trylock): Likewise.
1294         Add hidden_proto.
1295         (struct pthread_functions): New type.
1296         (__libc_pthread_functions): New variable.
1297         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1298         * descr.h (struct _pthread_descr_struct): Add
1299         p_header.data.multiple_threads field.
1300         * manager.c (pthread_handle_create): Initialize multiple_threads.
1301         * cancel.c (__pthread_enable_asynccancel,
1302         __pthread_disable_asynccancel): New functions.
1303         (__pthread_provide_wrappers): Remove.
1304         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1305         prefixed variants.  Add strong_alias.
1306         * condvar.c (pthread_cond_init, pthread_cond_destroy,
1307         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1308         pthread_condattr_init, pthread_condattr_destroy): Likewise.
1309         * join.c (pthread_exit): Likewise.
1310         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1311         pthread_attr_getdetachstate, pthread_attr_setschedparam,
1312         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1313         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1314         pthread_attr_getinheritsched, pthread_attr_setscope,
1315         pthread_attr_getscope): Likewise.
1316         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1317         __pthread_mutex_lock, __pthread_mutex_unlock,
1318         __pthread_mutex_trylock): Add hidden_def.
1319         * Versions (libc): Add __libc_pthread_init,
1320         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1321         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1322         * lockfile.c: Remove some USE_IN_LIBIO guards.
1323         (__pthread_provide_lockfile): Remove.
1324         * pt-allocrtsig.c: New file.
1325         * tst-cancel-wrappers.sh: New test.
1326
1327 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
1328
1329         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1330         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1331         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
1332         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
1333
1334 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
1335
1336         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1337         weak.  There is no reason for that.
1338         (CANCELABLE_SYSCALL_VA): Likewise.
1339
1340 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
1341
1342         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
1343         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
1344         * Versions: Export creat, poll, pselect, readv, select, sigpause,
1345         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
1346         libpthread in version GLIBC_2.3.2.
1347
1348 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
1349
1350         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1351
1352 2002-12-05  Roland McGrath  <roland@redhat.com>
1353
1354         * pthread.c (__pthread_initialize_minimal)
1355         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
1356         TCB if the dynamic linker didn't do it at startup.
1357
1358         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1359         string.
1360         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
1361         Submacros updated.
1362         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1363         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
1364
1365 2002-12-03  Roland McGrath  <roland@redhat.com>
1366
1367         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
1368         from dynamic linker internal cell to new libc cell.
1369
1370 2002-11-28  Roland McGrath  <roland@redhat.com>
1371
1372         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
1373         before other headers, so FLOATING_STACKS is not defined wrongly.
1374
1375         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
1376         even if [! FLOATING_STACKS].
1377         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
1378         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
1379         dl_osversion >= 2.3.99 and fatal if not.
1380         (TLS_DO_MODIFY_LDT): Use it.
1381
1382 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
1383
1384         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1385         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
1386         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1387
1388 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
1389
1390         * Versions (libc: GLIBC_2.0): Remove names of functions which are
1391         not defined in libc.
1392         * Makefile (shared-only-routines): Add weaks.
1393         * weaks.c: Remove functions which are not exported from libc.so.
1394
1395 2002-11-14  Roland McGrath  <roland@redhat.com>
1396
1397         * libc-tsd.c: New file.
1398         * Makefile (distribute): Add it.
1399         (libc-link.so): New variable.
1400         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
1401         (libc-ok-for-link): New variable.
1402         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
1403         libc-ok-for-link to $(use-thread).
1404         [$(libc-ok-for-link) = no]
1405         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
1406         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
1407         New targets.
1408         (generated): Append them.
1409         (extra-objs): Append libc-tsd.os.
1410
1411         * libc-tls-loc.c: New file.
1412         * Makefile (libpthread-routines): Add it.
1413
1414 2002-11-14  Andreas Schwab  <schwab@suse.de>
1415
1416         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
1417         string.
1418
1419 2002-11-13  Roland McGrath  <roland@redhat.com>
1420
1421         * Examples/ex6.c (main): Improve error reporting.
1422
1423 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
1424
1425         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
1426         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
1427
1428         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
1429         register number.
1430         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
1431
1432 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
1433
1434         * manager.c (pthread_start_thread): Call __uselocale even
1435         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
1436
1437 2002-10-17  Roland McGrath  <roland@redhat.com>
1438
1439         * Makefile (unload): Don't link in libpthread.so.
1440         ($(objpfx)unload.out): Do depend on it.
1441         * unload.c (main): Improve error reporting.
1442
1443 2002-10-09  Roland McGrath  <roland@redhat.com>
1444
1445         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
1446         Under [__PIC__], call the function via the pointer fetched for
1447         comparison rather than a call by name that uses the PLT.
1448         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
1449         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
1450         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
1451         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
1452         (__libc_key_create, __libc_getspecific, __libc_setspecific)
1453         (__libc_atfork): Use it.
1454
1455         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
1456         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
1457         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
1458         (ld: GLIBC_PRIVATE): Set removed.
1459
1460 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
1461
1462         * sysdeps/unix/sysv/linux/execve.c: New file.
1463
1464 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
1465
1466         * no-tsd.c: Include stdlib.h.
1467
1468 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
1469
1470         * sysdeps/unix/sysv/linux/allocalim.h: New file.
1471         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
1472         field.
1473         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
1474         Pass stack size to caller.
1475         (pthread_handle_create): Set p_alloca_cutoff.
1476         * pthread.c (__pthread_initial_thread): Use C99 designated
1477         initializers.  Set p_alloca_cutoff.
1478         (__pthread_manager_thread): Likewise.
1479         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
1480         for initial thread.
1481         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
1482         for initial thread.
1483         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
1484         for manager thread.
1485         * specific.c (__libc_alloca_cutoff): New function.
1486         * no-tsd.c (__libc_alloca_cutoff): New function.
1487         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
1488         and libpthread.
1489
1490 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1491
1492         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
1493         * sysdeps/sh/tls.h: Likewise.
1494         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1495
1496 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
1497
1498         * sysdeps/pthread/tst-timer.c (main): Clear
1499         SIGEV2.sigev_notify_attributes.
1500
1501 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
1502
1503         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
1504         INLINE_SYSCALL for set_thread_area syscall.
1505
1506 2002-09-28  Roland McGrath  <roland@redhat.com>
1507
1508         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
1509         Don't call setrlimit, since we did no prior bogon we need to undo.
1510
1511 2002-09-27  Roland McGrath  <roland@redhat.com>
1512
1513         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
1514
1515 2002-09-24  Roland McGrath  <roland@redhat.com>
1516
1517         * sysdeps/x86_64/tls.h: New file.
1518
1519 2002-09-23  Roland McGrath  <roland@redhat.com>
1520
1521         * Examples/ex13.c (dump_mut): int -> size_t for counter.
1522
1523 2002-09-18  Bruno Haible  <bruno@clisp.org>
1524
1525         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
1526         an unexpected error code.
1527
1528         * internals.h (__pthread_message): Add const to first parameter type.
1529         * pthread.c (__pthread_message): Likewise.
1530
1531         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
1532
1533 2002-09-17  Roland McGrath  <roland@redhat.com>
1534
1535         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
1536         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
1537         offset (positive or negative) relative to the thread struct.
1538         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
1539
1540 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
1541
1542         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
1543         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
1544         Replace /usr/lib/crt[in].o with crt[in].o too.
1545
1546 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
1547
1548         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
1549
1550 2002-09-04  Bruno Haible  <bruno@clisp.org>
1551
1552         * pthread.c: Include <sys/time.h>.
1553         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
1554         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
1555         * Makefile (distribute): Add smp.h to the list.
1556
1557 2002-09-04  Bruno Haible  <bruno@clisp.org>
1558
1559         * sysdeps/alpha/pt-machine.h: Choose different include file location
1560         on non-Linux platforms.
1561
1562         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
1563         (open, open64): Change va_arg argument type to the integral type to
1564         which mode_t promotes.
1565
1566         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
1567         the structure of 'struct sigevent'.
1568
1569         * errno.c (__errno_location, __h_errno_location, __res_state):
1570         Use prototype function definitions.
1571
1572 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
1573
1574         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
1575         * sysdeps/powerpc/pt-machine.h: moved to...
1576         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
1577         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
1578
1579 2002-09-02  Roland McGrath  <roland@redhat.com>
1580
1581         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
1582
1583 2002-09-01  Roland McGrath  <roland@redhat.com>
1584
1585         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
1586         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
1587
1588         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
1589         (__libc_internal_tsd_address): Declare it.
1590         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
1591         __libc_internal_tsd_address.
1592         * specific.c (libc_internal_tsd_address): New function.
1593         (__libc_internal_tsd_address): New variable.
1594         * no-tsd.c (__libc_internal_tsd_address): New variable.
1595
1596 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
1597
1598         * Makefile: Don't use rule for crt%.o, spell it out as rules for
1599         crti.o and crtn.o.
1600
1601 2002-08-30  Roland McGrath  <roland@redhat.com>
1602
1603         * Makefile (extra-objs, omit-deps): Add crtn.
1604         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
1605         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
1606         ($(objpfx)crtn.S): New target.
1607         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
1608         (generated): Add crtn.S.
1609
1610         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
1611         crtn.o pathname too.
1612
1613 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
1614
1615         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
1616         if [! SHARED].
1617
1618 2002-08-30  Roland McGrath  <roland@redhat.com>
1619
1620         * tst-static-locale.c: New file.
1621         * Makefile (tests, tests-static): Add it.
1622
1623 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
1624
1625         * spinlock.c (__pthread_lock): Fix spurious wakeup
1626         handling.  Don't clear lowest bit of list pointer as sign the thread
1627         is still on the wait list.  Don't restart after spurious wakeup
1628         with spinning to get the lock.
1629         (__pthread_unlock): Take set lowest bit into account when handling
1630         pointer to list elements.
1631         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
1632
1633 2002-08-28  Roland McGrath  <roland@redhat.com>
1634
1635         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
1636
1637 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
1638
1639         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
1640         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1641         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1642
1643 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
1644
1645         * sysdeps/pthread/timer_routines.c (thread_func): Change return
1646         type to void and add casts in use to avoid warnings with all gcc
1647         versions.
1648
1649 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
1650
1651         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
1652         Bump to 16384.
1653         * manager.c (__pthread_handles): Remove.
1654         * pthandles.c: New file.
1655         * pthread.c (__pthread_initialize_minimal): Initialize
1656         __pthread_handles[0] and __pthread_handles[1].
1657         * Makefile (libpthread-routines): Add pthandles (must be last).
1658
1659 2002-08-26  Brian Youmans  <3diff@gnu.org>
1660
1661         * Examples/ex10.c: Corrected version number in Lesser GPL copying
1662         permission notice from 2 to 2.1.
1663         * Examples/ex11.c: Likewise.
1664         * Examples/ex13.c: Likewise.
1665         * Examples/ex8.c: Likewise.
1666         * Examples/ex9.c: Likewise.
1667         * barrier.c: Likewise.
1668         * events.c: Likewise.
1669         * lockfile.c: Likewise.
1670         * no-tsd.c: Likewise.
1671         * pt-machine.c: Likewise.
1672         * ptclock_gettime.c: Likewise.
1673         * ptclock_settime.c: Likewise.
1674         * rwlock.c: Likewise.
1675         * sysdeps/alpha/pspinlock.c: Likewise.
1676         * sysdeps/alpha/pt-machine.h: Likewise.
1677         * sysdeps/arm/pspinlock.c: Likewise.
1678         * sysdeps/arm/pt-machine.h: Likewise.
1679         * sysdeps/cris/pspinlock.c: Likewise.
1680         * sysdeps/cris/pt-machine.h: Likewise.
1681         * sysdeps/hppa/pspinlock.c: Likewise.
1682         * sysdeps/hppa/pt-machine.h: Likewise.
1683         * sysdeps/i386/i686/pt-machine.h: Likewise.
1684         * sysdeps/i386/pspinlock.c: Likewise.
1685         * sysdeps/i386/pt-machine.h: Likewise.
1686         * sysdeps/i386/useldt.h: Likewise.
1687         * sysdeps/ia64/pspinlock.c: Likewise.
1688         * sysdeps/ia64/pt-machine.h: Likewise.
1689         * sysdeps/m68k/pspinlock.c: Likewise.
1690         * sysdeps/m68k/pt-machine.h: Likewise.
1691         * sysdeps/mips/pspinlock.c: Likewise.
1692         * sysdeps/mips/pt-machine.h: Likewise.
1693         * sysdeps/powerpc/pspinlock.c: Likewise.
1694         * sysdeps/powerpc/pt-machine.h: Likewise.
1695         * sysdeps/pthread/bits/initspin.h: Likewise.
1696         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1697         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1698         * sysdeps/pthread/getcpuclockid.c: Likewise.
1699         * sysdeps/pthread/posix-timer.h: Likewise.
1700         * sysdeps/pthread/timer_create.c: Likewise.
1701         * sysdeps/pthread/timer_delete.c: Likewise.
1702         * sysdeps/pthread/timer_getoverr.c: Likewise.
1703         * sysdeps/pthread/timer_gettime.c: Likewise.
1704         * sysdeps/pthread/timer_routines.c: Likewise.
1705         * sysdeps/pthread/timer_settime.c: Likewise.
1706         * sysdeps/pthread/tst-timer.c: Likewise.
1707         * sysdeps/s390/pspinlock.c: Likewise.
1708         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1709         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1710         * sysdeps/sh/pspinlock.c: Likewise.
1711         * sysdeps/sh/pt-machine.h: Likewise.
1712         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1713         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1714         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1715         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1716         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1717         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1718         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1719         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1720         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1721         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1722         * tststack.c: Likewise.
1723         * unload.c: Likewise.
1724         * weaks.c: Likewise.
1725         * wrapsyscall.c: Likewise.
1726
1727         * sysdeps/pthread/pt-initfini.c: Changed copying
1728         permission notice to Lesser GPL from Library GPL, including the
1729         references in the special exception.
1730         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
1731         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
1732         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
1733         Likewise.
1734         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1735         Likewise.
1736         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1737
1738 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
1739
1740         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
1741         overflow [PR libc/4244].
1742
1743 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
1744
1745         * sysdeps/pthread/timer_routines.c (thread_func): Make the
1746         compiler happy by adding a return statement which will never be
1747         reached.
1748
1749         * tst-context.c (main): Cast to long before casting to pointer.
1750
1751         * Examples/ex17.c (main): Use correct format string.
1752
1753         * Examples/ex9.c (thread): Remove incorrect return statement.
1754
1755 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
1756
1757         * pthread.c (__linuxthreads_version): New global constant.
1758
1759 2002-08-23  Andreas Jaeger  <aj@suse.de>
1760
1761         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1762         as thread specific register.
1763         (testandset): Fix inline asm.
1764         (THREAD_GETMEM): Fix inline asm.
1765
1766 2002-08-22  Roland McGrath  <roland@redhat.com>
1767
1768         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1769         conditional.
1770         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1771         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1772         macro.  That chooses whether to reuse %gs value or let kernel set it.
1773         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1774         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1775         not constant 0.
1776
1777 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
1778
1779         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1780         also to the third definition of this macro.
1781
1782 2002-06-17  Andreas Jaeger  <aj@suse.de>
1783
1784         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1785         Set it.
1786
1787 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
1788
1789         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1790         loading/reading segment registers.  Some old hardware doesn't
1791         handle the 32-bit instructions as expected.
1792         * sysdeps/i386/tls.h: Likewise.
1793
1794         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1795         renamed to secondcall and use is negated.
1796         (TLS_SETUP_GS_SEGMENT): Likewise.
1797         (TLS_INIT_TP): Likewise.
1798         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1799         secondcall.
1800
1801         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1802         registers.  No need to mask upper 16 bits in this case.
1803         * sysdeps/i386/useldt.h: Likewise.
1804         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1805         is the same since the GDT content changed.
1806
1807         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1808         to TLS_SETUP_GS_SEGMENT.
1809         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1810         TLS_DO_SET_THREAD_AREA.
1811         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1812         entry number from %gs value.
1813         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1814         ignore it.
1815
1816         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1817         Pass true to _dl_deallocate_tls.
1818         (pthread_free): Likewise.
1819         * pthread.c (__pthread_initialize_manager): Likewise.
1820
1821 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
1822
1823         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1824         computing index from %gs value.
1825
1826 2002-08-16  Roland McGrath  <roland@redhat.com>
1827
1828         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1829         register value from entry number properly.
1830
1831         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1832         optimally conditional on [__PIC__].
1833         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1834         without touching errno, and use latest modify_ldt-like interface.
1835         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1836         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1837         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1838         existing %gs value as the segment to set.
1839         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
1840         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1841         by the first thread's early TLS setup.
1842
1843 2002-08-15  Roland McGrath  <roland@redhat.com>
1844
1845         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1846         return a value as callers now expect.
1847
1848 2002-08-11  Roland McGrath  <roland@redhat.com>
1849
1850         * pthread.c (__pthread_initialize_manager): Initialize
1851         p_header.data.tcb field of manager thread's descriptor.
1852         (__pthread_initialize_minimal): Don't initialize p_header.data.self
1853         field, already done by TLS_INIT_TP.
1854
1855         * manager.c (pthread_handle_create): Move p_header field initializers
1856         together.
1857
1858 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
1859
1860         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1861
1862 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
1863
1864         * pthread.c (__linuxthreads_initial_report_events): New variable.
1865         (__pthread_initialize_manager): Use it to initialize p_report_events
1866         of initial thread.
1867         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1868
1869 2002-08-07  Roland McGrath  <roland@redhat.com>
1870
1871         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1872         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1873
1874 2002-08-02  Roland McGrath  <roland@redhat.com>
1875
1876         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1877         Add _LIBC_TSD_KEY_LOCALE.
1878         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1879         Call __uselocale to initialize our per-thread locale pointer to
1880         the global one.
1881         * pthread.c (__pthread_initialize_minimal): Likewise.
1882
1883         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1884
1885 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
1886
1887         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1888         internally.
1889
1890         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1891         Don't use p_libc_specific element in thread descriptor.
1892
1893 2002-07-30  Roland McGrath  <roland@redhat.com>
1894
1895         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1896         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1897         which does the right thing when __thread support is available.
1898         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1899         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1900         `p_h_errno', `p_resp', and `p_res' members.
1901         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1902         Don't initialize `p_errnop' and `p_h_errnop' members.
1903         (__pthread_reset_main_thread): Likewise.
1904         (__pthread_initialize_manager): Likewise.
1905         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1906         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1907         Don't initialize `p_resp' member.
1908         (__pthread_reset_main_thread): Likewise.
1909         * manager.c (pthread_handle_create): Likewise.
1910         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1911         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1912         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1913         * errno.c [USE_TLS && HAVE___THREAD]
1914         (__h_errno_location, __res_state): Don't define these at all.
1915
1916         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1917         (INSTALL_NEW_DTV, GET_DTV): Likewise.
1918         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1919
1920         * weaks.c: Don't include <errno.h> here.
1921
1922 2002-08-01  Roland McGrath  <roland@redhat.com>
1923
1924         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1925         TLS_INIT_TP.
1926         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1927         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1928         (TLS_INIT_TP): Use that.
1929
1930 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
1931
1932         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1933         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1934         (FREE_THREAD): Avoid modify_ldt if using GDT.
1935         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1936
1937 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
1938
1939         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1940         * sysdeps/i386/pt-machine.h: Likewise.
1941         * sysdeps/i386/useldt.h: Likewise.
1942
1943 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
1944
1945         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1946         call __libc_setup_tls first.
1947         * Makefile: Actually create tst-signal.out file when running the test.
1948         (tests): Add tststatic.
1949         * Examples/tststatic.c: New file.
1950
1951 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
1952
1953         * errno.c (__errno_location): Don't define unless !USE_TLS
1954         || !HAVE___THREAD.
1955         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1956         * sysdeps/i386/tls.h: Likewise.
1957         * sysdeps/i386/useldt.h: Likewise.
1958         * sysdeps/i386/i686/pt-machine.h: Likewise.
1959
1960 2002-07-02  H.J. Lu  <hjl@gnu.org>
1961
1962         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
1963         use ll/sc.
1964         * sysdeps/mips/pt-machine.h: Likewise.
1965
1966 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
1967
1968         * manager.c (pthread_handle_create): Initialize self-reference in
1969         descriptor.
1970
1971 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
1972
1973         * Examples/ex9.c (main): Remove unused th variable.
1974
1975 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
1976
1977         * wrapsyscall.c: Add __nanosleep alias.
1978         * Versions (GLIBC_2.2.6): Add __nanosleep.
1979         * bug-sleep.c: New file.
1980         * Makefile (tests): Add bug-sleep.
1981
1982 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
1983
1984         * Examples/ex9.c (main):  Use list of children and join them.
1985         (thread): Do not call exit.
1986
1987 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
1988
1989         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1990         Unconditionally use the code using spinlock.  Use __pthread_release
1991         to free a spinlock.
1992         (wait_node_free): Likewise.
1993         (__pthread_acquire, __pthread_release): Unconditionally define.
1994
1995 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
1996
1997         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1998
1999 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2000
2001         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2002
2003 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2004
2005         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2006         parameter.
2007         (pthread_cancel): Likewise.
2008         * internals.h (__pthread_create_2_1): Likewise.
2009         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2010
2011 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2012
2013         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2014         Patch by Glen Nakamura <gen@flex.com>.
2015
2016 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2017
2018         * signals.c: Move sighandler functions to...
2019         * sighandler.c: ...here.  New file.
2020         * signals.c: Move signal handler related type definitions to...
2021         * internals.h: ...here.  Add prototypes for signal handlers.
2022         * Makefile (libpthread-routines): Add sighandler.
2023         (CFLAGS-sighandler.c): Add $(exceptions).
2024
2025 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2026
2027         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2028
2029 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2030
2031         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2032         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2033         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2034         based on previous one and not on current time.  Count overruns.
2035         Patch by Eric F. Sorton <eric@cctcorp.com>.
2036
2037         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2038
2039 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2040
2041         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2042         if it isn't defined yet.
2043         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2044         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2045         Likewise.
2046         * sysdeps/sh/tls.h: New file.
2047
2048 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2049
2050         * manager.c (__pthread_manager_event): Use self instead of arg
2051         for INIT_THREAD_SELF.
2052         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2053         _pthread_descr_struct) instead of sizeof (*descr).
2054
2055 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2056
2057         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2058         * sysdeps/alpha/pt-machine.h: Likewise.
2059         * sysdeps/arm/pt-machine.h: Likewise.
2060         * sysdeps/cris/pt-machine.h: Likewise.
2061         * sysdeps/hppa/pt-machine.h: Likewise.
2062         * sysdeps/m68k/pt-machine.h: Likewise.
2063         * sysdeps/mips/pt-machine.h: Likewise.
2064         * sysdeps/powerpc/pt-machine.h: Likewise.
2065         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2066         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2067         * sysdeps/sh/pt-machine.h: Likewise.
2068         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2069         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2070         * sysdeps/x86_64/pt-machine.h: Likewise.
2071
2072 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2073
2074         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2075         instead of pthread_mutexattr_setkind_np.
2076         (pthread_mutexattr_gettype): Similarly.
2077         * man/pthread_mutexattr_setkind_np.man: New.
2078         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2079
2080 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2081
2082         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2083
2084 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2085
2086         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2087
2088 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2089
2090         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2091
2092 2002-03-17  Andreas Jaeger  <aj@suse.de>
2093
2094         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2095         prototpyes.
2096         * sysdeps/alpha/pt-machine.h: Likewise.
2097         * sysdeps/arm/pt-machine.h: Likewise.
2098         * sysdeps/cris/pt-machine.h: Likewise.
2099         * sysdeps/hppa/pt-machine.h: Likewise.
2100         * sysdeps/i386/i686/pt-machine.h: Likewise.
2101         * sysdeps/ia64/pt-machine.h: Likewise.
2102         * sysdeps/m68k/pt-machine.h: Likewise.
2103         * sysdeps/mips/pt-machine.h: Likewise.
2104         * sysdeps/powerpc/pt-machine.h: Likewise.
2105         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2106         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2107         * sysdeps/sh/pt-machine.h: Likewise.
2108         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2109         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2110         * sysdeps/x86_64/pt-machine.h: Likewise.
2111
2112         * internals.h: Move testandset and __compare_and_swap prototypes
2113         to pt-machine.h.
2114
2115 2002-03-03  Andreas Jaeger  <aj@suse.de>
2116
2117         * errno.c: Include resolv.h to avoid warning.
2118
2119 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2120
2121         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2122         stack limit.
2123
2124 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2125
2126         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2127         into account if USE_TLS.
2128         * manager.c (pthread_handle_create): Free TLS data structures if call
2129         failed.  Pass correct stack to clone if USE_TLS.
2130         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2131         * sysdeps/i386/i686/pt-machine.h: Likewise.
2132         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2133
2134         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2135         Add p_stackaddr element #if USE_TLS.
2136         * internals.c: Include <tls.h>.
2137         * manager.c: Integrate creating and handling of thread descriptor
2138         for TLS.
2139         * pthread.c: Likewise.
2140         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2141         Include <linuxthreads/descr.h> only if TLS is really used.
2142         (GET_DTV): New macro.
2143         (TLS_INIT_TP): Initialize self pointer.
2144
2145 2002-02-17  Andreas Schwab  <schwab@suse.de>
2146
2147         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2148         not NULL.
2149
2150 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2151
2152         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2153         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2154
2155 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2156
2157         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2158
2159 2002-02-08  Richard Henderson  <rth@redhat.com>
2160
2161         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2162
2163 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2164
2165         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2166         after all.
2167
2168 2002-02-07  H.J. Lu  <hjl@gnu.org>
2169
2170         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2171         gcc warning.
2172         (__pthread_spin_lock): Remove ".set noreorder".
2173         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2174
2175 2002-02-05  H.J. Lu  <hjl@gnu.org>
2176
2177         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2178         branch likely.
2179         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2180         (__compare_and_swap): Likewise.
2181
2182 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2183
2184         * internals.h: Move declarations/definitions of
2185         __pthread_initial_thread_bos, __pthread_initial_thread,
2186         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2187         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2188         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2189         * descr.h: ...here.
2190         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2191         Define THREAD_GETMEM accordingly.
2192
2193 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2194
2195         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2196
2197         * sysdeps/i386/tls.h: Define THREAD_DTV.
2198
2199 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2200
2201         * internals.h: Move thread descriptor definition...
2202         * descr.h.: ...here.  New file.
2203         * sysdeps/i386/tls.h: New file.
2204
2205 2002-02-01  H.J. Lu  <hjl@gnu.org>
2206
2207         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2208         different register in the delayed slot.  Use branch likely.
2209
2210         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2211         (__compare_and_swap): Return 0 only when failed to compare. Use
2212         branch likely.
2213
2214 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2215
2216         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2217         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2218         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2219         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2220         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2221         * sysdeps/sparc/sparc64/Versions: New file.
2222         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2223
2224 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2225
2226         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2227         in SHARED code, use GL(dl_cpuclock_offset).
2228
2229 2002-01-28  Andreas Jaeger  <aj@suse.de>
2230
2231         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2232         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2233
2234 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2235
2236         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2237         (CURRENT_STACK_FRAME): Remove duplicate definition.
2238         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2239
2240 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2241
2242         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2243         automatic inline.
2244
2245 2002-01-12  Andreas Schwab  <schwab@suse.de>
2246
2247         * Makefile (test-srcs): Add tst-signal.
2248         (tests): Run tst-signal.
2249         (distribute): Add tst-signal.sh.
2250         * tst-signal.c, tst-signal.sh: New files.
2251
2252 2002-01-14  Andreas Jaeger  <aj@suse.de>
2253
2254         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2255
2256 2002-01-11  Andreas Schwab  <schwab@suse.de>
2257
2258         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2259         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2260
2261 2002-01-06  Richard Henderson  <rth@redhat.com>
2262
2263         * sysdeps/alpha/elf/pt-initfini.c: New file.
2264
2265 2001-12-29  Andreas Jaeger  <aj@suse.de>
2266
2267         * Examples/ex9.c: Add noreturn attribute for thread.
2268         * Examples/ex10.c: Likewise.
2269         * Examples/ex13.c (thread_start): Likewise.
2270         * Examples/ex15.c (worker): Likewise.
2271
2272         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2273
2274 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
2275
2276         * man/pthread_atfork.man: Adjust description of mutex handling
2277         after fork for current implementation.
2278         * linuxthreads.texi: Likewise [PR libc/2519].
2279
2280 2001-12-13  Andreas Schwab  <schwab@suse.de>
2281
2282         * specific.c (pthread_key_delete): Don't contact the thread
2283         manager if no threads have been created yet.
2284
2285 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
2286
2287         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2288         qualifier to be safe.
2289
2290 2001-11-30  Andreas Schwab  <schwab@suse.de>
2291
2292         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2293         that self is the manager thread, and initialize the thread
2294         register if not.
2295         (thread_self_stack) [THREAD_SELF]: New function to find self via
2296         stack pointer.
2297         * manager.c (pthread_handle_create): Don't block cancel signal any
2298         more.
2299
2300 2001-11-29  Andreas Jaeger  <aj@suse.de>
2301
2302         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2303         (THREAD_SELF): New.
2304         (INIT_THREAD_SELF): New.
2305         (THREAD_GETMEM): New.
2306         (THREAD_GETMEM_NC):
2307         (THREAD_SETMEM): New.
2308         (THREAD_SETMEM_NC): New.
2309         (FLOATING_STACKS): Define.
2310         (ARCH_STACK_MAX_SIZE): Define.
2311
2312 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
2313
2314         Bugfix to pthread_key_delete. It was iterating over the thread
2315         manager's linked list of threads, behind the thread manager's
2316         back causing a race. The fix is to have the manager iterate over
2317         the threads instead, using a new request type for doing so.
2318         * internals.h (struct pthread_request): New manager request type
2319         REQ_FOR_EACH_THREAD.
2320         * manager.c (pthread_for_each_thread): New function.
2321         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2322         * specific.c (struct pthread_key_delete_helper_args): New type.
2323         (pthread_key_delete_helper): New static function.
2324         (pthread_key_delete): Use the new thread manager
2325         REQ_FOR_EACH_THREAD function to iterate over the threads and set
2326         the delete key slot to a null value in each thread.
2327         * Examples/ex18.c: New test.
2328         * Makefile (tests): Add ex18.
2329
2330 2001-11-22  Wolfram Gloger  <wg@malloc.de>
2331
2332         * pthread.c (pthread_onexit_process): Don't call free
2333         after threads have been asynchronously terminated.
2334
2335         * manager.c (pthread_handle_exit): Surround cancellation
2336         of threads with __flockfilelist()/__funlockfilelist().
2337
2338 2001-11-26  Andreas Schwab  <schwab@suse.de>
2339
2340         * manager.c (pthread_handle_create): Start the child thread with
2341         the cancel signal blocked, so that it does not handle it before
2342         the thread register is set up.  Save errno from failed clone call.
2343
2344 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
2345
2346         * sysdeps/i386/i686/Implies: Removed.
2347         * sysdeps/i386/i686/Versions: New file.
2348
2349 2001-10-31  Andreas Jaeger  <aj@suse.de>
2350
2351         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2352
2353 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
2354
2355         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
2356         to __linuxthreads_pthread_sizeof_descr to match name used by
2357         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
2358         linuxthreads_db/td_symbol_list.c.
2359
2360 2001-09-22  Andreas Jaeger  <aj@suse.de>
2361
2362         * linuxthreads/tst-context.c: Avoid compile warning.
2363
2364 2001-09-20  Andreas Jaeger  <aj@suse.de>
2365
2366         * shlib-versions: Add x86-64.
2367
2368 2001-09-19  Andreas Jaeger  <aj@suse.de>
2369
2370         * sysdeps/x86_64/Makefile: New file.
2371         * sysdeps/x86_64/pspinlock.c: New file.
2372         * sysdeps/x86_64/pt-machine.h: New file.
2373
2374 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
2375
2376         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
2377         for SIGEV_NONE.
2378         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2379
2380 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
2381             Wolfram Gloger <wg@malloc.de>
2382
2383         * join.c: Protect all communications from and to manager with
2384         TEMP_FAILURE_RETRY.
2385         * manager.c: Likewise.
2386         * pthread.c: Likewise.
2387         * smeaphore.c: Likewise.
2388
2389 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
2390
2391         * spinlock.c (__pthread_lock): Top max_count value with
2392         MAX_ADAPTIVE_SPIN_COUNT.
2393         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
2394
2395         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
2396         help P4.
2397
2398 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
2399
2400         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
2401         non-opaque type if __USE_UNIX98.
2402
2403 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
2404
2405         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
2406         non-opaque lock types also if _IO_MTSAFE_IO is defined.
2407
2408 2001-08-23  Roland McGrath  <roland@frob.com>
2409
2410         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
2411         new first argument, skip the cleanup handler if it's zero.
2412         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
2413         (__libc_lock_define_initialized_recursive): Use it.
2414         * sysdeps/pthread/bits/stdio-lock.h: File removed.
2415         The sysdeps/generic file from the main tree now suffices.
2416
2417 2001-08-22  Roland McGrath  <roland@frob.com>
2418
2419         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
2420         instead of <pthread.h>.
2421         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
2422         (_IO_lock_initializer): Add braces.
2423         (_IO_lock_lock): Use __libc_lock_lock_recursive.
2424         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
2425
2426         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
2427         (__libc_lock_define_initialized_recursive): Use it.
2428         (__libc_lock_init_recursive): Likewise.
2429         (__libc_lock_fini_recursive): Likewise.
2430         (__libc_lock_lock_recursive): Likewise.
2431         (__libc_lock_trylock_recursive): Likewise.
2432         (__libc_lock_unlock_recursive): Likewise.
2433         (__libc_lock_define_recursive): New macro.
2434
2435 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
2436
2437         * lockfile.c (__pthread_provide_lockfile): New variable.
2438         * pthread.c (__pthread_require_lockfile): New variable.
2439         * cancel.c (__pthread_require_lockfile): New variable.
2440
2441 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
2442
2443         * tst-context.c (threadfct): Initialize context before calling
2444         makecontext.
2445
2446         * Examples/ex17.c: Make sure test thread is around long enough.
2447
2448 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2449
2450         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
2451
2452 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
2453
2454         * tst-context.c (main): Print explanation before bailing out
2455         because context handling is not supported.
2456
2457 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
2458
2459         * Makefile (tests): Add tst-context.
2460         * tst-context.c: New file.
2461
2462         * sysdeps/pthread/bits/stdio-lock.h: Define
2463         _IO_cleanup_region_start_noarg.
2464
2465 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
2466
2467         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
2468         (ARCH_STACK_MAX_SIZE): Define.
2469         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2470         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2471
2472 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
2473
2474         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
2475
2476         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
2477         (ARCH_STACK_MAX_SIZE): Define.
2478         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
2479         NEED_SEPARATE_REGISTER_STACK.
2480
2481 2001-07-16  Andreas Schwab  <schwab@suse.de>
2482
2483         * Makefile (before-compile): Don't add $(objpfx)crti.o.
2484         (omit-deps): Add crti.
2485         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
2486         it is filtered out of the link command.
2487
2488 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
2489
2490         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
2491         to find the right value for __pthread_initial_thread_bos, it's not
2492         used.  If not FLOATING_STACKS first run
2493         __pthread_init_max_stacksize.
2494
2495 2001-06-16  H.J. Lu  <hjl@gnu.org>
2496
2497         * internals.h: Include <stackinfo.h>.
2498
2499         * attr.c: Don't include <stackinfo.h> here.
2500         * cancel.c: Likewise.
2501         * manager.c: Likewise.
2502         * pthread.c: Likewise.
2503         * ptlongjmp.c: Likewise.
2504
2505 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
2506
2507         * attr.c: Make _STACK_GROWS_UP work.
2508         * internals.h: Likewise.
2509         * manager.c: Likewise.
2510         * pthread.c: Likewise.
2511
2512 2001-06-15  H.J. Lu  <hjl@gnu.org>
2513
2514         * pthread.c (__pthread_reset_main_thread): Fix a typo.
2515
2516 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
2517
2518         * semaphore.h: Use struct _pthread_fastlock as an element of
2519         sem_t instead of an identical struct.
2520         * rwlock.c: Remove casts.
2521         * semaphore.c: Likewise.
2522
2523 2001-04-30  Alan Modra  <amodra@one.net.au>
2524
2525         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
2526
2527 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
2528
2529         * linuxthreads.texi: Spelling corrections.
2530
2531 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
2532
2533         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
2534         returning successfully.
2535         Patch by Gene Cooperman <gene@ccs.neu.edu>.
2536
2537 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
2538
2539         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
2540         serious work try once whether the lock is uncontested.
2541         Remove duplicate reading of __status before loop.
2542         Change suggested by Hans Boehm <hans_boehm@hp.com>.
2543
2544         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
2545         (__pthread_alt_trylock): Likewise.
2546
2547 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
2548
2549         Memory barrier overhaul following line by line inspection.
2550         * mutex.c (pthread_once): Missing memory barriers added.
2551         * pthread.c (__pthread_wait_for_restart_signal,
2552         __pthread_timedsuspend_new, __pthread_restart_new): Added
2553         memory barriers ``just in case'' and for documentary value.
2554         * spinlock.c (__pthread_release): New inline function for releasing
2555         spinlock, to complement __pthread_acquire.  Includes memory
2556         barrier prior to assignment to spinlock, and __asm __volatile
2557         dance to prevent reordering or optimization of the spinlock access.
2558         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
2559         __pthread_alt_timedlock, __pthread_alt_unlock,
2560         __pthread_compare_and_swap): Updated to use new __pthread_release
2561         instead of updating spinlock directly.
2562         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
2563         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
2564         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
2565         Memory barrier overhaul.  Lots of missing memory barriers added,
2566         a couple needless ones removed.
2567         * spinlock.c (__pthread_compare_and_swap): testandset optimization
2568         removed, just calls __pthread_acquire, which has the new read
2569         barrier in it before its testandset.
2570
2571 2001-05-20  Roland McGrath  <roland@frob.com>
2572
2573         * Makeconfig: New file, variables used to be in main libc Makeconfig.
2574
2575 2001-05-09  Geoff Keating  <geoffk@redhat.com>
2576
2577         * sysdeps/powerpc/pt-machine.h
2578         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
2579         (__compare_and_swap): Remove memory barriers.
2580         (__compare_and_swap_with_release_semantics): New function.
2581
2582 2001-04-24  Andreas Jaeger  <aj@suse.de>
2583
2584         * wrapsyscall.c: send* and recv* return ssize_t.
2585
2586         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
2587         mutex instead of double locking it.
2588         Reported by Pierre Artaud <partaud@sodatec.com>.
2589
2590 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
2591
2592         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
2593         using #ifdef whether the clock is available.
2594         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
2595
2596         * sysdeps/ia64/Versions: New file.
2597
2598         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
2599         have to call __gmon_start__ in the libpthread DSO.
2600         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
2601
2602         * Makefile (libpthread-routines): Add ptclock_gettime and
2603         ptclock_settime.
2604         * internals.h: Don't use cpuclock-init.h definitions, use
2605         hp-timing.h definitions.
2606         * pthread.c: Likewise.
2607         * manager.c: Likewise.
2608         * ptclock_gettime.c: New file.
2609         * ptclock_settime.c: New file.
2610         * internals.h: Fix parameter type for __pthread_clock_gettime and
2611         __pthread_clock_settime.
2612
2613         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
2614         * sysdeps/i386/i586/ptclock_settime.c: Removed.
2615         * sysdeps/i386/i586/Makefile: Removed.
2616
2617 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
2618
2619         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
2620         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2621
2622 2001-04-21  Andreas Jaeger  <aj@suse.de>
2623
2624         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
2625         attribute, remove statements that will never be executed.
2626         (thread_func): Remove mutex_unlock call since it's never executed.
2627         (thread_func): Fix comment as suggested by Jakub Jelinek.
2628
2629         * manager.c (__pthread_manager): Add noreturn
2630         attribute.
2631         (pthread_start_thread): Likewise, remove return statement.
2632         (pthread_start_thread_event): Likewise.
2633         Add noreturn attribute for pthread_handle_exit.
2634         * weaks.c: Add noreturn attribute for pthread_exit.
2635
2636         * internals.h: Add __pthread_clock_gettime and
2637         __pthread_clock_settime prototypes.
2638
2639 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
2640
2641         * internals.h: Include <cpuclock-init.h>.
2642         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
2643         CPUCLOCK_VARDEF is defined.
2644         * pthread.c (__pthread_initialize_minimal): Initialize
2645         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
2646         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
2647         for new thread to current CPU clock value.
2648
2649         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
2650
2651         * sysdeps/i386/i586/Makefile: New file.
2652         * sysdeps/i386/i586/Versions: New file.
2653         * sysdeps/i386/i586/ptclock_gettime.c: New file.
2654         * sysdeps/i386/i586/ptclock_settime.c: New file.
2655         * sysdeps/i386/i686/Implies: New file.
2656
2657 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
2658
2659         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
2660         $generated, not $postclean-generated.
2661
2662 2001-04-18  Andreas Jaeger  <aj@suse.de>
2663
2664         * Makefile (otherlibs): Added.
2665
2666 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
2667
2668         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2669
2670 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
2671
2672         * signals.c (sigwait): NSIG is no signal number.  Block all
2673         signals while in signal handler for signals in SET.
2674         Patch by Manfred Spraul <manfred@colorfullife.com>.
2675
2676 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
2677
2678         * tst-cancel.c: Disable most tests.  Add new test where all
2679         cleanup handlers must run.
2680         * Makefile (tests): Add tst-cancel again.
2681
2682         * cancel.c (__pthread_perform_cleanup): Correct condition for
2683         leaving cleanup loop early.
2684
2685         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
2686         all the files which use CURRENT_STACK_FRAME.
2687         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
2688         __builtin_frame_address.
2689         * sysdeps/i386/i686/pt-machine.h: Likewise.
2690
2691 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
2692
2693         * Makefile (tests): Comment out tst-cancel for now.
2694
2695         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
2696         temporary file in object directory.
2697         * Makefile: Don't allow inlining when compiling tst-cancel.c.
2698         Pass $(objpfx) to tst-cancel.
2699
2700 2001-04-11  David S. Miller  <davem@redhat.com>
2701
2702         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
2703         up closer to user local variables so that new cleanup heuristics work.
2704         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
2705
2706 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
2707
2708         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
2709         and remove it.
2710         (_pthread_cleanup_push_defer): Likewise.
2711
2712         * tst-cancel.c (main): Fix loop printing cleanup output.
2713
2714 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2715
2716         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
2717         test.
2718         (__pthread_spin_trylock): Likewise.
2719         * sysdeps/sh/pt-machine.h (testandset): Likewise.
2720
2721 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
2722
2723         * join.c (pthread_exit): Move code to new function __pthread_do_exit
2724         which takes an extra parameter with the current frame pointer.
2725         Call new function with CURRENT_STACK_FRAME.
2726         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
2727         with the new parameter.
2728         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
2729         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
2730         this parameter as the initial value the cleanup handler records are
2731         compared against.  No active cleanup handler record must have an
2732         address lower than the previous one and the initial record must be
2733         above (below on PA) the frame address passed in.
2734         (pthread_setcancelstate): Call __pthread_do_exit instead of
2735         pthread_exit.
2736         (pthread_setcanceltype): Likewise.
2737         (pthread_testcancel): Likewise.
2738         (_pthread_cleanup_pop_restore): Likewise.
2739         * condvar.c (pthread_cond_wait): Likewise.
2740         (pthread_cond_timedwait_relative): Likewise.
2741         * manager.c (pthread_start_thread): Likewise.
2742         * oldsemaphore.c (__old_sem_wait): Likewise.
2743         * pthread.c (pthread_handle_sigcancel): Likewise.
2744         * semaphore.c (__new_sem_wait): Likewise.
2745         (sem_timedwait): Likewise.
2746         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
2747         to limit the cleanup handlers which get run.
2748         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
2749         for __pthread_perform_cleanup.
2750
2751         * Makefile (tests): Add tst-cancel.
2752         * tst-cancel.c: New file.
2753
2754 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
2755
2756         * sysdeps/cris/pt-machine.h: New file.
2757         * sysdeps/cris/pspinlock.c: New file.
2758
2759 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
2760
2761         * shlib-versions: Add case for Linux on CRIS.
2762
2763 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
2764
2765         * attr.c (pthread_getattr_np): Correct computation of stack size
2766         for machiens with register stack.
2767
2768         * Examples/ex17.c (main): Correct detection of failed mmap call.
2769
2770 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
2771
2772         * pthread.c (__pthread_initialize_manager): Fix a typo.
2773
2774 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
2775
2776         * attr.c (__pthread_attr_setstack): Fix alignment check.
2777         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2778         * Makefile (tests): Add ex17 test.
2779         * Examples/ex17.c: New test.
2780
2781 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
2782
2783         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2784         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2785         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2786
2787 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
2788
2789         * Makefile: When generating DSO link with libc_nonshared.a.
2790
2791 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
2792
2793         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2794
2795 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
2796
2797         * internals.h (__pthread_init_max_stacksize): New prototype.
2798         * attr.c (__pthread_attr_setstacksize): Call
2799         __pthread_init_max_stacksize if not yet initialized.
2800         * pthread.c (__pthread_init_max_stacksize): New function.
2801         (__pthread_initialize_manager): Call it.
2802         Patch by <dtc@cmucl.cons.org>.
2803
2804 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
2805
2806         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2807
2808 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2809
2810         * shlib-versions: Add rule for Linux on 64 bit S/390.
2811         * sysdeps/s390/s390-64/pt-machine.h: New file.
2812         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2813
2814 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2815
2816         * sysdeps/s390/pt-machine.h: Move to...
2817         * sysdeps/s390/s390-32/pt-machine.h: ...here.
2818         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2819
2820 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
2821
2822         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2823         * attr.c: Implement pthread_getattr_np.
2824         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2825         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2826         * manager.c (pthread_handle_create): Initialize p_inheritsched.
2827
2828 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2829
2830         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2831         code alignment.
2832
2833 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
2834
2835         * manager.c (manager_mask): Removed static vesion.  Now always local
2836         to __pthread_manager().
2837         (manager_mask_all): Removed completely.
2838         (__pthread_manager): Remove manager_mask_all initialization.
2839         (pthread_handle_create): Remove code to set and reset signal mask
2840         around __clone2() calls.
2841
2842 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
2843
2844         * spinlock.c (__pthread_lock): Force lock->__status to be read from
2845         memory on every spin.
2846
2847 2001-02-10  Andreas Jaeger  <aj@suse.de>
2848
2849         * Makefile (extra-objs): New.
2850
2851 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2852
2853         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2854         __pthread_initialize_minimal prototype.
2855
2856 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2857
2858         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2859
2860 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2861
2862         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2863
2864 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
2865
2866         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2867         broken code.  Patch by Jes Sorensen.
2868
2869 2001-02-06  Andreas Jaeger  <aj@suse.de>
2870
2871         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2872         to...
2873         * internals.h: ...here.
2874
2875 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
2876
2877         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2878
2879 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
2880
2881         * Versions: Remove __pthread_initialize_minimal.
2882
2883 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
2884
2885         * Makefile: Add rules to build crti.o and make it being used in
2886         building libpthread.so.
2887         * sysdeps/i386/Makefile: New file.
2888         * sysdeps/pthread/pt-initfini.c: New file.
2889
2890         * pthread.c: Cleanups.
2891
2892 2001-01-28  Andreas Jaeger  <aj@suse.de>
2893
2894         * oldsemaphore.c (__old_sem_init): Adjust for last change.
2895         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2896         * spinlock.c: Likewise.
2897
2898 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
2899
2900         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2901         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2902         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2903         * pthread.c: Likewise.
2904         * spinlock.h: Likewise.
2905         * sysdeps/pthread/pthread.h: Likewise.
2906
2907 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
2908
2909         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2910         as struct __pthread_attr_s.
2911
2912         * semaphore.h (sem_t): Cleanup namespace, rename status and
2913         spinlock elements.
2914
2915 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
2916
2917         * pthread.c (pthread_onexit_process): Clear
2918         __pthread_manager_thread_bos after freeing it.
2919         * Makefile (tests): Add ex16.
2920         * Examples/ex16.c: New file.
2921
2922 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
2923
2924         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2925         -z nodelete.
2926         * pthread.c (pthread_exit_process): Rename to...
2927         (pthread_onexit_process): ...this.
2928         (pthread_atexit_process, pthread_atexit_retcode): New.
2929         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2930         and only if HAVE_Z_NODELETE is not defined.
2931         (__pthread_initialize_manager): Register pthread_atexit_retcode
2932         with __cxa_atexit.
2933
2934 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
2935
2936         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2937
2938 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
2939
2940         * Makefile (tests): Add ex15.
2941         * Examples/ex15.c: New test.
2942
2943 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
2944
2945         * pthread.c (pthread_exit_process): Free memory allocated for
2946         manager stack.
2947
2948 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
2949
2950         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2951         (pthread_free): Always unmap the stack.  It's safe now that we don't
2952         use MAP_FIXED to allocate stacks.
2953
2954 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
2955
2956         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2957
2958         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2959
2960 2000-11-15  Wolfram Gloger  <wg@malloc.de>
2961
2962         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2963         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2964
2965 2000-12-27  Andreas Jaeger  <aj@suse.de>
2966
2967         * Examples/ex13.c: Make local functions static.
2968         * ecmutex.c: Likewise.
2969         * joinrace.c: Likewise.
2970         * Examples/ex14.c: Likewise.
2971
2972         * Examples/ex2.c: Make local functions static; reformat.
2973         * Examples/ex1.c: Likewise.
2974         * Examples/ex4.c: Likewise.
2975         * Examples/ex5.c: Likewise.
2976         * Examples/ex7.c: Likewise.
2977
2978         * oldsemaphore.c: Add prototypes to shut up GCC.
2979         * pt-machine.c: Likewise.
2980
2981         * weaks.c: Add prototype for pthread_exit.
2982
2983         * internals.h: Add some prototypes, format prototypes and add
2984         missing externs.
2985         Move __libc_waitpid prototype to include/sys/wait.h.
2986
2987         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2988         * mutex.c: Likewise.
2989         * specific.c: Likewise.
2990         * ptfork.c: Likewise.
2991
2992         * lockfile.c: Include internals.h to get prototypes.
2993         * events.c: Likewise.
2994         * sysdeps/alpha/pspinlock.c: Likewise.
2995         * sysdeps/arm/pspinlock.c: Likewise.
2996         * sysdeps/hppa/pspinlock.c: Likewise.
2997         * sysdeps/i386/pspinlock.c: Likewise.
2998         * sysdeps/ia64/pspinlock.c: Likewise.
2999         * sysdeps/m68k/pspinlock.c: Likewise.
3000         * sysdeps/mips/pspinlock.c: Likewise.
3001         * sysdeps/powerpc/pspinlock.c: Likewise.
3002         * sysdeps/s390/pspinlock.c: Likewise.
3003         * sysdeps/sh/pspinlock.c: Likewise.
3004         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3005         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3006         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3007
3008 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3009
3010         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3011         (__pthread_attr_getstack): Return correct address.
3012         Add warnings for using pthread_attr_getstackaddr and
3013         pthread_attr_setstackaddr.
3014
3015 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3016
3017         * Examples/ex6.c (test_thread): Make static.
3018         * Examples/ex12.c (test_thread): Make static and add noreturn
3019         attribute.
3020
3021 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3022
3023         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3024         and compare_and_swap_with_release_semantics returns int not long.
3025
3026 2000-12-17  Andreas Jaeger  <aj@suse.de>
3027
3028         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3029         value.
3030         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3031         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3032         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3033         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3034         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3035         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3036
3037 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3038
3039         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3040         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3041
3042 2000-12-17  Andreas Jaeger  <aj@suse.de>
3043
3044         * internals.h: Add prototypes for testandset and
3045         __compare_and_swap to shut up gcc warnings.
3046
3047 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3048
3049         * join.c (pthread_detach): Allow case where the thread has already
3050         terminated.
3051
3052 2000-12-05  Andreas Jaeger  <aj@suse.de>
3053
3054         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3055         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3056         (__compare_and_swap): Likewise.
3057         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3058
3059 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3060
3061         * Examples/ex3.c (main): Cast int to long before casting to void *.
3062         (search): Cast void * to long, not int.
3063         * Examples/ex8.c (main, thread): Similarly.
3064         * Examples/ex11.c (main): Similarly.
3065         * Examples/ex14.c (worker, do_test): Similarly.
3066         * ecmutex.c (worker, do_test): Similarly.
3067         (nlocks): Cast to int.
3068
3069 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3070
3071         * linuxthreads.texi:  Add documentation for pthreads attributes
3072         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3073         patch.  Document pthread_[sg]etconcurrency().  Mark
3074         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3075
3076 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3077
3078         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3079         Don't define it.
3080         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3081         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3082
3083 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3084
3085         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3086         not doing it right now.
3087         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3088
3089 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3090
3091         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3092         broken compilers.
3093
3094 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3095
3096         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3097         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3098
3099         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3100         discussing mutexes. (As per the Unix98 name for the API.)
3101         Changes documentation for pthread_mutexattr_setkind_np() and
3102         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3103         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3104         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3105         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3106         Begins to introduce discussion of the ``timed'' mutex type.  This
3107         discussion is currently incomplete.
3108         Patch by Bruce Mitchener <bruce@cubik.org>.
3109
3110 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3111             Yutaka Niibe  <gniibe@chroot.org>
3112
3113         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3114         has restrictions, use register.
3115
3116 2000-10-23  Andreas Schwab  <schwab@suse.de>
3117
3118         * Examples/ex14.c (TIMEOUT): Override default timeout.
3119
3120 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3121
3122         * specific.c: Protect tsd array modification in thread data
3123         structures by getting the thread lock in pthread_key_delete and
3124         __pthread_destroy_specifics.
3125         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3126
3127 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3128
3129         * sysdeps/pthread/bits/initspin.h: New file.
3130         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3131         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3132         (__pthread_alt_init_lock): Likewise.
3133         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3134
3135 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3136
3137         * oldsemaphore.c (__old_sem_init): Release lock with
3138         LT_SPINLOCK_INIT, not zero.
3139         * spinlock.c (__pthread_unlock): Likewise.
3140         (__pthread_alt_lock): Likewise.
3141         (__pthread_alt_timedlock): Likewise.
3142         (__pthread_alt_unlock): Likewise.
3143         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3144         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3145         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3146         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3147
3148 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3149
3150         * shlib-versions: Add version definitions for hppa-linux.
3151
3152 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3153
3154         * sysdeps/hppa/pspinlock.c: New file.
3155         * sysdeps/hppa/pt-machine.h: New file.
3156         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3157
3158 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3159
3160         * mutex.c (__pthread_mutex_destroy): Correct test of
3161         busy mutex for mutexes using alternate fastlocks.
3162         Patch by dtc@cmucl.cons.org.
3163
3164 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3165
3166         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3167
3168 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3169
3170         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3171         test for owner first.
3172         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3173
3174         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3175         disabled.
3176
3177 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3178
3179         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3180         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3181
3182         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3183         _POSIX_MONOTONIC_CLOCK.
3184
3185         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3186         and explain why.
3187
3188 2000-09-20  Andreas Jaeger  <aj@suse.de>
3189
3190         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3191         "testrtsig.h" conditional.
3192
3193 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3194
3195         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3196         pthread_attr_setstack.
3197         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3198         pthread_attr_setstack.
3199         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3200
3201 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3202
3203         * Examples/ex14.c: New file.
3204         * Makefile (tests): Add ex14.
3205
3206         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3207         mutex.  Patch by dtc@cmucl.cons.org.
3208
3209         * ecmutex.c: New file.
3210         * Makefile (tests): Add ecmutex.
3211
3212 2000-09-04  H.J. Lu  <hjl@gnu.org>
3213
3214         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3215         instead of roundup to round up to the page size.
3216
3217 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3218
3219         * manager.c (pthread_exited): Correctly report event as TD_REAP
3220         instead of TD_DEATH.  Fix comments.
3221
3222 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3223
3224         * spinlock.h (testandset): Add cast to avoid warning.
3225         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3226
3227 2000-09-02  Andreas Jaeger  <aj@suse.de>
3228
3229         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3230         prototype.
3231
3232 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3233
3234         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3235         Fix typo in last patch (_mode -> _flags).
3236
3237         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3238         Provide definition which respects _IO_USER_LOCK flag.
3239
3240 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3241
3242         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3243         mmaped.
3244
3245 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3246
3247         * Makefile: Add rules to build and run unload.
3248         * unload.c: New file.
3249
3250         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3251
3252         * sysdeps/pthread/pthread.h
3253         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3254         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3255
3256 2000-08-24  Andreas Jaeger  <aj@suse.de>
3257
3258         * Examples/ex13.c: Include <string.h> for strerror prototype and
3259         <stdlib.h> for abort prototype.
3260         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3261         (thread_start): Remove unused variable err.
3262         (main): Silence GCC warnings.
3263
3264 2000-08-22  Andreas Jaeger  <aj@suse.de>
3265
3266         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3267
3268         * Makefile (tests): Add ex13.
3269
3270 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3271
3272         * semaphore.h: Add restrict where required by AGd4.
3273         * sysdeps/pthread/pthread.h: Likewise.
3274         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3275
3276 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
3277
3278         * Makefile (tests): Add ex12.  Add rule to build it.
3279         * Examples/ex12.c: New file.
3280
3281 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
3282
3283         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3284         even though the implementation is not quite complete (but it reports
3285         it).  Define _POSIX_MESSAGE_PASSING to -1.
3286         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3287
3288 2000-08-12  Andreas Jaeger  <aj@suse.de>
3289
3290         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3291         assembler.
3292         (__compare_and_swap): Likewise.
3293         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3294
3295 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
3296
3297         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3298         p_h_errnop correctly and not to NULL.
3299
3300 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
3301
3302         * Banner: Bump version number to 0.9.
3303
3304 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
3305
3306         * Makefile (tests): Add tststack.  Add rule to build the program.
3307         * tststack.c: New file.
3308
3309         * internals.h: Declare __pthread_max_stacksize.
3310         * pthread.c (__pthread_max_stacksize): New variable.
3311         (__pthread_initialize_manager): Determine __pthread_initialize_manager
3312         value.
3313         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3314         (pthread_allocate_stack): Allow kernel to choose stack address if
3315         FLOATING_STACKS.  This also handles variable-sized stacks.
3316         Always allocate stack and guardpage together.  Use mprotect to
3317         change guardpage access.
3318         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3319         ARCH_STACK_MAX_SIZE.
3320
3321         * attr.c (__pthread_attr_setstacksize): Also test value against
3322         upper limit.
3323
3324         * manager.c (__pthread_nonstandard_stacks): Define only if
3325         THREAD_SELF is not defined.
3326         (pthread_allocate_stack): Always initialize gardaddr to a correct
3327         value.
3328         (pthread_handle_create): Unmap thread with one call.
3329         (pthread_free): Remove test for initial thread before removing stack.
3330         Unmap stack with one call.
3331
3332         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3333         1 to avoid removing the stack.
3334
3335 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
3336
3337         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
3338         load of spin lock to prime the cache before the atomic compare and
3339         exchange operation (cmpxchg4). This avoids the spinning on the
3340         cmpxchg4 instruction and reduces movement of the cache line back
3341         and forth between the processors (explanation by Asis K. Mallick
3342         from Intel). This basically makes the implementation operate the
3343         same as the Linux kernel implementation.
3344
3345         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3346         * sysdeps/ia64/pspinlock.c: New file.
3347
3348 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
3349
3350         * pthread.c: Move definition of __pthread_set_own_extricate_if...
3351         * spinlock.h: ...here.  Remove locking.
3352         * internals.h: Remove __pthread_set_own_extricate_if prototype.
3353
3354         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
3355         (rwlock_rd_extricate_func): Don't determine self, let
3356         __pthread_lock do it.
3357         (rwlock_wr_extricate_func): Likewise.
3358         (rwlock_have_already): Optimize *pself handling a bit.
3359
3360         * mutex.c: Use __builtin_expect.
3361         * pthread.c: Likewise.
3362
3363 2000-08-02  Andreas Jaeger  <aj@suse.de>
3364
3365         * sysdeps/s390/pspinlock.c: New file.
3366         * sysdeps/s390/pt-machine.h: New file.
3367         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
3368
3369 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3370
3371         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
3372         R3K.
3373         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3374
3375 2000-07-26  Andreas Jaeger  <aj@suse.de>
3376
3377         * pthread.c: Initialize p_sem_avail.
3378
3379 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
3380
3381         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
3382         * semaphore.c: Handle spurious wakeups.
3383
3384         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
3385         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
3386
3387         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
3388         (__pthread_wait_for_restart): Likewise.
3389
3390         * condvar.c (pthread_cond_wait): Also check whether thread is
3391         cancelable before aborting loop.
3392         (pthread_cond_timedwait): Likewise.
3393
3394         * signals.c (pthread_sighandler): Remove special code to restrore
3395         %gs on x86.
3396         (pthread_sighandler_t): Likewise.
3397
3398 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
3399
3400         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
3401         * pthread.c: Include <resolv.h>.
3402         (_res): Undefine.  Add extern declaration.
3403
3404 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
3405
3406         * pthread.c (__pthread_initial_thread): Update initializer.
3407         (__pthread_manager_thread): Likewise.
3408         (pthread_initialize): Move setrlimit call to...
3409         (__pthread_initialize_manager): ...here.
3410         (__pthread_reset_main_thread): Reset also soft limit on stack size.
3411
3412         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
3413         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
3414
3415 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
3416
3417         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
3418         __compare_and_swap to define testandset.
3419         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
3420         Define IMPLEMENT_TAS_WITH_CAS.
3421
3422 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
3423
3424         * Makefile: Pass -z nodelete to linker for libpthread.so
3425         generation if it understand this option.
3426
3427 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
3428
3429         * manager.c (pthread_handle_create): Remove initialization of
3430         new_thread->p_res._sock.
3431
3432 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
3433
3434         Bugfixes to the variant of the code for machines with no compare