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