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