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