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