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