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