868b4de424a4274248158320a83ea83f372f16bf
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
2
3         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
4         functionally equivalent, but shorter instructions.
5
6 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
7
8         * sysdeps/mips/tls.h: New file.
9         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
10
11 2005-03-21  GOTO Masanori  <gotom@debian.or.jp>
12
13         * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
14         unneeded o-iterator thing.
15
16 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
17
18         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
19         and _fini labels.
20
21 2005-03-05  Ulrich Drepper  <drepper@redhat.com>
22
23         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
24         use -mtune.
25
26 2005-03-05  Roland McGrath  <roland@redhat.com>
27
28         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
29
30 2005-03-05  Jakub Jelinek  <jakub@redhat.com>
31
32         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
33
34 2005-02-09  Daniel Jacobowitz  <dan@codesourcery.com>
35
36         [BZ #740]
37         * descr.h (__pthread_find_self, thread_self): Mark as pure
38         instead of const.
39
40 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
41
42         [BZ #739]
43         * specific.c (pthread_key_delete): If pthread_create has not been
44         called yet, clear p_specific for the current thread.
45         * Makefile (tests): Add tst-tsd1.
46         * tst-tsd1.c: New test.
47
48 2005-01-08  Andreas Jaeger  <aj@suse.de>
49
50         * pthread.c (init_one_static_tls): Adjust initialization of DTV
51         entry for static tls deallocation fix.
52
53         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
54         also contains information whether the memory pointed to is static
55         TLS or not, include <stdbool.h>.
56         * sysdeps/i386/tls.h: Likewise.
57         * sysdeps/ia64/tls.h: Likewise.
58         * sysdeps/powerpc/tls.h: Likewise.
59         * sysdeps/s390/tls.h: Likewise.
60         * sysdeps/sh/tls.h: Likewise.
61         * sysdeps/sparc/tls.h: Likewise.
62         * sysdeps/x86_64/tls.h: Likewise.
63
64 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
65
66         * Makefile (tests): Add tst-align.
67         * tst-align.c: New test.
68         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
69         -mpreferred-stack-boundary=4.
70
71 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
72
73         * internals.h: Include <stdbool.h> to match includes used in nptl.
74
75 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
76
77         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
78         _POSIX_THREAD_CPUTIME): Define to 0.
79         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
80         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
81         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
82         __timer_signal_thread_tclk): Remove.
83         (init_module): Remove their initialization.
84         (thread_cleanup): Remove their cleanup assertions.
85         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
86         __timer_signal_thread_tclk): Remove.
87         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
88         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
89         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
90         * tst-clock1.c (do_test): Check for availability of CPU clock.
91
92 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
93
94         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
95         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
96
97 2004-12-02  Roland McGrath  <roland@redhat.com>
98
99         * Makefile (libpthread-nonshared): Variable removed.
100         ($(objpfx)libpthread_nonshared.a): Target removed.
101         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
102         These are now handled by generic magic from
103         libpthread-static-only-routines being set.
104
105 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
106
107         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
108         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
109         _POSIX_THREAD_PRIO_PROTECT): Define.
110         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
111         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
112         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
113
114 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
115
116         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
117         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
118         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
119         _POSIX_TYPED_MEMORY_OBJECTS): Define.
120         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
121         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
122         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
123
124 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
125
126         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
127         _ABIN32 and _ABI64 for ABI selection throughout.
128         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
129         ABI selection throughout.
130
131 2004-10-18  Roland McGrath  <roland@redhat.com>
132
133         [BZ #406]
134         * Makefile (linuxthreads-CPPFLAGS): New variable;
135         adds -DIS_IN_linuxthreads=1.
136         * sysdeps/i386/tls.h: Protect "useldt.h" with
137         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
138         * sysdeps/i386/i686/pt-machine.h: Revert last change.
139
140 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
141
142         * sysdeps/pthread/errno-loc.c: Don't undef #errno
143         if RTLD_PRIVATE_ERRNO.
144
145 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
146
147         * pthread.c: Mask restart signal during cancel signal handler.
148
149 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
150
151         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
152         _POSIX_THREAD_CPUTIME): Define to 0.
153
154 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
155
156         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
157         and _POSIX_THREAD_CPUTIME to zero.
158         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
159
160         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
161         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
162         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
163         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
164         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
165
166 2004-09-25  Roland McGrath  <roland@redhat.com>
167
168         [BZ #406]
169         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
170         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
171
172 2004-09-24  Roland McGrath  <roland@redhat.com>
173
174         [BZ #406]
175         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
176         of [__ASSUME_LDT_WORKS > 0] test.
177         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
178
179 2004-09-21  Roland McGrath  <roland@redhat.com>
180
181         * Versions: Add comment about linuxthreads' frozen ABI.
182
183 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
184
185         * Versions: Remove exports for pthread_set*id_np functions.
186         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
187         for now.
188         * Makefile: Don't build pthread_set*id code for now.
189
190 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
191
192         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
193         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
194         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
195         and pthread_setresuid_np.
196         * pthread_setgid_np.c: New file.
197         * pthread_setuid_np.c: New file.
198         * pthread_setegid_np.c: New file.
199         * pthread_seteuid_np.c: New file.
200         * pthread_setregid_np.c: New file.
201         * pthread_setreuid_np.c: New file.
202         * pthread_setresgid_np.c: New file.
203         * pthread_setresuid_np.c: New file.
204         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
205         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
206         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
207         and pthread_setresuid_np.
208         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
209         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
210         pthread_setregid, and pthread_setresgid.
211
212 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
213
214         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
215         for __USE_XOPEN2K.
216         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
217         for __USE_XOPEN2K.  [BZ #320]
218
219 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
220
221         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
222
223 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
224
225         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
226         the initialization function might throw.
227
228 2004-08-30  Roland McGrath  <roland@frob.com>
229
230         * Makefile (libpthread-abi-frozen): New variable.
231
232 2004-08-26  Roland McGrath  <roland@redhat.com>
233
234         * configure.in: New file.  If nptl add-on is also selected, barf if
235         explicit and elide ourselves if implicit.
236         * configure: Now generated.
237
238 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
239
240         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
241         __local_multiple_threads): Fix definitions for IS_IN_librt.
242         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
243
244 2004-08-22  Andreas Schwab  <schwab@suse.de>
245
246         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
247         Save gp around CENABLE/CDISABLE calls.
248
249 2004-08-15  Roland McGrath  <roland@frob.com>
250
251         * pthread_atfork.c: Update copyright terms including special exception
252         for these trivial files, which are statically linked into executables
253         that use dynamic linking for the significant library code.
254
255 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
256
257         * libc-tsd.c: Move resolv.h include before the #if.
258         (__res_maybe_init): New function.  Add libc_hidden_def.
259
260 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
261
262         * linuxthreads.texi (Cleanup Handlers): Fix typo.
263         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
264
265 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
266
267         [BZ #284]
268         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
269         instead of clockid_t.
270
271 2004-07-21  Roland McGrath  <roland@redhat.com>
272
273         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
274
275 2004-07-02  Roland McGrath  <roland@redhat.com>
276
277         * configure: Don't exit.
278
279 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
280
281         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
282         include sgidefs.h.
283         * sysdeps/mips/atomicity.h: Likewise.
284
285 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
286
287         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
288         Remove redundant override that missed -g0.
289
290 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
291
292         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
293         (__local_multiple_threads): Define for librt.
294         (SINGLE_THREAD_P): Likewise.
295
296 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
297
298         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
299         using other thread's clock.
300         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
301         * ptclock_settime.c (__pthread_clock_settime): Likewise.
302         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
303         Remove prototypes.
304         Reported by Bernd Schmidt <bernds@redhat.com>.
305         * Makefile (librt-tests): Add tst-clock1.
306         * tst-clock1.c: New test.
307
308         * sysdeps/x86_64/Versions: New file.
309         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
310         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
311
312 2004-04-16  Andreas Schwab  <schwab@suse.de>
313
314         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
315
316 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
317
318         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
319         __pthread_spin_trylock): Use constraint "m" instead of "0" for
320         futex.
321         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
322         __compare_and_swap_with_release_semantic, testandset): Use
323         constraint "m" instead of "0" for futex.
324
325 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
326
327         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
328         branch offset for a PLT entry.
329         (CDISABLE): Likewise.
330
331 2004-05-31  Andreas Jaeger  <aj@suse.de>
332
333         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
334         Set to -fno-unit-at-a-time.
335         Patch by Dan Kegel <dank@kegel.com>.
336
337 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
338
339         * tst-stack1.c: Don't include mcheck.h.
340         (do_test): Make sure user defined stacks aren't reused,
341         don't free them at the end.  [BZ #110]
342
343 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
344
345         * manager.c: Include not-cancel.h.
346         (__pthread_manager): Use read_not_cancel instead of __libc_read.
347         (pthread_start_thread, __pthread_manager_sighandler): Use
348         write_not_cancel instead of __libc_write.
349         (pthread_reap_children): Use waitpid_not_cancel instead of
350         __libc_waitpid.
351         * pthread.c: Include not-cancel.h.
352         (__pthread_initialize_minimal, __pthread_create_2_1,
353         pthread_onexit_process, __pthread_message): Use
354         write_not_cancel instead of __libc_write.
355         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
356         instead of __libc_close.
357         (__pthread_reset_main_thread): Use close_not_cancel instead of
358         __libc_close.
359         * join.c: Include not-cancel.h.
360         (__pthread_do_exit, pthread_join, pthread_detach): Use
361         write_not_cancel instead of __libc_write.
362         * semaphore.c: Include not-cancel.h.
363         (__new_sem_post): Use write_not_cancel instead of __libc_write.
364         * specific.c: Include not-cancel.h.
365         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
366
367 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
368
369         * Versions (libc): Add __on_exit and __libc_sigaction.
370
371 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
372
373         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
374         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
375
376 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
377
378         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
379         reference in PIC case.
380
381 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
382
383         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
384
385 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
386
387         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
388         for librt.  Save the return value to a safe register.
389         (CDISABLE): Define for librt.  Set the function argument correctly.
390
391 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
392
393         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
394         (PSEUDO_CANCEL): Define.
395         (PSEUDO): Use it.
396         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
397         CDISABLE): For librt, append @PLT.
398
399 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
400
401         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
402
403         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
404         return it_value { 0, 0 }.
405         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
406         like SIGEV_SIGNAL.
407         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
408         assertion for SIGEV_NONE.
409         (thread_attr_compare): Compare all attributes, not just a partial
410         subset.
411
412         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
413
414 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
415
416         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
417
418 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
419
420         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
421
422 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
423
424         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
425
426 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
427
428         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
429
430         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
431         for librt.
432         (CDISABLE): Likewise.
433
434 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
435
436         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
437         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
438         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
439         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
440         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
441         Define.
442         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
443         (_POSIX_MESSAGE_PASSING): Define.
444
445 2004-04-10  Andreas Jaeger  <aj@suse.de>
446
447         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
448         to avoid warnings with GCC 3.5.
449
450 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
451
452         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
453         __thread_self assignment.
454         (THREAD_DTV): Replace __thread_register with __thread_self.
455         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
456         assignment.
457
458 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
459
460         * signals.c (pthread_sigmask): Don't ever block or mask
461         __pthread_sig_debug.
462
463 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
464
465         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
466
467 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
468
469         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
470         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
471
472 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
473
474         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
475         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
476         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
477         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
478
479 2004-03-08  Andreas Jaeger  <aj@suse.de>
480
481         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
482         dl_osversion is readonly.
483
484 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
485
486         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
487         _rtlf_global_ro.
488         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
489
490 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
491
492         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
493         valid for SHARED case.  Correct spelling of __vmx_longjmp.
494
495         * sysdeps/powerpc/pspinlock.c: Move from here.
496         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
497         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
498         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
499         and __compare_and_swap32_with_release_semantics.
500
501 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
502
503         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
504         (tests): Remove $(objpfx)tst-stack1-mem.
505         (tst-stack1-ENV): Remove.
506         ($(objpfx)tst-stack1-mem): Remove.
507
508         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
509         (__syscall_error_handler2): Call CDISABLE.
510         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
511         (__syscall_error_handler2): Call CDISABLE.
512
513         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
514
515 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
516
517         * Makefile (libpthread-routines): Add ptcleanup.
518         * ptlongjmp.c: Removed.
519         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
520         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
521         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
522         Version longjmp, siglongjmp for GLIBC_2.3.4.
523         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
524
525 2004-01-22  Andreas Jaeger  <aj@suse.de>
526
527         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
528         (__pthread_release): Likewise.
529
530 2004-01-16  Richard Henderson  <rth@redhat.com>
531
532         * attr.c: Include ldsodefs.h.
533         (pthread_getattr_np): Don't declare __libc_stack_end.
534
535 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
536
537         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
538         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
539         __lib*_multiple_threads.
540         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
541         [!HAVE_TLS_SUPPORT]: Likewise.
542
543 2004-01-13  Roland McGrath  <roland@redhat.com>
544
545         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
546         conditionals.
547
548 2004-01-10  Andreas Jaeger  <aj@suse.de>
549
550         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
551
552 2004-01-01  Andreas Jaeger  <aj@suse.de>
553
554         * Makefile (generated): Add missing files.
555
556 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
557
558         * attr.c (pthread_getattr_np): Make sure stack info returned for
559         main thread does not overlap with any other VMA.
560         Patch by Jakub Jelinek.
561
562 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
563
564         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
565         (INIT_SYSINFO): Define.
566         (TLS_INIT_TP): Use it.
567
568 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
569
570         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
571
572 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
573
574         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
575         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
576         __THROW.
577         * semaphore.h (sem_wait, sem_timedwait): Likewise.
578
579 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
580
581         * manager.c (pthread_free): Call _dl_deallocate_tls even for
582         p_userstack threads.
583         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
584         on error.
585         (pthread_onexit_process): Update comment.
586         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
587         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
588         (tst-stack1-ENV): Set.
589         ($(objpfx)tst-stack1-mem): New.
590         * tst-stack1.c: New test.
591
592 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
593
594         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
595         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
596         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
597         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
599         Include tls.h.
600
601 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
602
603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
604         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
605
606 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
607
608         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
609         message.  Add include of <stddef.h>.
610         (INIT_NEW_WAY): New macro.
611         (INIT_OLD_WAY): Likewise.
612         (_init): Add unwind directives.  Invoke
613         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
614         respectively.
615         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
616         directive.
617         (_fini): Add unwind directives.  Drop unnecessary .align 16
618         directive (bundles are always 16-byte aligned).
619         (_fini_EPILOG_BEGINS): Add unwind-directives.
620
621 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
622
623         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
624
625 2003-12-10  Andreas Jaeger  <aj@suse.de>
626             Ruediger Oertel  <ro@suse.de>
627
628         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
629
630 2003-11-30  Andreas Jaeger  <aj@suse.de>
631
632         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
633         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
634         Likewise.
635
636 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
637
638         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
639         __libc_sigaction if it has been one of the special values before.
640
641 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
642
643         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
644         (__pthread_find_self): Likewise.
645         * manager.c (thread_segment): _STACK_GROWS_UP case added.
646
647 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
648
649         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
650
651 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
652
653         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
654
655 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
656
657         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
658         changes.
659         (SAVE_OLDTYPE_0): Fix a typo.
660
661 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
662
663         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
664         correct offset.
665
666 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
667
668         * Makefile (tests): Add tst-cancel8.
669         * tst-cancel8.c: New test.
670
671 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
672
673         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
674         restoring of the old cancellation type.
675
676 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
677
678         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
679
680 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
681
682         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
683         mutex_lock, mutex_trylock, mutex_unlock): Remove.
684
685 2003-09-27  Wolfram Gloger  <wg@malloc.de>
686
687         * sysdeps/pthread/malloc-machine.h: New file.
688
689 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
690
691         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
692         if NEED_SEPARATE_REGISTER_STACK is defined.
693
694 2003-09-22  Philip Blundell  <philb@gnu.org>
695
696         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
697         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
698         Likewise.
699         * pthread.c (__pthread_elements): Initialise these new elements.
700         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
701         __libc_maybe_call.
702         (__libc_cleanup_pop): Likewise.
703
704 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
705
706         * attr.c: Include stdlib.h.
707
708 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
709
710         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
711
712         * tst-attr1.c: New test.
713         * Makefile (tests): Add tst-attr1.
714
715 2003-09-17  Philip Blundell  <philb@gnu.org>
716
717         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
718         libpthread is loaded.  Elide backwards compatibility code when not
719         required.
720
721 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
722
723         * descr.h (manager_thread): Rename to...
724         (__pthread_manager_threadp): ... this.
725         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
726         (__pthread_manager_threadp): New variable.
727         * internals.h (__manager_thread): Define to
728         __pthread_manager_threadp if USE_TLS.
729
730 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
731
732         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
733         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
734         -mpreferred-stack-boundary=4.
735
736 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
737
738         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
739         values for the initial thread.
740
741 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
742
743         * pthread.c (manager_thread): Remove static, add attribute_hidden.
744         (thread_self_stack): Rename to...
745         (__pthread_self_stack): ... this.  Remove static.
746         (pthread_handle_sigcancel): Use check_thread_self ().
747         (pthread_handle_sigrestart): Likewise.
748         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
749         Likewise.
750         * descr.h (manager_thread): Declare.
751         * internals.h (__pthread_self_stack): New prototype.
752         (__manager_thread): Define.
753         (check_thread_self): New function.
754
755 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
756
757         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
758         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
759
760 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
761
762         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
763         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
764         __SLONGWORD_TYPE otherwise.
765
766 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
767
768         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
769         [READ_MEMORY_BARRIER]: Define.
770         [WRITE_MEMORY_BARRIER]: Define.
771
772 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
773
774         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
775         ptr___pthread_cond_timedwait to the end of the structure to avoid
776         breaking Wine unnecessarily.
777
778 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
779
780         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
781
782 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
783
784         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
785         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
786         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
787         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
788         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
789         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
790         * attr.c (__old_pthread_attr_setstacksize,
791         __old_pthread_attr_setstack): New functions.
792         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
793         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
794         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
795         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
796         * tststack.c: Include limits.h and sys/param.h.
797         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
798
799         * barrier.c (__pthread_barrierattr_getpshared): Always
800         return PTHREAD_PROCESS_PRIVATE.
801         (pthread_barrierattr_setpshared): Return EINVAL if pshared
802         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
803
804 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
805
806         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
807         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
808         up in .text.
809
810         * barrier.c (pthread_barrierattr_setpshared): We don't handle
811         inter-process barriers.
812
813 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
814
815         * Makefile (tests): Add tst-tls1.
816         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
817         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
818         ($(objpfx)tst-tls1): New.
819         ($(objpfx)tst-tls2.out): Likewise.
820         (tests): Depend on $(objpfx)tst-tls2.out.
821         * tst-tls1.c: New test.
822         * tst-tls1.h: New.
823         * tst-tls1mod.c: New.
824         * tst-tls1moda.c: New.
825         * tst-tls1modb.c: New.
826         * tst-tls1modc.c: New.
827         * tst-tls1modd.c: New.
828         * tst-tls1mode.c: New.
829         * tst-tls1modf.c: New.
830         * tst-tls2.sh: New test.
831
832         * internals.h (__pthread_cond_timedwait): New prototype.
833         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
834         ptr___pthread_cond_timedwait.
835         * pthread.c (__pthread_functions): Initialize them.
836         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
837         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
838         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
839         pthread_cond_timedwait@@GLIBC_2.3.2.
840
841 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
842
843         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
844         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
845         __THROW to match NPTL.
846
847 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
848
849         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
850         -DBROKEN_THREAD_SIGNALS.
851
852 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
853
854         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
855         Correct spelling of per thread resolver state.
856
857 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
858
859         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
860         (__rtld_lock_default_lock_recursive,
861         __rtld_lock_default_unlock_recursive): Define.
862         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
863         __rtld_lock_unlock_recursive): Define using
864         GL(_dl_rtld_*lock_recursive).
865         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
866         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
867         number of times as GL(_dl_load_lock) using non-mt implementation was
868         nested.
869
870 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
871
872         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
873         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
874         Likewise.
875         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
876         Likewise.
877         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
878
879         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
880         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
881         PTHREAD_STACK_MIN in comments.
882
883         * sysdeps/alpha/pt-machine.h (PT_EI): Add
884         __attribute__((always_inline)).
885         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
886         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
887         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
888         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
889         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
890         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
891         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
892         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
893         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
894         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
895         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
896         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
897         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
898         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
899         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
900         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
901         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
902         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
903         (__thread_self).
904         * Examples/ex13.c (main): Change res type to void * to avoid
905         warnings.
906         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
907
908 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
909
910         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
911         functions.
912         (pthread_initialize): Initialize GL(dl_init_static_tls).
913
914 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
915
916         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
917         before __timer_dealloc.
918         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
919         Don't call list_unlink.
920
921 2003-07-29  Roland McGrath  <roland@redhat.com>
922
923         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
924
925 2003-07-25  Roland McGrath  <roland@redhat.com>
926
927         * manager.c (pthread_start_thread): Fix typo in last change.
928
929 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
930
931         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
932         use L() for local labels.
933
934 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
935
936         * descr.h (struct _pthread_descr_struct): Provide p_res member
937         even if USE_TLS && HAVE___THREAD.
938         * sysdeps/pthread/res-state.c (__res_state): Return __resp
939         if USE___THREAD.
940         * manager.c: Include resolv.h.
941         (pthread_start_thread): Initialize __resp.
942         * libc-tls-loc.c (__res_state): Return __resp.
943         * Makefile (tests): Add tst-_res1.
944         (modules-names, extra-objs, test-extras, test-modules): Add support
945         for test modules.
946         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
947         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
948         -lpthread.
949         * tst-_res1.c: New test.
950         * tst-_res1mod1.c: New test.
951         * tst-_res1mod2.c: New test.
952
953 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
954
955         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
956         __libc_cleanup_pop.
957
958         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
959
960 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
961
962         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
963         in test for compilation in libc.
964
965 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
966
967         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
968         different symbol for the cancellation syscall wrapper and
969         non-cancellation syscall wrapper.
970         (PSEUDO_END): Define.
971
972 2003-07-05  Richard Henderson  <rth@redhat.com>
973
974         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
975
976 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
977
978         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
979         in librt.
980
981 2003-06-21  Andreas Schwab  <schwab@suse.de>
982
983         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
984         in librt.
985
986 2003-06-20  Richard Henderson  <rth@redhat.com>
987
988         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
989         Remove ptw-osf_sigprocmask.
990
991 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
992
993         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
994         __librt_disable_asynccancel): Declare.
995         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
996         for IS_IN_librt.
997         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
998         in librt.
999         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1000         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1001         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1002         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1003         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1004         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1005         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1006         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1007         * sysdeps/x86_64/tcb-offsets.sym: New file.
1008         * sysdeps/x86_64/Makefile: New file.
1009         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1010         * Versions (libc): Export __librt_enable_asynccancel,
1011         __librt_disable_asynccancel and __librt_multiple_threads as
1012         GLIBC_PRIVATE.
1013         * libc-cancellation.c (__librt_multiple_threads,
1014         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1015
1016 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
1017
1018         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1019         (SINGLE_THREAD_P): Replace @ got notation with @toc.
1020
1021 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
1022
1023         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1024         initializer [PR libc/5052].
1025
1026 2003-06-09  Andreas Schwab  <schwab@suse.de>
1027
1028         * Makefile: Move inclusion of ../Rules down after extra-objs is
1029         fully known.
1030
1031 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
1032
1033         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1034         5+ arg syscalls only needed for PIC.
1035         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1036
1037 2003-06-05  Richard Henderson  <rth@redhat.com>
1038
1039         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1040         and require CFI assembler directives.
1041         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1042
1043 2003-05-30  Andreas Jaeger  <aj@suse.de>
1044
1045         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1046         (SAVESTK_0): Add CFI directives.
1047         (SAVESTK_3): Likewise.
1048         (SAVESTK_5): Likewise.
1049         (RESTSTK_0): Likewise.
1050         (RESTSTK_3): Likewise.
1051         (RESTSTK_5): Likewise.
1052
1053 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1054
1055         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1056         messages.
1057
1058 2003-05-04  Roland McGrath  <roland@redhat.com>
1059
1060         * Makefile ($(objpfx)../libc.so): New target.
1061
1062 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1063
1064         * pthread.c (__pthread_initialize_manager): Remove one last
1065         p_multiple_threads call.
1066
1067 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1068
1069         * pthread.c (__pthread_initialize_manager): Subtract
1070         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1071         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1072         instead of sizeof (pthread_descr).
1073         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1074         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1075         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1076         pthread_descr.
1077         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1078         to TLS_TCB_ALIGN.
1079         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1080         tcbp.
1081         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1082         unneccessarily.
1083         (NO_TLS_OFFSET): Define.
1084
1085 2003-04-22  Roland McGrath  <roland@redhat.com>
1086
1087         * Makeconfig (shared-thread-library): Reverse link order to work
1088         around linker bug.
1089
1090 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1091
1092         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1093         compiler knows we use the ldt_entry variable and that the syscall
1094         modifies the memory.
1095
1096         * internals.h: Split pthread_functions definition into...
1097         * sysdeps/pthread/pthread-functions.h: ...new file.
1098
1099         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1100
1101 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1102
1103         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1104         match changes in NPTL sysdep-cancel.h.
1105
1106 2003-04-11  Roland McGrath  <roland@redhat.com>
1107
1108         * Makefile (multidir): Don't set the variable here with $(shell ...).
1109         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1110         (generated): Append it.
1111
1112 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1113
1114         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1115         (generated-dirs): Add pathname component of multidir.
1116         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1117         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1118         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1119         $(objpfx)$(multidir)/crtn.o): New.
1120         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1121         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1122         before-compile, generated): Don't generate and use specs.
1123         ($(objpfx)specs): Remove.
1124
1125 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1126
1127         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1128
1129 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1130
1131         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1132         missing ; after ENTRY use [PR libc/4997].
1133
1134 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1135
1136         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1137         in case the parent blocked it.
1138
1139 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1140
1141         * Makefile (libpthread-routines): Add pthread_atfork.
1142         (libpthread-static-only-routines): Add pthread_atfork.
1143
1144 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1145
1146         * pthread.c (__pthread_wait_for_restart_signal): Use
1147         __pthread_sigsuspend instead of sigsuspend.
1148         * internals.h (__pthread_sigsuspend): New prototype.
1149         * Makefile (libpthread-routines): Add pt-sigsuspend.
1150         (tests): Add tst-cancel7.
1151         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1152         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1153         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1154         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1155         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1156         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1157         * tst-cancel7.c: New test.
1158
1159 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1160
1161         * alloca_cutoff.c: Include internals.h.
1162         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1163         * sysdeps/pthread/herrno-loc.c: Likewise.
1164         * sysdeps/pthread/res-state.c: Likewise.
1165
1166 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1167
1168         * sysdeps/pthread/bits/typesizes.h: New file.
1169         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1170         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1171
1172 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1173
1174         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1175         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1176
1177 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1178
1179         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1180
1181 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1182
1183         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1184         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1185
1186 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1187
1188         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1189         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1190
1191 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1192
1193         * sysdeps/pthread/Makefile: Fix cut&paste error.
1194
1195 2003-03-18  Roland McGrath  <roland@redhat.com>
1196
1197         * Versions (libpthread: GLIBC_2.2): Remove
1198         pthread_barrierattr_getpshared, never really existed.
1199         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1200         (libpthread: GLIBC_PRIVATE): ... here.
1201
1202 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1203
1204         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1205         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1206         path for crt[in].o.
1207
1208 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1209
1210         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1211         mips2 on new abi.
1212         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1213         Handle 64-bit longs on n64.
1214
1215 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1216
1217         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1218         __pthread_spin_trylock): Rewritten.
1219
1220 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1221
1222         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1223         recent kernels.
1224
1225 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1226
1227         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1228         error for CPU clocks.
1229
1230         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1231         _POSIX_MONOTONIC_CLOCK.
1232         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1233
1234 2003-03-01  Roland McGrath  <roland@redhat.com>
1235
1236         * sysdeps/powerpc/powerpc64/pt-machine.h
1237         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1238         New macros.
1239         * sysdeps/powerpc/tls.h: Don't define those here.
1240
1241         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1242         tcbhead_t with multiple_threads member.
1243         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1244         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1245         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1246         derive thread register offset of p_multiple_threads member.
1247
1248         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1249         Conditionalize p_header member on this.
1250         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1251         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1252         * sysdeps/sh/tls.h: Likewise.
1253         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1254         * sysdeps/sh/tcb-offsets.sym: Likewise.
1255         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1256         (SINGLE_THREAD_P): Likewise.
1257         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1258         (SINGLE_THREAD_P): Likewise.
1259         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1260         (SINGLE_THREAD_P): Likewise.
1261         * pthread.c (__pthread_initialize_manager): Likewise.
1262         * manager.c (pthread_handle_create): Likewise.
1263
1264         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1265         related macros.
1266
1267 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1268
1269         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1270         Conditionalize .toc section magic on this.
1271
1272 2003-02-21  Roland McGrath  <roland@redhat.com>
1273
1274         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1275         instead of __rpc_thread_destroy.
1276
1277 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1278
1279         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1280         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1281         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1282         Fix typo.
1283         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1284         to crti.o and crtn.o.
1285         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1286
1287 2003-02-21  Roland McGrath  <roland@redhat.com>
1288
1289         * Makefile (install-lib-ldscripts): New variable.
1290
1291 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1292
1293         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1294         interprocedure branches.
1295
1296 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1297
1298         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1299         need the target thread's lock.
1300
1301 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1302
1303         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1304         and LOGIN_NAME_MAX.
1305
1306 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1307             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1308
1309         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1310         * sysdeps/powerpc/tcb-offsets.sym: New file.
1311         * sysdeps/powerpc/tls.h: New file.
1312         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1313         (ARCH_STACK_MAX_SIZE): Define.
1314         (THREAD_SELF): Define.
1315         (INIT_THREAD_SELF): Define.
1316         (THREAD_GETMEM): Define.
1317         (THREAD_GETMEM_NC): Define.
1318         (THREAD_SETMEM): Define.
1319         (THREAD_SETMEM_NC): Define.
1320         (__thread_self): Declare.
1321         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1322         for thread register.
1323
1324 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1325
1326         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1327         Check pthread_create existance, not __pthread_fork.
1328
1329 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1330
1331         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1332
1333 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1334
1335         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1336         pthread_create existance, not __pthread_fork.
1337         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1338         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1339         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1340         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1341         Likewise.
1342         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1343         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1344         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1345         Add .weak pthread_create.
1346         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1347         Check pthread_create existance, not __pthread_fork.
1348         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1349         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1350         __fork whenever libpthread.so is loaded.
1351
1352 2003-02-09  Andreas Jaeger  <aj@suse.de>
1353
1354         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1355         Rework: %r9 is destroyed by functions so don't use it as
1356         temporary, align stack correctly, fix parameter for CDISABLE.
1357
1358 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1359
1360         * sysdeps/sh/Makefile: New file.
1361         * sysdeps/sh/tcb-offsets.sym: Likewise.
1362         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1363         of linuxthreads/descr.h after the definition of THREAD_SELF.
1364         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1365         (TLS_TCB_SIZE): Set size of tcbhead_t.
1366         (TLS_PRE_TCB_SIZE): Define.
1367         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1368         a member of thread structure.
1369         (THREAD_DTV): Likewise.
1370         (TLS_INIT_TP_EXPENSIVE): Remove.
1371         (TLS_INIT_TP): Set gbr register only.
1372         (THREAD_SELF): New.
1373         (INIT_THREAD_SELF): Likewise.
1374         (NONTLS_INIT_TP): New.
1375         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1376         Remove.
1377         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1378         SYSCALL_INST_PAD macro after DO_CALL.
1379         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1380         correct variable.
1381         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1382         whenever libpthread.so is loaded.
1383
1384 2003-02-08  Andreas Schwab  <schwab@suse.de>
1385
1386         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1387         libpthread.so is loaded.
1388
1389 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1390
1391         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1392         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1393         no __NR_vfork definition.
1394
1395 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1396
1397         * tst-popen2.c: New test.
1398         * Makefile (tests): Add tst-popen2.
1399         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1400         whenever libpthread.so is loaded.
1401         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1402         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1403         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1404         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1405         Likewise.
1406         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1407         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1408         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1409
1410 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1411
1412         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1413         variable for non-libpthread case to the same value the
1414         pthread_once function would use.
1415
1416 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1417
1418         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1419         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1420
1421 2003-02-04  Andreas Jaeger  <aj@suse.de>
1422
1423         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1424         multi-line strings.
1425
1426 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1427
1428         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1429
1430 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1431
1432         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1433         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1434         variable.
1435         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1436         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1437         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1438         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1439         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1440         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1441         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1442         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1443         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1444         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1445         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1446         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1447
1448 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1449
1450         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1451         Define TLS versions.
1452         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1453         Likewise.
1454         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1455         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1456         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1457         Define.
1458         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1459         branch with 32 bit offset.
1460         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1461
1462 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1463
1464         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1465         as required by TLS ABI.
1466         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1467         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1468         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1469         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1470         Define.
1471         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1472         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1473         instead of %g6 for thread pointer.
1474         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1475         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1476         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1477
1478 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1479
1480         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1481         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1482
1483 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1484
1485         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1486         reference to __fork.
1487
1488 2003-01-17  Richard Henderson  <rth@redhat.com>
1489
1490         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1491         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1492         (TLS_PRE_TCB_SIZE): New.
1493         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1494         new ia64-style thread pointer layout.
1495         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1496         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1497         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1498         if !SHARED.
1499
1500 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1501
1502         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1503         if USE_TLS only.
1504         (NONTLS_INIT_TP): Revert last change.
1505         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1506         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1507
1508 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1509
1510         * pthread.c (_pthread_initialize_minimal): Use
1511         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1512         been already initialized.
1513
1514 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1515
1516         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1517         if not SHARED.
1518
1519 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1520
1521         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1522         __libc_lock_init_recursive): Initialize fields directly.
1523
1524 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1525
1526         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1527         __fork to be far away from __vfork ifndef SHARED.
1528         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1529         Likewise.
1530         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1531         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1532         Add a missing instruction.
1533         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1534         branch to __fork even if __NR_vfork is not defined.
1535
1536 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1537
1538         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1539         as well.
1540
1541 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1542
1543         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1544
1545 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1546
1547         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1548
1549 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1550
1551         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1552         unterminated string literals.
1553         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1554
1555 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1556
1557         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1558         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1559         PSEUDO_END to PSEUDO.
1560         (PSEUDO_END): Remove.
1561         (SINGLE_THREAD_P): Save an instruction.
1562         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1563         parameter to SINGLE_THREAD_P call.
1564         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1565         Code reordering.
1566
1567 2003-01-10  Andreas Schwab  <schwab@suse.de>
1568
1569         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1570
1571 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1572
1573         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1574         backchain in pseudo_cancel.  Minor code improvements.
1575         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1576         Likewise.
1577
1578 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1579
1580         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1581         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1582
1583 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1584
1585         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1586
1587 2002-01-09  Richard Henderson  <rth@redhat.com>
1588
1589         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1590         ret follows pseudo, and thus avoid branch-to-branch in cancel
1591         case.  Use SYSCALL_ERROR_LABEL.
1592
1593 2003-01-11  Philip Blundell  <philb@gnu.org>
1594
1595         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1596         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1597         Correctly unstack lr.
1598         (UNDOARGS_5): Fix ordering of pushes and pops.
1599         (SINGLE_THREAD_P_PIC): New.
1600         (SINGLE_THREAD_P_INT): New.
1601         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1602         was stacked.
1603         (PSEUDO): Use SINGLE_THREAD_P_INT.
1604
1605 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1606
1607         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1608
1609 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1610
1611         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1612         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1613         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1614         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1615         INIT_THREAD_SELF): Define.
1616         [HAVE_TLS_SUPPORT]: Include descr.h.
1617         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1618         struct _pthread_descr_struct.
1619         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1620         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1621         not __thread_self.
1622         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1623         computation.
1624         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1625         for TCB pointer.
1626         (__pthread_initialize_manager): Rename tcb to mgr.
1627         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1628         _pthread_descr) below tcbp, otherwise to tcbp.
1629         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1630         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1631         before freeing.  Fix clone arguments if report_events and USE_TLS.
1632         (pthread_free): Adjust th back before freeing.
1633
1634 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1635
1636         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1637         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1638         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1639
1640 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1641
1642         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1643         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1644         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1645         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1646         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1647         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1648         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1649         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1650         * tst-popen.c: New test.
1651         * Makefile (tests): Add tst-popen.
1652
1653 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1654
1655         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1656         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1657
1658 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1659
1660         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1661         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1662
1663 2003-01-06  Philip Blundell  <philb@gnu.org>
1664
1665         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1666
1667 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1668
1669         * internals.h (LIBC_CANCEL_HANDLED): Define.
1670         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1671         * signals.c (LIBC_CANCEL_HANDLED): Add.
1672         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1673         * tst-cancel-wrappers.sh: Remove all exceptions.
1674
1675         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1676
1677 2003-01-05  Andreas Schwab  <schwab@suse.de>
1678
1679         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1680         objects.
1681
1682         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1683         Fix for PIC.
1684         (CENABLE): Likewise.
1685         (CDISABLE): Likewise.
1686
1687 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1688
1689         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1690         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1691
1692         * Makefile (libc.so-no-z-defs): Define to yes.
1693
1694 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1695
1696         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1697         (tcbhead_t): Add multiple_threads member.
1698         (TLS_INIT_TP_EXPENSIVE): Define.
1699         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1700         strings.  Remove unused code.
1701         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1702
1703 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1704
1705         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1706         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1707
1708 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1709
1710         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1711         even if NOT_IN_libc is defined.
1712
1713 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1714
1715         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1716         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1717         * sysdeps/s390/Makefile: New file.
1718         * sysdeps/s390/tcb-offsets.sym: New file.
1719         * sysdeps/s390/tls.h: New file.
1720
1721 2003-01-03  Richard Henderson  <rth@redhat.com>
1722
1723         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1724
1725 2003-01-03  Andreas Jaeger  <aj@suse.de>
1726
1727         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1728
1729 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1730
1731         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1732
1733 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1734
1735         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1736         cancellation tests.
1737
1738 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1739
1740         * internals.h (struct pthread_functions): Rename
1741         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1742         * pthread.c (pthread_functions): Adjust.
1743         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1744         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1745         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1746         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1747         and pthread_cond_wait.
1748
1749         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1750         type.
1751         (pthread_cond_t): Add __align member, shorten __padding.
1752         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1753         __padding and __align too.
1754
1755         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1756         __builtin_expect.
1757         * sysdeps/pthread/sigaction.c: New file.
1758         * sysdeps/unix/sysv/linux/raise.c: New file.
1759         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1760         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1761         weak_extern with #ifndef SHARED.
1762         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1763         Likewise.
1764         * signals.c (__sigaction): Renamed to...
1765         (__pthread_sigaction): ... this.
1766         (__sigaction): New strong alias, #ifdef SHARED only.
1767         (sigaction): Protect with #ifdef SHARED.
1768         (sigwait): Renamed to...
1769         (__pthread_sigwait): ... this.
1770         (sigwait): New strong alias, #ifdef SHARED only.
1771         (raise): Renamed to...
1772         (__pthread_raise): ... this.
1773         (raise): New strong alias, #ifdef SHARED only.
1774         * internals.h (__pthread_sigaction, __pthread_sigwait,
1775         __pthread_raise): New prototypes.
1776         (struct pthread_functions): Add ptr_pthread_sigaction,
1777         ptr_pthread_sigwait, ptr_pthread_raise.
1778         * pthread.c (pthread_functions): Renamed to...
1779         (__pthread_functions): ... this.  No longer static, no longer
1780         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1781         and ptr_pthread_raise.
1782         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1783         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1784         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1785         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1786
1787         * Makefile (tests, tests-static): Add tst-cancel-static.
1788         * tst-cancel-static.c: New test.
1789
1790 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1791
1792         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1793
1794 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1795
1796         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1797         * condvar.c: Add symbol versioning.  The compatibility versions
1798         are the same as the change in the interface does not effect this
1799         implementation.
1800         * Versions [libpthread]: Add definitions for new pthread_cond_*
1801         interfaces for version GLIBC_2.3.2.
1802
1803 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1804
1805         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1806         __register_atfork.
1807         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1808         for __register_atfork.
1809
1810 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1811
1812         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1813         ASSEMBLER test macro.
1814         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1815         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1816         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1817         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1818         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1819         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1820
1821         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1822         libc_hidden_def.
1823         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1824         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1825         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1826         __libc_current_sigrtmax): Likewise.
1827         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1828         __libc_internal_tsd_set, __libc_internal_tsd_address,
1829         __libc_alloca_cutoff.
1830         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1831         __libc_internal_tsd_set, __libc_internal_tsd_address.
1832
1833         * sysdeps/pthread/list.h: Remove assert.h include.
1834         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1835
1836         * sysdeps/pthread/list.h: New file.
1837         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1838         * sysdeps/unix/sysv/linux/fork.c: New file.
1839         * sysdeps/unix/sysv/linux/fork.h: New file.
1840         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1841         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1842         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1843         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1844         * sysdeps/unix/sysv/linux/Makefile: New file.
1845         * sysdeps/unix/sysv/linux/Versions: New file.
1846         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1847         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1848         use it instead of currentframe.  No longer static.
1849         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1850         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1851         (struct pthread_functions): Add ptr_pthread_fork,
1852         ptr_pthread_cleanup_upto.
1853         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1854         ptr_pthread_cleanup_upto.
1855         * ptfork.c: Include fork.h.
1856         (struct handler_list, struct handler_list_block): Remove.
1857         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1858         pthread_atfork_child): Remove.
1859         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1860         (__pthread_fork): New function.
1861         (__fork, __vfork): Call __libc_fork.
1862         * Makefile (libpthread-routines): Add old_pthread_atfork.
1863         (libpthread-nonshared): Add pthread_atfork.
1864         (others): Depend on $(objpfx)libpthread_nonshared.a.
1865         ($(objpfx)libpthread_nonshared.a): New rule.
1866         (install): Depend on $(inst_libdir)/libpthread.so.
1867         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1868         New rules.
1869         (tests): Depend on libpthread_nonshared.a too.
1870         * old_pthread_atfork.c: New file.
1871         * pthread_atfork.c: New file.
1872         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1873         too.
1874
1875 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1876
1877         * forward.c: Make all functions available by default again.  It
1878         caused too much trouble.
1879         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1880         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1881         ptr___pthread_attr_init_2_*.
1882         * pthread.c (pthread_functions): Adjust.
1883
1884 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1885
1886         * libc_pthread_init.c (__libc_pthread_init): Remove
1887         MULTIPLE_THREADS_OFFSET check.
1888         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1889         (SYSINFO_OFFSET): Remove.
1890         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1891         tcb-offsets.sym.
1892         * sysdeps/i386/tcb-offsets.sym: New file.
1893         * sysdeps/pthread/tcb-offsets.h: New file.
1894         * sysdeps/sparc/sparc32/tls.h: Removed.
1895         * sysdeps/sparc/sparc64/tls.h: Move...
1896         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1897         * sysdeps/sparc/Makefile: New file.
1898         * sysdeps/sparc/tcb-offsets.sym: New file.
1899         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1900         * sysdeps/ia64/Makefile: New file.
1901         * sysdeps/ia64/tcb-offsets.sym: New file.
1902         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1903         (MULTIPLE_THREADS_OFFSET): Remove.
1904         Replace defined MULTIPLE_THREADS_OFFSET
1905         with defined FLOATING_STACKS && USE___THREAD.
1906         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1907         (MULTIPLE_THREADS_OFFSET): Remove.
1908         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1909         (MULTIPLE_THREADS_OFFSET): Remove.
1910         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1911         (MULTIPLE_THREADS_OFFSET): Remove.
1912         * pthread.c (__pthread_initialize_manager): Remove
1913         MULTIPLE_THREADS_OFFSET cbeck.
1914
1915         * tst-cancel-wrappers.sh: Add line continuations.
1916
1917 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1918
1919         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1920         and bits/libc-lock.h.
1921         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1922         __libc_internal_tsd_address): Remove.
1923         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1924         __pthread_internal_tsd_set): New weak_externs.
1925         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1926         using __libc_maybe_call2.
1927         (__libc_tsd_key_t): Move to ...
1928         * descr.h (__libc_tsd_key_t): ...here.
1929         Remove bits/libc-tsd.h include.
1930         * sysdeps/pthread/errno-loc.c: New file.
1931         * sysdeps/pthread/herrno-loc.c: New file.
1932         * sysdeps/pthread/res-state.c: New file.
1933         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1934         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1935         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1936         of THREAD_[SG]ETMEM.
1937         * specific.c (libc_internal_tsd_set): Renamed to...
1938         __pthread_internal_tsd_set.  Remove static.
1939         (libc_internal_tsd_get): Renamed to...
1940         __pthread_internal_tsd_get.  Remove static.
1941         (libc_internal_tsd_address): Renamed to...
1942         __pthread_internal_tsd_address.  Remove static.
1943         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1944         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1945         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1946         Define.
1947         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1948         __pthread_internal_tsd_address): New prototypes.
1949         (struct pthread_functions): Add
1950         ptr_pthread_internal_tsd_([sg]et|address) fields.
1951         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1952         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1953         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1954         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1955         * alloca_cutoff.c: New file.
1956         * no-tsd.c: Removed.
1957         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1958         * pt-system.c (system): Remove cancellation handling.
1959         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1960         cancellation routines.
1961
1962         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1963         (tcbhead_t): Add sysinfo field.
1964         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1965         (TLS_INIT_TP): Use INIT_SYSINFO.
1966         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1967         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1968         (MULTIPLE_THREADS_OFFSET): Adjust.
1969         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1970         (MULTIPLE_THREADS_OFFSET): Likewise.
1971         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1972         (MULTIPLE_THREADS_OFFSET): Likewise.
1973         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1974         (MULTIPLE_THREADS_OFFSET): Likewise.
1975         * descr.h: Include stdint.h.
1976         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1977
1978 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1979
1980         * libc_pthread_init.c: Include stdlib.h.
1981         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1982         (TLS_INIT_TP_EXPENSIVE): Define.
1983         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1984         __libc_maybe_call2): In _LIBC check SHARED define.
1985         * sysdeps/ia64/tls.h: New file.
1986         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1987         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1988         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1989         * sysdeps/sparc/sparc32/tls.h: New file.
1990         * sysdeps/sparc/sparc64/tls.h: New file.
1991         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1992         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1993         * Makefile (tests): Add tst-cancel[1-6].
1994         (tests-reverse): Add tst-cancel5.
1995         Link libc.so before libpthread.so for tests-reverse.
1996         * tst-cancel1.c: New file.
1997         * tst-cancel2.c: New file.
1998         * tst-cancel3.c: New file.
1999         * tst-cancel4.c: New file.
2000         * tst-cancel5.c: New file.
2001         * tst-cancel6.c: New file.
2002
2003 2002-12-27  Andreas Schwab  <schwab@suse.de>
2004
2005         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2006
2007 2002-12-22  Roland McGrath  <roland@redhat.com>
2008
2009         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2010
2011 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
2012
2013         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2014         Reported by Art Hass <ahaas@airmail.net>.
2015
2016 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
2017
2018         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2019         Use return 0 as 6th argument to FORWARD4.
2020
2021 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2022
2023         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2024         define if __ASSUME_LDT_WORKS > 0.
2025         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2026         struct member access if !FLOATING_STACKS.
2027         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2028
2029 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2030
2031         * internals.h (__pthread_thread_self): New prototype.
2032         (struct pthread_functions): Add ptr_pthread_thread_self field.
2033         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2034         (__pthread_thread_self): New function.
2035         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2036         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2037         use thread_self() directly if not FLOATING_STACKS.
2038
2039 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2040
2041         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2042         with #ifndef __ASSEMBLER__.
2043         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2044         pthread_attr_init_2_0 use.
2045
2046 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2047
2048         * wrapsyscall.c: Removed.
2049         * weaks.c: Removed.
2050         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2051         (routines): Remove weaks.  Add forward,
2052         libc_pthread_init, libc-cancellation.
2053         (shared-only-routines): Remove weaks.  Add forward.
2054         (libpthread-routines): Remove wrapsyscall.
2055         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2056         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2057         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2058         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2059         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2060         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2061         (libpthread-shared-only-routines): Add pt-allocrtsig.
2062         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2063         ($(objpfx)tst-cancel-wrappers.out): New rule.
2064         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2065         if in libc.
2066         (__libc_maybe_call): In libpthread.* don't check for existance
2067         of the function.
2068         (__libc_maybe_call2): Define.
2069         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2070         __libc_lock_trylock, __libc_lock_unlock): Use it.
2071         * sysdeps/pthread/flockfile.c: New file.
2072         * sysdeps/pthread/ftrylockfile.c: New file.
2073         * sysdeps/pthread/funlockfile.c: New file.
2074         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2075         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2076         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2077         * libc-cancellation.c: New file.
2078         * forward.c: New file.
2079         * libc_pthread_init.c: New file.
2080         * pt-system.c: New file.
2081         * pthread.c: Remove locale.h.
2082         (__pthread_manager_thread): Initialize multiple_threads.
2083         (__pthread_multiple_threads): Declare.
2084         (pthread_functions): New variable.
2085         (__pthread_initialize_minimal): Remove __uselocale call.
2086         Call __libc_pthread_init.
2087         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2088         initial thread's multiple_threads and __libc_multiple_threads.
2089         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2090         multiple_threads.
2091         (pthread_setschedparam, pthread_getschedparam): Rename to __
2092         prefixed variants.  Add strong_alias.
2093         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2094         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2095         (init_rtsigs): Use __libc_current_sigrtmin_private.
2096         (pthread_initialize): Only call init_rtsigs if
2097         !__ASSUME_REALTIME_SIGNALS.
2098         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2099         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2100         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2101         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2102         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2103         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2104         __pthread_attr_getscope, __pthread_cond_init,
2105         __pthread_cond_destroy, __pthread_cond_wait,
2106         __pthread_cond_signal, __pthread_cond_broadcast,
2107         __pthread_condattr_init, __pthread_condattr_destroy,
2108         __pthread_equal, __pthread_getschedparam,
2109         __pthread_setschedparam, __pthread_setcancelstate,
2110         __pthread_setcanceltype, __pthread_enable_asynccancel,
2111         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2112         (__pthread_mutex_init, __pthread_mutex_destroy,
2113         __pthread_mutex_lock, __pthread_mutex_unlock,
2114         __pthread_mutex_trylock): Likewise.
2115         Add hidden_proto.
2116         (struct pthread_functions): New type.
2117         (__libc_pthread_functions): New variable.
2118         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2119         * descr.h (struct _pthread_descr_struct): Add
2120         p_header.data.multiple_threads field.
2121         * manager.c (pthread_handle_create): Initialize multiple_threads.
2122         * cancel.c (__pthread_enable_asynccancel,
2123         __pthread_disable_asynccancel): New functions.
2124         (__pthread_provide_wrappers): Remove.
2125         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2126         prefixed variants.  Add strong_alias.
2127         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2128         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2129         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2130         * join.c (pthread_exit): Likewise.
2131         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2132         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2133         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2134         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2135         pthread_attr_getinheritsched, pthread_attr_setscope,
2136         pthread_attr_getscope): Likewise.
2137         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2138         __pthread_mutex_lock, __pthread_mutex_unlock,
2139         __pthread_mutex_trylock): Add hidden_def.
2140         * Versions (libc): Add __libc_pthread_init,
2141         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2142         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2143         * lockfile.c: Remove some USE_IN_LIBIO guards.
2144         (__pthread_provide_lockfile): Remove.
2145         * pt-allocrtsig.c: New file.
2146         * tst-cancel-wrappers.sh: New test.
2147
2148 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2149
2150         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2151         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2152         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2153         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2154
2155 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2156
2157         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2158         weak.  There is no reason for that.
2159         (CANCELABLE_SYSCALL_VA): Likewise.
2160
2161 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2162
2163         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2164         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2165         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2166         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2167         libpthread in version GLIBC_2.3.2.
2168
2169 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2170
2171         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2172
2173 2002-12-05  Roland McGrath  <roland@redhat.com>
2174
2175         * pthread.c (__pthread_initialize_minimal)
2176         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2177         TCB if the dynamic linker didn't do it at startup.
2178
2179         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2180         string.
2181         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2182         Submacros updated.
2183         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2184         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2185
2186 2002-12-03  Roland McGrath  <roland@redhat.com>
2187
2188         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2189         from dynamic linker internal cell to new libc cell.
2190
2191 2002-11-28  Roland McGrath  <roland@redhat.com>
2192
2193         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2194         before other headers, so FLOATING_STACKS is not defined wrongly.
2195
2196         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2197         even if [! FLOATING_STACKS].
2198         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2199         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2200         dl_osversion >= 2.3.99 and fatal if not.
2201         (TLS_DO_MODIFY_LDT): Use it.
2202
2203 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2204
2205         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2206         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2207         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2208
2209 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2210
2211         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2212         not defined in libc.
2213         * Makefile (shared-only-routines): Add weaks.
2214         * weaks.c: Remove functions which are not exported from libc.so.
2215
2216 2002-11-14  Roland McGrath  <roland@redhat.com>
2217
2218         * libc-tsd.c: New file.
2219         * Makefile (distribute): Add it.
2220         (libc-link.so): New variable.
2221         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2222         (libc-ok-for-link): New variable.
2223         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2224         libc-ok-for-link to $(use-thread).
2225         [$(libc-ok-for-link) = no]
2226         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2227         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2228         New targets.
2229         (generated): Append them.
2230         (extra-objs): Append libc-tsd.os.
2231
2232         * libc-tls-loc.c: New file.
2233         * Makefile (libpthread-routines): Add it.
2234
2235 2002-11-14  Andreas Schwab  <schwab@suse.de>
2236
2237         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2238         string.
2239
2240 2002-11-13  Roland McGrath  <roland@redhat.com>
2241
2242         * Examples/ex6.c (main): Improve error reporting.
2243
2244 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2245
2246         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2247         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2248
2249         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2250         register number.
2251         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2252
2253 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2254
2255         * manager.c (pthread_start_thread): Call __uselocale even
2256         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2257
2258 2002-10-17  Roland McGrath  <roland@redhat.com>
2259
2260         * Makefile (unload): Don't link in libpthread.so.
2261         ($(objpfx)unload.out): Do depend on it.
2262         * unload.c (main): Improve error reporting.
2263
2264 2002-10-09  Roland McGrath  <roland@redhat.com>
2265
2266         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2267         Under [__PIC__], call the function via the pointer fetched for
2268         comparison rather than a call by name that uses the PLT.
2269         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2270         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2271         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2272         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2273         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2274         (__libc_atfork): Use it.
2275
2276         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2277         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2278         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2279         (ld: GLIBC_PRIVATE): Set removed.
2280
2281 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2282
2283         * sysdeps/unix/sysv/linux/execve.c: New file.
2284
2285 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2286
2287         * no-tsd.c: Include stdlib.h.
2288
2289 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2290
2291         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2292         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2293         field.
2294         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2295         Pass stack size to caller.
2296         (pthread_handle_create): Set p_alloca_cutoff.
2297         * pthread.c (__pthread_initial_thread): Use C99 designated
2298         initializers.  Set p_alloca_cutoff.
2299         (__pthread_manager_thread): Likewise.
2300         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2301         for initial thread.
2302         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2303         for initial thread.
2304         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2305         for manager thread.
2306         * specific.c (__libc_alloca_cutoff): New function.
2307         * no-tsd.c (__libc_alloca_cutoff): New function.
2308         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2309         and libpthread.
2310
2311 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2312
2313         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2314         * sysdeps/sh/tls.h: Likewise.
2315         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2316
2317 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2318
2319         * sysdeps/pthread/tst-timer.c (main): Clear
2320         SIGEV2.sigev_notify_attributes.
2321
2322 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2323
2324         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2325         INLINE_SYSCALL for set_thread_area syscall.
2326
2327 2002-09-28  Roland McGrath  <roland@redhat.com>
2328
2329         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2330         Don't call setrlimit, since we did no prior bogon we need to undo.
2331
2332 2002-09-27  Roland McGrath  <roland@redhat.com>
2333
2334         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2335
2336 2002-09-24  Roland McGrath  <roland@redhat.com>
2337
2338         * sysdeps/x86_64/tls.h: New file.
2339
2340 2002-09-23  Roland McGrath  <roland@redhat.com>
2341
2342         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2343
2344 2002-09-18  Bruno Haible  <bruno@clisp.org>
2345
2346         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2347         an unexpected error code.
2348
2349         * internals.h (__pthread_message): Add const to first parameter type.
2350         * pthread.c (__pthread_message): Likewise.
2351
2352         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2353
2354 2002-09-17  Roland McGrath  <roland@redhat.com>
2355
2356         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2357         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2358         offset (positive or negative) relative to the thread struct.
2359         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2360
2361 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2362
2363         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2364         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2365         Replace /usr/lib/crt[in].o with crt[in].o too.
2366
2367 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2368
2369         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2370
2371 2002-09-04  Bruno Haible  <bruno@clisp.org>
2372
2373         * pthread.c: Include <sys/time.h>.
2374         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2375         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2376         * Makefile (distribute): Add smp.h to the list.
2377
2378 2002-09-04  Bruno Haible  <bruno@clisp.org>
2379
2380         * sysdeps/alpha/pt-machine.h: Choose different include file location
2381         on non-Linux platforms.
2382
2383         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2384         (open, open64): Change va_arg argument type to the integral type to
2385         which mode_t promotes.
2386
2387         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2388         the structure of 'struct sigevent'.
2389
2390         * errno.c (__errno_location, __h_errno_location, __res_state):
2391         Use prototype function definitions.
2392
2393 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2394
2395         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2396         * sysdeps/powerpc/pt-machine.h: moved to...
2397         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2398         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2399
2400 2002-09-02  Roland McGrath  <roland@redhat.com>
2401
2402         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2403
2404 2002-09-01  Roland McGrath  <roland@redhat.com>
2405
2406         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2407         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2408
2409         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2410         (__libc_internal_tsd_address): Declare it.
2411         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2412         __libc_internal_tsd_address.
2413         * specific.c (libc_internal_tsd_address): New function.
2414         (__libc_internal_tsd_address): New variable.
2415         * no-tsd.c (__libc_internal_tsd_address): New variable.
2416
2417 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2418
2419         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2420         crti.o and crtn.o.
2421
2422 2002-08-30  Roland McGrath  <roland@redhat.com>
2423
2424         * Makefile (extra-objs, omit-deps): Add crtn.
2425         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2426         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2427         ($(objpfx)crtn.S): New target.
2428         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2429         (generated): Add crtn.S.
2430
2431         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2432         crtn.o pathname too.
2433
2434 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2435
2436         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2437         if [! SHARED].
2438
2439 2002-08-30  Roland McGrath  <roland@redhat.com>
2440
2441         * tst-static-locale.c: New file.
2442         * Makefile (tests, tests-static): Add it.
2443
2444 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2445
2446         * spinlock.c (__pthread_lock): Fix spurious wakeup
2447         handling.  Don't clear lowest bit of list pointer as sign the thread
2448         is still on the wait list.  Don't restart after spurious wakeup
2449         with spinning to get the lock.
2450         (__pthread_unlock): Take set lowest bit into account when handling
2451         pointer to list elements.
2452         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2453
2454 2002-08-28  Roland McGrath  <roland@redhat.com>
2455
2456         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2457
2458 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2459
2460         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2461         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2462         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2463
2464 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2465
2466         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2467         type to void and add casts in use to avoid warnings with all gcc
2468         versions.
2469
2470 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2471
2472         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2473         Bump to 16384.
2474         * manager.c (__pthread_handles): Remove.
2475         * pthandles.c: New file.
2476         * pthread.c (__pthread_initialize_minimal): Initialize
2477         __pthread_handles[0] and __pthread_handles[1].
2478         * Makefile (libpthread-routines): Add pthandles (must be last).
2479
2480 2002-08-26  Brian Youmans  <3diff@gnu.org>
2481
2482         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2483         permission notice from 2 to 2.1.
2484         * Examples/ex11.c: Likewise.
2485         * Examples/ex13.c: Likewise.
2486         * Examples/ex8.c: Likewise.
2487         * Examples/ex9.c: Likewise.
2488         * barrier.c: Likewise.
2489         * events.c: Likewise.
2490         * lockfile.c: Likewise.
2491         * no-tsd.c: Likewise.
2492         * pt-machine.c: Likewise.
2493         * ptclock_gettime.c: Likewise.
2494         * ptclock_settime.c: Likewise.
2495         * rwlock.c: Likewise.
2496         * sysdeps/alpha/pspinlock.c: Likewise.
2497         * sysdeps/alpha/pt-machine.h: Likewise.
2498         * sysdeps/arm/pspinlock.c: Likewise.
2499         * sysdeps/arm/pt-machine.h: Likewise.
2500         * sysdeps/cris/pspinlock.c: Likewise.
2501         * sysdeps/cris/pt-machine.h: Likewise.
2502         * sysdeps/hppa/pspinlock.c: Likewise.
2503         * sysdeps/hppa/pt-machine.h: Likewise.
2504         * sysdeps/i386/i686/pt-machine.h: Likewise.
2505         * sysdeps/i386/pspinlock.c: Likewise.
2506         * sysdeps/i386/pt-machine.h: Likewise.
2507         * sysdeps/i386/useldt.h: Likewise.
2508         * sysdeps/ia64/pspinlock.c: Likewise.
2509         * sysdeps/ia64/pt-machine.h: Likewise.
2510         * sysdeps/m68k/pspinlock.c: Likewise.
2511         * sysdeps/m68k/pt-machine.h: Likewise.
2512         * sysdeps/mips/pspinlock.c: Likewise.
2513         * sysdeps/mips/pt-machine.h: Likewise.
2514         * sysdeps/powerpc/pspinlock.c: Likewise.
2515         * sysdeps/powerpc/pt-machine.h: Likewise.
2516         * sysdeps/pthread/bits/initspin.h: Likewise.
2517         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2518         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2519         * sysdeps/pthread/getcpuclockid.c: Likewise.
2520         * sysdeps/pthread/posix-timer.h: Likewise.
2521         * sysdeps/pthread/timer_create.c: Likewise.
2522         * sysdeps/pthread/timer_delete.c: Likewise.
2523         * sysdeps/pthread/timer_getoverr.c: Likewise.
2524         * sysdeps/pthread/timer_gettime.c: Likewise.
2525         * sysdeps/pthread/timer_routines.c: Likewise.
2526         * sysdeps/pthread/timer_settime.c: Likewise.
2527         * sysdeps/pthread/tst-timer.c: Likewise.
2528         * sysdeps/s390/pspinlock.c: Likewise.
2529         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2530         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2531         * sysdeps/sh/pspinlock.c: Likewise.
2532         * sysdeps/sh/pt-machine.h: Likewise.
2533         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2534         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2535         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2536         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2537         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2538         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2539         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2540         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2541         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2542         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2543         * tststack.c: Likewise.
2544         * unload.c: Likewise.
2545         * weaks.c: Likewise.
2546         * wrapsyscall.c: Likewise.
2547
2548         * sysdeps/pthread/pt-initfini.c: Changed copying
2549         permission notice to Lesser GPL from Library GPL, including the
2550         references in the special exception.
2551         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2552         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2553         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2554         Likewise.
2555         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2556         Likewise.
2557         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2558
2559 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2560
2561         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2562         overflow [PR libc/4244].
2563
2564 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2565
2566         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2567         compiler happy by adding a return statement which will never be
2568         reached.
2569
2570         * tst-context.c (main): Cast to long before casting to pointer.
2571
2572         * Examples/ex17.c (main): Use correct format string.
2573
2574         * Examples/ex9.c (thread): Remove incorrect return statement.
2575
2576 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2577
2578         * pthread.c (__linuxthreads_version): New global constant.
2579
2580 2002-08-23  Andreas Jaeger  <aj@suse.de>
2581
2582         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2583         as thread specific register.
2584         (testandset): Fix inline asm.
2585         (THREAD_GETMEM): Fix inline asm.
2586
2587 2002-08-22  Roland McGrath  <roland@redhat.com>
2588
2589         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2590         conditional.
2591         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2592         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2593         macro.  That chooses whether to reuse %gs value or let kernel set it.
2594         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2595         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2596         not constant 0.
2597
2598 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2599
2600         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2601         also to the third definition of this macro.
2602
2603 2002-06-17  Andreas Jaeger  <aj@suse.de>
2604
2605         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2606         Set it.
2607
2608 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2609
2610         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2611         loading/reading segment registers.  Some old hardware doesn't
2612         handle the 32-bit instructions as expected.
2613         * sysdeps/i386/tls.h: Likewise.
2614
2615         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2616         renamed to secondcall and use is negated.
2617         (TLS_SETUP_GS_SEGMENT): Likewise.
2618         (TLS_INIT_TP): Likewise.
2619         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2620         secondcall.
2621
2622         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2623         registers.  No need to mask upper 16 bits in this case.
2624         * sysdeps/i386/useldt.h: Likewise.
2625         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2626         is the same since the GDT content changed.
2627
2628         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2629         to TLS_SETUP_GS_SEGMENT.
2630         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2631         TLS_DO_SET_THREAD_AREA.
2632         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2633         entry number from %gs value.
2634         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2635         ignore it.
2636
2637         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2638         Pass true to _dl_deallocate_tls.
2639         (pthread_free): Likewise.
2640         * pthread.c (__pthread_initialize_manager): Likewise.
2641
2642 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2643
2644         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2645         computing index from %gs value.
2646
2647 2002-08-16  Roland McGrath  <roland@redhat.com>
2648
2649         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2650         register value from entry number properly.
2651
2652         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2653         optimally conditional on [__PIC__].
2654         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2655         without touching errno, and use latest modify_ldt-like interface.
2656         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2657         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2658         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2659         existing %gs value as the segment to set.
2660         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2661         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2662         by the first thread's early TLS setup.
2663
2664 2002-08-15  Roland McGrath  <roland@redhat.com>
2665
2666         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2667         return a value as callers now expect.
2668
2669 2002-08-11  Roland McGrath  <roland@redhat.com>
2670
2671         * pthread.c (__pthread_initialize_manager): Initialize
2672         p_header.data.tcb field of manager thread's descriptor.
2673         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2674         field, already done by TLS_INIT_TP.
2675
2676         * manager.c (pthread_handle_create): Move p_header field initializers
2677         together.
2678
2679 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2680
2681         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2682
2683 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2684
2685         * pthread.c (__linuxthreads_initial_report_events): New variable.
2686         (__pthread_initialize_manager): Use it to initialize p_report_events
2687         of initial thread.
2688         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2689
2690 2002-08-07  Roland McGrath  <roland@redhat.com>
2691
2692         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2693         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2694
2695 2002-08-02  Roland McGrath  <roland@redhat.com>
2696
2697         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2698         Add _LIBC_TSD_KEY_LOCALE.
2699         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2700         Call __uselocale to initialize our per-thread locale pointer to
2701         the global one.
2702         * pthread.c (__pthread_initialize_minimal): Likewise.
2703
2704         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2705
2706 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2707
2708         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2709         internally.
2710
2711         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2712         Don't use p_libc_specific element in thread descriptor.
2713
2714 2002-07-30  Roland McGrath  <roland@redhat.com>
2715
2716         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2717         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2718         which does the right thing when __thread support is available.
2719         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2720         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2721         `p_h_errno', `p_resp', and `p_res' members.
2722         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2723         Don't initialize `p_errnop' and `p_h_errnop' members.
2724         (__pthread_reset_main_thread): Likewise.
2725         (__pthread_initialize_manager): Likewise.
2726         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2727         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2728         Don't initialize `p_resp' member.
2729         (__pthread_reset_main_thread): Likewise.
2730         * manager.c (pthread_handle_create): Likewise.
2731         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2732         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2733         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2734         * errno.c [USE_TLS && HAVE___THREAD]
2735         (__h_errno_location, __res_state): Don't define these at all.
2736
2737         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2738         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2739         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2740
2741         * weaks.c: Don't include <errno.h> here.
2742
2743 2002-08-01  Roland McGrath  <roland@redhat.com>
2744
2745         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2746         TLS_INIT_TP.
2747         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2748         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2749         (TLS_INIT_TP): Use that.
2750
2751 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2752
2753         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2754         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2755         (FREE_THREAD): Avoid modify_ldt if using GDT.
2756         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2757
2758 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2759
2760         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2761         * sysdeps/i386/pt-machine.h: Likewise.
2762         * sysdeps/i386/useldt.h: Likewise.
2763
2764 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2765
2766         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2767         call __libc_setup_tls first.
2768         * Makefile: Actually create tst-signal.out file when running the test.
2769         (tests): Add tststatic.
2770         * Examples/tststatic.c: New file.
2771
2772 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2773
2774         * errno.c (__errno_location): Don't define unless !USE_TLS
2775         || !HAVE___THREAD.
2776         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2777         * sysdeps/i386/tls.h: Likewise.
2778         * sysdeps/i386/useldt.h: Likewise.
2779         * sysdeps/i386/i686/pt-machine.h: Likewise.
2780
2781 2002-07-02  H.J. Lu  <hjl@gnu.org>
2782
2783         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2784         use ll/sc.
2785         * sysdeps/mips/pt-machine.h: Likewise.
2786
2787 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2788
2789         * manager.c (pthread_handle_create): Initialize self-reference in
2790         descriptor.
2791
2792 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2793
2794         * Examples/ex9.c (main): Remove unused th variable.
2795
2796 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2797
2798         * wrapsyscall.c: Add __nanosleep alias.
2799         * Versions (GLIBC_2.2.6): Add __nanosleep.
2800         * bug-sleep.c: New file.
2801         * Makefile (tests): Add bug-sleep.
2802
2803 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2804
2805         * Examples/ex9.c (main):  Use list of children and join them.
2806         (thread): Do not call exit.
2807
2808 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2809
2810         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2811         Unconditionally use the code using spinlock.  Use __pthread_release
2812         to free a spinlock.
2813         (wait_node_free): Likewise.
2814         (__pthread_acquire, __pthread_release): Unconditionally define.
2815
2816 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2817
2818         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2819
2820 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2821
2822         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2823
2824 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2825
2826         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2827         parameter.
2828         (pthread_cancel): Likewise.
2829         * internals.h (__pthread_create_2_1): Likewise.
2830         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2831
2832 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2833
2834         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2835         Patch by Glen Nakamura <gen@flex.com>.
2836
2837 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2838
2839         * signals.c: Move sighandler functions to...
2840         * sighandler.c: ...here.  New file.
2841         * signals.c: Move signal handler related type definitions to...
2842         * internals.h: ...here.  Add prototypes for signal handlers.
2843         * Makefile (libpthread-routines): Add sighandler.
2844         (CFLAGS-sighandler.c): Add $(exceptions).
2845
2846 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2847
2848         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2849
2850 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2851
2852         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2853         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2854         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2855         based on previous one and not on current time.  Count overruns.
2856         Patch by Eric F. Sorton <eric@cctcorp.com>.
2857
2858         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2859
2860 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2861
2862         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2863         if it isn't defined yet.
2864         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2865         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2866         Likewise.
2867         * sysdeps/sh/tls.h: New file.
2868
2869 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2870
2871         * manager.c (__pthread_manager_event): Use self instead of arg
2872         for INIT_THREAD_SELF.
2873         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2874         _pthread_descr_struct) instead of sizeof (*descr).
2875
2876 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2877
2878         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2879         * sysdeps/alpha/pt-machine.h: Likewise.
2880         * sysdeps/arm/pt-machine.h: Likewise.
2881         * sysdeps/cris/pt-machine.h: Likewise.
2882         * sysdeps/hppa/pt-machine.h: Likewise.
2883         * sysdeps/m68k/pt-machine.h: Likewise.
2884         * sysdeps/mips/pt-machine.h: Likewise.
2885         * sysdeps/powerpc/pt-machine.h: Likewise.
2886         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2887         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2888         * sysdeps/sh/pt-machine.h: Likewise.
2889         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2890         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2891         * sysdeps/x86_64/pt-machine.h: Likewise.
2892
2893 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2894
2895         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2896         instead of pthread_mutexattr_setkind_np.
2897         (pthread_mutexattr_gettype): Similarly.
2898         * man/pthread_mutexattr_setkind_np.man: New.
2899         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2900
2901 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2902
2903         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2904
2905 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2906
2907         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2908
2909 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2910
2911         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2912
2913 2002-03-17  Andreas Jaeger  <aj@suse.de>
2914
2915         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2916         prototpyes.
2917         * sysdeps/alpha/pt-machine.h: Likewise.
2918         * sysdeps/arm/pt-machine.h: Likewise.
2919         * sysdeps/cris/pt-machine.h: Likewise.
2920         * sysdeps/hppa/pt-machine.h: Likewise.
2921         * sysdeps/i386/i686/pt-machine.h: Likewise.
2922         * sysdeps/ia64/pt-machine.h: Likewise.
2923         * sysdeps/m68k/pt-machine.h: Likewise.
2924         * sysdeps/mips/pt-machine.h: Likewise.
2925         * sysdeps/powerpc/pt-machine.h: Likewise.
2926         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2927         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2928         * sysdeps/sh/pt-machine.h: Likewise.
2929         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2930         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2931         * sysdeps/x86_64/pt-machine.h: Likewise.
2932
2933         * internals.h: Move testandset and __compare_and_swap prototypes
2934         to pt-machine.h.
2935
2936 2002-03-03  Andreas Jaeger  <aj@suse.de>
2937
2938         * errno.c: Include resolv.h to avoid warning.
2939
2940 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2941
2942         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2943         stack limit.
2944
2945 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2946
2947         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2948         into account if USE_TLS.
2949         * manager.c (pthread_handle_create): Free TLS data structures if call
2950         failed.  Pass correct stack to clone if USE_TLS.
2951         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2952         * sysdeps/i386/i686/pt-machine.h: Likewise.
2953         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2954
2955         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2956         Add p_stackaddr element #if USE_TLS.
2957         * internals.c: Include <tls.h>.
2958         * manager.c: Integrate creating and handling of thread descriptor
2959         for TLS.
2960         * pthread.c: Likewise.
2961         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2962         Include <linuxthreads/descr.h> only if TLS is really used.
2963         (GET_DTV): New macro.
2964         (TLS_INIT_TP): Initialize self pointer.
2965
2966 2002-02-17  Andreas Schwab  <schwab@suse.de>
2967
2968         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2969         not NULL.
2970
2971 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2972
2973         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2974         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2975
2976 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2977
2978         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2979
2980 2002-02-08  Richard Henderson  <rth@redhat.com>
2981
2982         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2983
2984 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2985
2986         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2987         after all.
2988
2989 2002-02-07  H.J. Lu  <hjl@gnu.org>
2990
2991         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2992         gcc warning.
2993         (__pthread_spin_lock): Remove ".set noreorder".
2994         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2995
2996 2002-02-05  H.J. Lu  <hjl@gnu.org>
2997
2998         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2999         branch likely.
3000         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3001         (__compare_and_swap): Likewise.
3002
3003 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
3004
3005         * internals.h: Move declarations/definitions of
3006         __pthread_initial_thread_bos, __pthread_initial_thread,
3007         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3008         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3009         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3010         * descr.h: ...here.
3011         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3012         Define THREAD_GETMEM accordingly.
3013
3014 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
3015
3016         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3017
3018         * sysdeps/i386/tls.h: Define THREAD_DTV.
3019
3020 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
3021
3022         * internals.h: Move thread descriptor definition...
3023         * descr.h.: ...here.  New file.
3024         * sysdeps/i386/tls.h: New file.
3025
3026 2002-02-01  H.J. Lu  <hjl@gnu.org>
3027
3028         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3029         different register in the delayed slot.  Use branch likely.
3030
3031         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3032         (__compare_and_swap): Return 0 only when failed to compare. Use
3033         branch likely.
3034
3035 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3036
3037         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3038         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3039         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3040         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3041         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3042         * sysdeps/sparc/sparc64/Versions: New file.
3043         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3044
3045 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3046
3047         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3048         in SHARED code, use GL(dl_cpuclock_offset).
3049
3050 2002-01-28  Andreas Jaeger  <aj@suse.de>
3051
3052         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3053         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3054
3055 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3056
3057         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3058         (CURRENT_STACK_FRAME): Remove duplicate definition.
3059         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3060
3061 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3062
3063         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3064         automatic inline.
3065
3066 2002-01-12  Andreas Schwab  <schwab@suse.de>
3067
3068         * Makefile (test-srcs): Add tst-signal.
3069         (tests): Run tst-signal.
3070         (distribute): Add tst-signal.sh.
3071         * tst-signal.c, tst-signal.sh: New files.
3072
3073 2002-01-14  Andreas Jaeger  <aj@suse.de>
3074
3075         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3076
3077 2002-01-11  Andreas Schwab  <schwab@suse.de>
3078
3079         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3080         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3081
3082 2002-01-06  Richard Henderson  <rth@redhat.com>
3083
3084         * sysdeps/alpha/elf/pt-initfini.c: New file.
3085
3086 2001-12-29  Andreas Jaeger  <aj@suse.de>
3087
3088         * Examples/ex9.c: Add noreturn attribute for thread.
3089         * Examples/ex10.c: Likewise.
3090         * Examples/ex13.c (thread_start): Likewise.
3091         * Examples/ex15.c (worker): Likewise.
3092
3093         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3094
3095 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3096
3097         * man/pthread_atfork.man: Adjust description of mutex handling
3098         after fork for current implementation.
3099         * linuxthreads.texi: Likewise [PR libc/2519].
3100
3101 2001-12-13  Andreas Schwab  <schwab@suse.de>
3102
3103         * specific.c (pthread_key_delete): Don't contact the thread
3104         manager if no threads have been created yet.
3105
3106 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3107
3108         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3109         qualifier to be safe.
3110
3111 2001-11-30  Andreas Schwab  <schwab@suse.de>
3112
3113         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3114         that self is the manager thread, and initialize the thread
3115         register if not.
3116         (thread_self_stack) [THREAD_SELF]: New function to find self via
3117         stack pointer.
3118         * manager.c (pthread_handle_create): Don't block cancel signal any
3119         more.
3120
3121 2001-11-29  Andreas Jaeger  <aj@suse.de>
3122
3123         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3124         (THREAD_SELF): New.
3125         (INIT_THREAD_SELF): New.
3126         (THREAD_GETMEM): New.
3127         (THREAD_GETMEM_NC):
3128         (THREAD_SETMEM): New.
3129         (THREAD_SETMEM_NC): New.
3130         (FLOATING_STACKS): Define.
3131         (ARCH_STACK_MAX_SIZE): Define.
3132
3133 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3134
3135         Bugfix to pthread_key_delete. It was iterating over the thread
3136         manager's linked list of threads, behind the thread manager's
3137         back causing a race. The fix is to have the manager iterate over
3138         the threads instead, using a new request type for doing so.
3139         * internals.h (struct pthread_request): New manager request type
3140         REQ_FOR_EACH_THREAD.
3141         * manager.c (pthread_for_each_thread): New function.
3142         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3143         * specific.c (struct pthread_key_delete_helper_args): New type.
3144         (pthread_key_delete_helper): New static function.
3145         (pthread_key_delete): Use the new thread manager
3146         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3147         the delete key slot to a null value in each thread.
3148         * Examples/ex18.c: New test.
3149         * Makefile (tests): Add ex18.
3150
3151 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3152
3153         * pthread.c (pthread_onexit_process): Don't call free
3154         after threads have been asynchronously terminated.
3155
3156         * manager.c (pthread_handle_exit): Surround cancellation
3157         of threads with __flockfilelist()/__funlockfilelist().
3158
3159 2001-11-26  Andreas Schwab  <schwab@suse.de>
3160
3161         * manager.c (pthread_handle_create): Start the child thread with
3162         the cancel signal blocked, so that it does not handle it before
3163         the thread register is set up.  Save errno from failed clone call.
3164
3165 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3166
3167         * sysdeps/i386/i686/Implies: Removed.
3168         * sysdeps/i386/i686/Versions: New file.
3169
3170 2001-10-31  Andreas Jaeger  <aj@suse.de>
3171
3172         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3173
3174 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3175
3176         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3177         to __linuxthreads_pthread_sizeof_descr to match name used by
3178         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3179         linuxthreads_db/td_symbol_list.c.
3180
3181 2001-09-22  Andreas Jaeger  <aj@suse.de>
3182
3183         * linuxthreads/tst-context.c: Avoid compile warning.
3184
3185 2001-09-20  Andreas Jaeger  <aj@suse.de>
3186
3187         * shlib-versions: Add x86-64.
3188
3189 2001-09-19  Andreas Jaeger  <aj@suse.de>
3190
3191         * sysdeps/x86_64/Makefile: New file.
3192         * sysdeps/x86_64/pspinlock.c: New file.
3193         * sysdeps/x86_64/pt-machine.h: New file.
3194
3195 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3196
3197         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3198         for SIGEV_NONE.
3199         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3200
3201 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3202             Wolfram Gloger <wg@malloc.de>
3203
3204         * join.c: Protect all communications from and to manager with
3205         TEMP_FAILURE_RETRY.
3206         * manager.c: Likewise.
3207         * pthread.c: Likewise.
3208         * smeaphore.c: Likewise.
3209
3210 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3211
3212         * spinlock.c (__pthread_lock): Top max_count value with
3213         MAX_ADAPTIVE_SPIN_COUNT.
3214         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3215
3216         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3217         help P4.
3218
3219 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3220
3221         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3222         non-opaque type if __USE_UNIX98.
3223
3224 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3225
3226         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3227         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3228
3229 2001-08-23  Roland McGrath  <roland@frob.com>
3230
3231         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3232         new first argument, skip the cleanup handler if it's zero.
3233         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3234         (__libc_lock_define_initialized_recursive): Use it.
3235         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3236         The sysdeps/generic file from the main tree now suffices.
3237
3238 2001-08-22  Roland McGrath  <roland@frob.com>
3239
3240         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3241         instead of <pthread.h>.
3242         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3243         (_IO_lock_initializer): Add braces.
3244         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3245         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3246
3247         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3248         (__libc_lock_define_initialized_recursive): Use it.
3249         (__libc_lock_init_recursive): Likewise.
3250         (__libc_lock_fini_recursive): Likewise.
3251         (__libc_lock_lock_recursive): Likewise.
3252         (__libc_lock_trylock_recursive): Likewise.
3253         (__libc_lock_unlock_recursive): Likewise.
3254         (__libc_lock_define_recursive): New macro.
3255
3256 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3257
3258         * lockfile.c (__pthread_provide_lockfile): New variable.
3259         * pthread.c (__pthread_require_lockfile): New variable.
3260         * cancel.c (__pthread_require_lockfile): New variable.
3261
3262 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3263
3264         * tst-context.c (threadfct): Initialize context before calling
3265         makecontext.
3266
3267         * Examples/ex17.c: Make sure test thread is around long enough.
3268
3269 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3270
3271         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3272
3273 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3274
3275         * tst-context.c (main): Print explanation before bailing out
3276         because context handling is not supported.
3277
3278 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3279
3280         * Makefile (tests): Add tst-context.
3281         * tst-context.c: New file.
3282
3283         * sysdeps/pthread/bits/stdio-lock.h: Define
3284         _IO_cleanup_region_start_noarg.
3285
3286 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3287
3288         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3289         (ARCH_STACK_MAX_SIZE): Define.
3290         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3291         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3292
3293 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3294
3295         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3296
3297         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3298         (ARCH_STACK_MAX_SIZE): Define.
3299         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3300         NEED_SEPARATE_REGISTER_STACK.
3301
3302 2001-07-16  Andreas Schwab  <schwab@suse.de>
3303
3304         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3305         (omit-deps): Add crti.
3306         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3307         it is filtered out of the link command.
3308
3309 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3310
3311         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3312         to find the right value for __pthread_initial_thread_bos, it's not
3313         used.  If not FLOATING_STACKS first run
3314         __pthread_init_max_stacksize.
3315
3316 2001-06-16  H.J. Lu  <hjl@gnu.org>
3317
3318         * internals.h: Include <stackinfo.h>.
3319
3320         * attr.c: Don't include <stackinfo.h> here.
3321         * cancel.c: Likewise.
3322         * manager.c: Likewise.
3323         * pthread.c: Likewise.
3324         * ptlongjmp.c: Likewise.
3325
3326 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3327
3328         * attr.c: Make _STACK_GROWS_UP work.
3329         * internals.h: Likewise.
3330         * manager.c: Likewise.
3331         * pthread.c: Likewise.
3332
3333 2001-06-15  H.J. Lu  <hjl@gnu.org>
3334
3335         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3336
3337 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3338
3339         * semaphore.h: Use struct _pthread_fastlock as an element of
3340         sem_t instead of an identical struct.
3341         * rwlock.c: Remove casts.
3342         * semaphore.c: Likewise.
3343
3344 2001-04-30  Alan Modra  <amodra@one.net.au>
3345
3346         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3347
3348 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3349
3350         * linuxthreads.texi: Spelling corrections.
3351
3352 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3353
3354         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3355         returning successfully.
3356         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3357
3358 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3359
3360         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3361         serious work try once whether the lock is uncontested.
3362         Remove duplicate reading of __status before loop.
3363         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3364
3365         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3366         (__pthread_alt_trylock): Likewise.
3367
3368 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3369
3370         Memory barrier overhaul following line by line inspection.
3371         * mutex.c (pthread_once): Missing memory barriers added.
3372         * pthread.c (__pthread_wait_for_restart_signal,
3373         __pthread_timedsuspend_new, __pthread_restart_new): Added
3374         memory barriers ``just in case'' and for documentary value.
3375         * spinlock.c (__pthread_release): New inline function for releasing
3376         spinlock, to complement __pthread_acquire.  Includes memory
3377         barrier prior to assignment to spinlock, and __asm __volatile
3378         dance to prevent reordering or optimization of the spinlock access.
3379         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3380         __pthread_alt_timedlock, __pthread_alt_unlock,
3381         __pthread_compare_and_swap): Updated to use new __pthread_release
3382         instead of updating spinlock directly.
3383         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3384         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3385         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3386         Memory barrier overhaul.  Lots of missing memory barriers added,
3387         a couple needless ones removed.
3388         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3389         removed, just calls __pthread_acquire, which has the new read
3390         barrier in it before its testandset.
3391
3392 2001-05-20  Roland McGrath  <roland@frob.com>
3393
3394         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3395
3396 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3397
3398         * sysdeps/powerpc/pt-machine.h
3399         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3400         (__compare_and_swap): Remove memory barriers.
3401         (__compare_and_swap_with_release_semantics): New function.
3402
3403 2001-04-24  Andreas Jaeger  <aj@suse.de>
3404
3405         * wrapsyscall.c: send* and recv* return ssize_t.
3406
3407         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3408         mutex instead of double locking it.
3409         Reported by Pierre Artaud <partaud@sodatec.com>.
3410
3411 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3412
3413         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3414         using #ifdef whether the clock is available.
3415         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3416
3417         * sysdeps/ia64/Versions: New file.
3418
3419         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3420         have to call __gmon_start__ in the libpthread DSO.
3421         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3422
3423         * Makefile (libpthread-routines): Add ptclock_gettime and
3424         ptclock_settime.
3425         * internals.h: Don't use cpuclock-init.h definitions, use
3426         hp-timing.h definitions.
3427         * pthread.c: Likewise.
3428         * manager.c: Likewise.
3429         * ptclock_gettime.c: New file.
3430         * ptclock_settime.c: New file.
3431         * internals.h: Fix parameter type for __pthread_clock_gettime and
3432         __pthread_clock_settime.
3433
3434         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3435         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3436         * sysdeps/i386/i586/Makefile: Removed.
3437
3438 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3439
3440         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3441         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3442
3443 2001-04-21  Andreas Jaeger  <aj@suse.de>
3444
3445         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3446         attribute, remove statements that will never be executed.
3447         (thread_func): Remove mutex_unlock call since it's never executed.
3448         (thread_func): Fix comment as suggested by Jakub Jelinek.
3449
3450         * manager.c (__pthread_manager): Add noreturn
3451         attribute.
3452         (pthread_start_thread): Likewise, remove return statement.
3453         (pthread_start_thread_event): Likewise.
3454         Add noreturn attribute for pthread_handle_exit.
3455         * weaks.c: Add noreturn attribute for pthread_exit.
3456
3457         * internals.h: Add __pthread_clock_gettime and
3458         __pthread_clock_settime prototypes.
3459
3460 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3461
3462         * internals.h: Include <cpuclock-init.h>.
3463         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3464         CPUCLOCK_VARDEF is defined.
3465         * pthread.c (__pthread_initialize_minimal): Initialize
3466         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3467         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3468         for new thread to current CPU clock value.
3469
3470         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3471
3472         * sysdeps/i386/i586/Makefile: New file.
3473         * sysdeps/i386/i586/Versions: New file.
3474         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3475         * sysdeps/i386/i586/ptclock_settime.c: New file.
3476         * sysdeps/i386/i686/Implies: New file.
3477
3478 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3479
3480         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3481         $generated, not $postclean-generated.
3482
3483 2001-04-18  Andreas Jaeger  <aj@suse.de>
3484
3485         * Makefile (otherlibs): Added.
3486
3487 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3488
3489         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3490
3491 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3492
3493         * signals.c (sigwait): NSIG is no signal number.  Block all
3494         signals while in signal handler for signals in SET.
3495         Patch by Manfred Spraul <manfred@colorfullife.com>.
3496
3497 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3498
3499         * tst-cancel.c: Disable most tests.  Add new test where all
3500         cleanup handlers must run.
3501         * Makefile (tests): Add tst-cancel again.
3502
3503         * cancel.c (__pthread_perform_cleanup): Correct condition for
3504         leaving cleanup loop early.
3505
3506         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3507         all the files which use CURRENT_STACK_FRAME.
3508         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3509         __builtin_frame_address.
3510         * sysdeps/i386/i686/pt-machine.h: Likewise.
3511
3512 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3513
3514         * Makefile (tests): Comment out tst-cancel for now.
3515
3516         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3517         temporary file in object directory.
3518         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3519         Pass $(objpfx) to tst-cancel.
3520
3521 2001-04-11  David S. Miller  <davem@redhat.com>
3522
3523         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3524         up closer to user local variables so that new cleanup heuristics work.
3525         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3526
3527 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3528
3529         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3530         and remove it.
3531         (_pthread_cleanup_push_defer): Likewise.
3532
3533         * tst-cancel.c (main): Fix loop printing cleanup output.
3534
3535 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3536
3537         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3538         test.
3539         (__pthread_spin_trylock): Likewise.
3540         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3541
3542 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3543
3544         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3545         which takes an extra parameter with the current frame pointer.
3546         Call new function with CURRENT_STACK_FRAME.
3547         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3548         with the new parameter.
3549         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3550         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3551         this parameter as the initial value the cleanup handler records are
3552         compared against.  No active cleanup handler record must have an
3553         address lower than the previous one and the initial record must be
3554         above (below on PA) the frame address passed in.
3555         (pthread_setcancelstate): Call __pthread_do_exit instead of
3556         pthread_exit.
3557         (pthread_setcanceltype): Likewise.
3558         (pthread_testcancel): Likewise.
3559         (_pthread_cleanup_pop_restore): Likewise.
3560         * condvar.c (pthread_cond_wait): Likewise.
3561         (pthread_cond_timedwait_relative): Likewise.
3562         * manager.c (pthread_start_thread): Likewise.
3563         * oldsemaphore.c (__old_sem_wait): Likewise.
3564         * pthread.c (pthread_handle_sigcancel): Likewise.
3565         * semaphore.c (__new_sem_wait): Likewise.
3566         (sem_timedwait): Likewise.
3567         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3568         to limit the cleanup handlers which get run.
3569         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3570         for __pthread_perform_cleanup.
3571
3572         * Makefile (tests): Add tst-cancel.
3573         * tst-cancel.c: New file.
3574
3575 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3576
3577         * sysdeps/cris/pt-machine.h: New file.
3578         * sysdeps/cris/pspinlock.c: New file.
3579
3580 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3581
3582         * shlib-versions: Add case for Linux on CRIS.
3583
3584 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3585
3586         * attr.c (pthread_getattr_np): Correct computation of stack size
3587         for machiens with register stack.
3588
3589         * Examples/ex17.c (main): Correct detection of failed mmap call.
3590
3591 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3592
3593         * pthread.c (__pthread_initialize_manager): Fix a typo.
3594
3595 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3596
3597         * attr.c (__pthread_attr_setstack): Fix alignment check.
3598         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3599         * Makefile (tests): Add ex17 test.
3600         * Examples/ex17.c: New test.
3601
3602 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3603
3604         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3605         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3606         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3607
3608 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3609
3610         * Makefile: When generating DSO link with libc_nonshared.a.
3611
3612 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3613
3614         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3615
3616 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3617
3618         * internals.h (__pthread_init_max_stacksize): New prototype.
3619         * attr.c (__pthread_attr_setstacksize): Call
3620         __pthread_init_max_stacksize if not yet initialized.
3621         * pthread.c (__pthread_init_max_stacksize): New function.
3622         (__pthread_initialize_manager): Call it.
3623         Patch by <dtc@cmucl.cons.org>.
3624
3625 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3626
3627         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3628
3629 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3630
3631         * shlib-versions: Add rule for Linux on 64 bit S/390.
3632         * sysdeps/s390/s390-64/pt-machine.h: New file.
3633         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3634
3635 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3636
3637         * sysdeps/s390/pt-machine.h: Move to...
3638         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3639         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3640
3641 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3642
3643         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3644         * attr.c: Implement pthread_getattr_np.
3645         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3646         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3647         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3648
3649 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3650
3651         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3652         code alignment.
3653
3654 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3655
3656         * manager.c (manager_mask): Removed static vesion.  Now always local
3657         to __pthread_manager().
3658         (manager_mask_all): Removed completely.
3659         (__pthread_manager): Remove manager_mask_all initialization.
3660         (pthread_handle_create): Remove code to set and reset signal mask
3661         around __clone2() calls.
3662
3663 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3664
3665         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3666         memory on every spin.
3667
3668 2001-02-10  Andreas Jaeger  <aj@suse.de>
3669
3670         * Makefile (extra-objs): New.
3671
3672 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3673
3674         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3675         __pthread_initialize_minimal prototype.
3676
3677 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3678
3679         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3680
3681 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3682
3683         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3684
3685 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3686
3687         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3688         broken code.  Patch by Jes Sorensen.
3689
3690 2001-02-06  Andreas Jaeger  <aj@suse.de>
3691
3692         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3693         to...
3694         * internals.h: ...here.
3695
3696 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3697
3698         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3699
3700 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3701
3702         * Versions: Remove __pthread_initialize_minimal.
3703
3704 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3705
3706         * Makefile: Add rules to build crti.o and make it being used in
3707         building libpthread.so.
3708         * sysdeps/i386/Makefile: New file.
3709         * sysdeps/pthread/pt-initfini.c: New file.
3710
3711         * pthread.c: Cleanups.
3712
3713 2001-01-28  Andreas Jaeger  <aj@suse.de>
3714
3715         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3716         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3717         * spinlock.c: Likewise.
3718
3719 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3720
3721         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3722         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3723         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3724         * pthread.c: Likewise.
3725         * spinlock.h: Likewise.
3726         * sysdeps/pthread/pthread.h: Likewise.
3727
3728 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3729
3730         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3731         as struct __pthread_attr_s.
3732
3733         * semaphore.h (sem_t): Cleanup namespace, rename status and
3734         spinlock elements.
3735
3736 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3737
3738         * pthread.c (pthread_onexit_process): Clear
3739         __pthread_manager_thread_bos after freeing it.
3740         * Makefile (tests): Add ex16.
3741         * Examples/ex16.c: New file.
3742
3743 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3744
3745         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3746         -z nodelete.
3747         * pthread.c (pthread_exit_process): Rename to...
3748         (pthread_onexit_process): ...this.
3749         (pthread_atexit_process, pthread_atexit_retcode): New.
3750         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3751         and only if HAVE_Z_NODELETE is not defined.
3752         (__pthread_initialize_manager): Register pthread_atexit_retcode
3753         with __cxa_atexit.
3754
3755 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3756
3757         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3758
3759 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3760
3761         * Makefile (tests): Add ex15.
3762         * Examples/ex15.c: New test.
3763
3764 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3765
3766         * pthread.c (pthread_exit_process): Free memory allocated for
3767         manager stack.
3768
3769 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3770
3771         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3772         (pthread_free): Always unmap the stack.  It's safe now that we don't
3773         use MAP_FIXED to allocate stacks.
3774
3775 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3776
3777         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3778
3779         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3780
3781 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3782
3783         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3784         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3785
3786 2000-12-27  Andreas Jaeger  <aj@suse.de>
3787
3788         * Examples/ex13.c: Make local functions static.
3789         * ecmutex.c: Likewise.
3790         * joinrace.c: Likewise.
3791         * Examples/ex14.c: Likewise.
3792
3793         * Examples/ex2.c: Make local functions static; reformat.
3794         * Examples/ex1.c: Likewise.
3795         * Examples/ex4.c: Likewise.
3796         * Examples/ex5.c: Likewise.
3797         * Examples/ex7.c: Likewise.
3798
3799         * oldsemaphore.c: Add prototypes to shut up GCC.
3800         * pt-machine.c: Likewise.
3801
3802         * weaks.c: Add prototype for pthread_exit.
3803
3804         * internals.h: Add some prototypes, format prototypes and add
3805         missing externs.
3806         Move __libc_waitpid prototype to include/sys/wait.h.
3807
3808         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3809         * mutex.c: Likewise.
3810         * specific.c: Likewise.
3811         * ptfork.c: Likewise.
3812
3813         * lockfile.c: Include internals.h to get prototypes.
3814         * events.c: Likewise.
3815         * sysdeps/alpha/pspinlock.c: Likewise.
3816         * sysdeps/arm/pspinlock.c: Likewise.
3817         * sysdeps/hppa/pspinlock.c: Likewise.
3818         * sysdeps/i386/pspinlock.c: Likewise.
3819         * sysdeps/ia64/pspinlock.c: Likewise.
3820         * sysdeps/m68k/pspinlock.c: Likewise.
3821         * sysdeps/mips/pspinlock.c: Likewise.
3822         * sysdeps/powerpc/pspinlock.c: Likewise.
3823         * sysdeps/s390/pspinlock.c: Likewise.
3824         * sysdeps/sh/pspinlock.c: Likewise.
3825         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3826         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3827         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3828
3829 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3830
3831         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3832         (__pthread_attr_getstack): Return correct address.
3833         Add warnings for using pthread_attr_getstackaddr and
3834         pthread_attr_setstackaddr.
3835
3836 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3837
3838         * Examples/ex6.c (test_thread): Make static.
3839         * Examples/ex12.c (test_thread): Make static and add noreturn
3840         attribute.
3841
3842 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3843
3844         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3845         and compare_and_swap_with_release_semantics returns int not long.
3846
3847 2000-12-17  Andreas Jaeger  <aj@suse.de>
3848
3849         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3850         value.
3851         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3852         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3853         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3854         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3855         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3856         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3857
3858 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3859
3860         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3861         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3862
3863 2000-12-17  Andreas Jaeger  <aj@suse.de>
3864
3865         * internals.h: Add prototypes for testandset and
3866         __compare_and_swap to shut up gcc warnings.
3867
3868 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3869
3870         * join.c (pthread_detach): Allow case where the thread has already
3871         terminated.
3872
3873 2000-12-05  Andreas Jaeger  <aj@suse.de>
3874
3875         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3876         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3877         (__compare_and_swap): Likewise.
3878         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3879
3880 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3881
3882         * Examples/ex3.c (main): Cast int to long before casting to void *.
3883         (search): Cast void * to long, not int.
3884         * Examples/ex8.c (main, thread): Similarly.
3885         * Examples/ex11.c (main): Similarly.
3886         * Examples/ex14.c (worker, do_test): Similarly.
3887         * ecmutex.c (worker, do_test): Similarly.
3888         (nlocks): Cast to int.
3889
3890 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3891
3892         * linuxthreads.texi:  Add documentation for pthreads attributes
3893         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3894         patch.  Document pthread_[sg]etconcurrency().  Mark
3895         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3896
3897 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3898
3899         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3900         Don't define it.
3901         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3902         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3903
3904 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3905
3906         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3907         not doing it right now.
3908         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3909
3910 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3911
3912         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3913         broken compilers.
3914
3915 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3916
3917         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3918         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3919
3920         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3921         discussing mutexes. (As per the Unix98 name for the API.)
3922         Changes documentation for pthread_mutexattr_setkind_np() and
3923         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3924         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3925         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3926         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3927         Begins to introduce discussion of the ``timed'' mutex type.  This
3928         discussion is currently incomplete.
3929         Patch by Bruce Mitchener <bruce@cubik.org>.
3930
3931 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3932             Yutaka Niibe  <gniibe@chroot.org>
3933
3934         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3935         has restrictions, use register.
3936
3937 2000-10-23  Andreas Schwab  <schwab@suse.de>
3938
3939         * Examples/ex14.c (TIMEOUT): Override default timeout.
3940
3941 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3942
3943         * specific.c: Protect tsd array modification in thread data
3944         structures by getting the thread lock in pthread_key_delete and
3945         __pthread_destroy_specifics.
3946         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3947
3948 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3949
3950         * sysdeps/pthread/bits/initspin.h: New file.
3951         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3952         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3953         (__pthread_alt_init_lock): Likewise.
3954         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3955
3956 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3957
3958         * oldsemaphore.c (__old_sem_init): Release lock with
3959         LT_SPINLOCK_INIT, not zero.
3960         * spinlock.c (__pthread_unlock): Likewise.
3961         (__pthread_alt_lock): Likewise.
3962         (__pthread_alt_timedlock): Likewise.
3963         (__pthread_alt_unlock): Likewise.
3964         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3965         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3966         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3967         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3968
3969 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3970
3971         * shlib-versions: Add version definitions for hppa-linux.
3972
3973 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3974
3975         * sysdeps/hppa/pspinlock.c: New file.
3976         * sysdeps/hppa/pt-machine.h: New file.
3977         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3978
3979 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3980
3981         * mutex.c (__pthread_mutex_destroy): Correct test of
3982         busy mutex for mutexes using alternate fastlocks.
3983         Patch by dtc@cmucl.cons.org.
3984
3985 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3986
3987         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3988
3989 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3990
3991         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3992         test for owner first.
3993         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3994
3995         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3996         disabled.
3997
3998 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3999
4000         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4001         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4002
4003         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4004         _POSIX_MONOTONIC_CLOCK.
4005
4006         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4007         and explain why.
4008
4009 2000-09-20  Andreas Jaeger  <aj@suse.de>
4010
4011         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4012         "testrtsig.h" conditional.
4013
4014 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
4015
4016         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4017         pthread_attr_setstack.
4018         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4019         pthread_attr_setstack.
4020         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4021
4022 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
4023
4024         * Examples/ex14.c: New file.
4025         * Makefile (tests): Add ex14.
4026
4027         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4028         mutex.  Patch by dtc@cmucl.cons.org.
4029
4030         * ecmutex.c: New file.
4031         * Makefile (tests): Add ecmutex.
4032
4033 2000-09-04  H.J. Lu  <hjl@gnu.org>
4034
4035         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4036         instead of roundup to round up to the page size.
4037
4038 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4039
4040         * manager.c (pthread_exited): Correctly report event as TD_REAP
4041         instead of TD_DEATH.  Fix comments.
4042
4043 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4044
4045         * spinlock.h (testandset): Add cast to avoid warning.
4046         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4047
4048 2000-09-02  Andreas Jaeger  <aj@suse.de>
4049
4050         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4051         prototype.
4052
4053 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4054
4055         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4056         Fix typo in last patch (_mode -> _flags).
4057
4058         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4059         Provide definition which respects _IO_USER_LOCK flag.
4060
4061 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4062
4063         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4064         mmaped.
4065
4066 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4067
4068         * Makefile: Add rules to build and run unload.
4069         * unload.c: New file.
4070
4071         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4072
4073         * sysdeps/pthread/pthread.h
4074         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4075         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4076
4077 2000-08-24  Andreas Jaeger  <aj@suse.de>
4078
4079         * Examples/ex13.c: Include <string.h> for strerror prototype and
4080         <stdlib.h> for abort prototype.
4081         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4082         (thread_start): Remove unused variable err.
4083         (main): Silence GCC warnings.
4084
4085 2000-08-22  Andreas Jaeger  <aj@suse.de>
4086
4087         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4088
4089         * Makefile (tests): Add ex13.
4090
4091 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4092
4093         * semaphore.h: Add restrict where required by AGd4.
4094         * sysdeps/pthread/pthread.h: Likewise.
4095         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4096
4097 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4098
4099         * Makefile (tests): Add ex12.  Add rule to build it.
4100         * Examples/ex12.c: New file.
4101
4102 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4103
4104         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4105         even though the implementation is not quite complete (but it reports
4106         it).  Define _POSIX_MESSAGE_PASSING to -1.
4107         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4108
4109 2000-08-12  Andreas Jaeger  <aj@suse.de>
4110
4111         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4112         assembler.
4113         (__compare_and_swap): Likewise.
4114         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4115
4116 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4117
4118         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4119         p_h_errnop correctly and not to NULL.
4120
4121 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4122
4123         * Banner: Bump version number to 0.9.
4124
4125 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4126
4127         * Makefile (tests): Add tststack.  Add rule to build the program.
4128         * tststack.c: New file.
4129
4130         * internals.h: Declare __pthread_max_stacksize.
4131         * pthread.c (__pthread_max_stacksize): New variable.
4132         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4133         value.
4134         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4135         (pthread_allocate_stack): Allow kernel to choose stack address if
4136         FLOATING_STACKS.  This also handles variable-sized stacks.
4137         Always allocate stack and guardpage together.  Use mprotect to
4138         change guardpage access.
4139         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4140         ARCH_STACK_MAX_SIZE.
4141
4142         * attr.c (__pthread_attr_setstacksize): Also test value against
4143         upper limit.
4144
4145         * manager.c (__pthread_nonstandard_stacks): Define only if
4146         THREAD_SELF is not defined.
4147         (pthread_allocate_stack): Always initialize gardaddr to a correct
4148         value.
4149         (pthread_handle_create): Unmap thread with one call.
4150         (pthread_free): Remove test for initial thread before removing stack.
4151         Unmap stack with one call.
4152
4153         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4154         1 to avoid removing the stack.
4155
4156 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4157
4158         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4159         load of spin lock to prime the cache before the atomic compare and
4160         exchange operation (cmpxchg4). This avoids the spinning on the
4161         cmpxchg4 instruction and reduces movement of the cache line back
4162         and forth between the processors (explanation by Asis K. Mallick
4163         from Intel). This basically makes the implementation operate the
4164         same as the Linux kernel implementation.
4165
4166         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4167         * sysdeps/ia64/pspinlock.c: New file.
4168
4169 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4170
4171         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4172         * spinlock.h: ...here.  Remove locking.
4173         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4174
4175         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4176         (rwlock_rd_extricate_func): Don't determine self, let
4177         __pthread_lock do it.
4178         (rwlock_wr_extricate_func): Likewise.
4179         (rwlock_have_already): Optimize *pself handling a bit.
4180
4181         * mutex.c: Use __builtin_expect.
4182         * pthread.c: Likewise.
4183
4184 2000-08-02  Andreas Jaeger  <aj@suse.de>
4185
4186         * sysdeps/s390/pspinlock.c: New file.
4187         * sysdeps/s390/pt-machine.h: New file.
4188         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4189
4190 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4191
4192         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4193         R3K.
4194         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4195
4196 2000-07-26  Andreas Jaeger  <aj@suse.de>
4197
4198         * pthread.c: Initialize p_sem_avail.
4199
4200 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4201
4202         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4203         * semaphore.c: Handle spurious wakeups.
4204
4205         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4206         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4207
4208         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4209         (__pthread_wait_for_restart): Likewise.
4210
4211         * condvar.c (pthread_cond_wait): Also check whether thread is
4212         cancelable before aborting loop.
4213         (pthread_cond_timedwait): Likewise.
4214
4215         * signals.c (pthread_sighandler): Remove special code to restrore
4216         %gs on x86.
4217         (pthread_sighandler_t): Likewise.
4218
4219 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4220
4221         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4222         * pthread.c: Include <resolv.h>.
4223         (_res): Undefine.  Add extern declaration.
4224
4225 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4226
4227         * pthread.c (__pthread_initial_thread): Update initializer.
4228         (__pthread_manager_thread): Likewise.
4229         (pthread_initialize): Move setrlimit call to...
4230         (__pthread_initialize_manager): ...here.
4231         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4232
4233         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4234         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4235
4236 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4237
4238         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4239         __compare_and_swap to define testandset.
4240         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4241         Define IMPLEMENT_TAS_WITH_CAS.
4242
4243 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4244
4245         * Makefile: Pass -z nodelete to linker for libpthread.so
4246         generation if it understand this option.
4247
4248 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4249
4250         * manager.c (pthread_handle_create): Remove initialization of
4251         new_thread->p_res._sock.
4252
4253 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4254
4255         Bugfixes to the variant of the code for machines with no compare
4256         and swap.
4257
4258         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4259         node was not being properly enqueued, due to failing to update
4260         the lock->__status field.
4261
4262         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4263         being set inappropriately, causing the suspend function to be called
4264         with a null self pointer and crash.
4265
4266 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4267
4268         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4269         compare&swap is available.
4270
4271         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4272         compare_and_swap.
4273
4274         * pthread.c (pthread_initialize): Don't use sysconf to determine
4275         whether the machine has more than one processor.
4276
4277         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4278         removed thread_self calls.
4279
4280 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4281
4282         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4283         __compare_and_swap to compare_and_swap in code which assumes
4284         compare swap is available.
4285
4286 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4287
4288         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4289         bug whereby thr field of waitnode structure would not be correctly
4290         set unless a null self pointer is passed to the functions.
4291         Eliminated redundant calls to thread_self().
4292
4293 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4294
4295         * pthread.c (__pthread_initialize_manager): Lock
4296         __pthread_manager_thread.p_lock before calling clone.
4297
4298 2000-05-05  H.J. Lu  <hjl@gnu.org>
4299
4300         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4301         have acquire semantics.
4302         (__compare_and_swap_with_release_semantics): New inline
4303         function.
4304         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4305
4306 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4307
4308         * manager.c: Fix the problem with signals at startup.
4309         Change the way that thread stacks are allocated on IA64.
4310         Clean up some of the guard page allocation stuff.
4311
4312 1999-12-19  H.J. Lu  <hjl@gnu.org>
4313
4314         * internals.h (page_roundup): New.
4315         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4316         instead of roundup.
4317         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4318         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4319         is define.
4320
4321 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4322
4323         * manager.c (pthread_allocate_stack): Unmap the stack top
4324         if failed to map the stack bottom.
4325         Fix the guard page.
4326         (pthread_free): Fix the guard page.
4327
4328         * pthread.c (pthread_initialize): Set rlimit correctly for
4329         NEED_SEPARATE_REGISTER_STACK.
4330
4331 1999-12-16  H.J. Lu  <hjl@gnu.org>
4332
4333         * pthread.c (__pthread_initialize_manager): Pass
4334         __pthread_manager_thread_bos instead of
4335         __pthread_manager_thread_tos to __clone2.
4336
4337 1999-12-16  H.J. Lu  <hjl@gnu.org>
4338
4339         * manager.c (pthread_allocate_stack): Correct the calculation
4340         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4341         stack bottom.
4342
4343 1999-12-13  H.J. Lu  <hjl@gnu.org>
4344
4345         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4346         bit after setting ar.ccv.
4347
4348 1999-12-12  H.J. Lu  <hjl@gnu.org>
4349
4350         * manager.c (pthread_allocate_stack): Make the starting
4351         address of the stack bottom page aligned. FIXME: it may
4352         need changes in other places.
4353         (pthread_handle_create): Likewise.
4354
4355 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4356
4357         * manager.c (pthread_allocate_stack): Handle
4358         NEED_SEPARATE_REGISTER_STACK.
4359         (pthread_handle_create): Likewise.
4360         * pthread.c (__pthread_initialize_manager): Likewise.
4361
4362         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4363
4364 1999-12-02  H.J. Lu  <hjl@gnu.org>
4365
4366         * sysdeps/ia64/pt-machine.h: New.
4367
4368 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4369
4370         * wrapsyscall.c: Mark non-__ protected names as weak.
4371         PR libc/1466.
4372
4373 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4374
4375         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4376
4377 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4378
4379         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4380         Add tests also to new alternative spinlock implementation.
4381         * spinlock.h: Likewise.
4382         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4383
4384 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4385
4386         * Version: Export __sigaction.
4387         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4388         of __sigaction.
4389         * pthread.c: Use __libc_sigaction instead of __sigaction.
4390
4391         * condvar.c: Implement pthread_condattr_getpshared and
4392         pthread_condattr_setpshared.
4393         * mutex.c: Implement pthread_mutexattr_getpshared and
4394          pthread_mutexattr_setpshared.
4395         * Versions: Export new functions.
4396         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4397
4398         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4399         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4400         is not selected.
4401
4402 2000-07-04  Greg McGary  <greg@mcgary.org>
4403
4404         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4405         pragmas.  Include bp-sym.h only if _LIBC.
4406
4407 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4408
4409         * spinlock.c (__pthread_unlock): Properly place write barrier.
4410         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4411
4412 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4413
4414         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4415         faster on SMP systems.  No more emulation of compare&swap for adaptive
4416         spinlocks.
4417         * spinlock.h: Likewise.
4418         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4419         Replace fast with adaptive mutex.
4420         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4421         * condvar.c: Likewise.
4422         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4423         * internals.h: Declare __pthread_smp_kernel.
4424         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4425         _pthread_fastlock structure.
4426         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4427
4428         * pthread.c: Remove initialization to zero from global variables.
4429
4430 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4431
4432         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4433
4434 2000-06-28  Greg McGary  <greg@mcgary.org>
4435
4436         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4437         pthread functions that have pointers in their return+arg signatures.
4438
4439 2000-06-27  Greg McGary  <greg@mcgary.org>
4440
4441         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4442         extern declarations of pthread functions that have pointers in
4443         their return+arg signatures.
4444
4445 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4446
4447         * Makefile (tests): Add ex11.  Add rules to build it.
4448         * Examples/ex11.c: New file.
4449         * rwlock.c: Fix complete braindamaged previous try to implement
4450         timedout functions.
4451
4452         * spinlock.c: Pretty print.
4453
4454 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4455
4456         * Makefile (tests): Add ex10.  Add rules to build it.
4457         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4458         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4459         * condvar.c (pthread_cond_wait): Allow mutex of kind
4460         PTHREAD_MUTEX_TIMED_NP.
4461         (pthread_cond_timedwait_relative): Likewise.
4462         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4463         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4464         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4465         (__pthread_mutex_lock): Use __pthread_alt_lock for
4466         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4467         (__pthread_mutex_timedlock): New function.
4468         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4469         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4470         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4471         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4472         * spinlock.c: Implement alternate fastlocks.
4473         * spinlock.h: Add prototypes.
4474         * Examples/ex10.c: New file.
4475         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4476         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4477
4478         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4479         (__pthread_rwlock_timedrdlock): New function.
4480         (__pthread_rwlock_timedwrlock): New function.
4481         Use laternate fastlock function everywhere.
4482
4483 2000-06-21  Andreas Jaeger  <aj@suse.de>
4484
4485         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4486         prototype.
4487
4488         * join.c: Include <stdlib.h> for exit prototype.
4489
4490 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4491
4492         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4493
4494         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4495         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4496
4497         * Makefile (libpthread-routines): Add barrier.
4498         (tests): Add ex9.  Add rule to build ex9.
4499         * Versions: Export barrier functions.
4500         * barrier.c: New file.
4501         * Examples/ex9.c: New file.
4502         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4503         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4504         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4505
4506 2000-06-19  H.J. Lu  <hjl@gnu.org>
4507
4508         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4509         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4510         (compare_and_swap_with_release_semantics): New. Default to
4511         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4512         is not defined.
4513
4514         * spinlock.c (__pthread_unlock): Call
4515         compare_and_swap_with_release_semantics () instead of
4516         compare_and_swap ().
4517
4518 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4519
4520         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4521         to errno directly.
4522         * sysdeps/pthread/timer_delete.c: Likewise.
4523         * sysdeps/pthread/timer_getoverr.c: Likewise.
4524         * sysdeps/pthread/timer_gettime.c: Likewise.
4525         * sysdeps/pthread/timer_settime.c: Likewise.
4526
4527 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4528
4529         Timer nodes are now reference counted, and can be marked
4530         as deleted. This allows for the safe release of the global mutex
4531         in the middle without losing the timer being operated on.
4532
4533         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4534         member is now an enum with three values, so that an intermediate
4535         state can be represented (deleted but not free for reuse yet).
4536         New refcount member added.
4537         * sysdeps/pthread/timer_routines.c: Likewise.
4538
4539         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4540         timer_valid): New inline functions added.
4541
4542         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4543         restructured, recursive deadlock bug fixed.
4544
4545         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4546         timer_addref to ensure that timer won't be deleted while mutex is not
4547         held. Also uses timer_invalid to perform validation of timer handle.
4548         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4549         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4550
4551 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4552
4553         * shlib-versions: Add entry for SH.
4554         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4555
4556 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4557
4558         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4559         tightened up some critical regions and micro-optimized some list
4560         manipulation code.
4561
4562         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4563         Returns int value now to indicate whether timer was queued at head.
4564         * sysdeps/pthread/posix-timer.h: Likewise.
4565         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4566         new return value from __timer_thread_queue_timer to avoid waking
4567         up timer thread unnecessarily.
4568
4569         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4570         inuse flag, because this requires mutex to be held.  Callers updated
4571         to do the check when they have the mutex.
4572         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4573
4574         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4575         regions: avoids making system calls while holding timer mutex, and
4576         a few computations were moved outside of the mutex as well.
4577         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4578
4579         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4580         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4581         changed to get better better code out of gcc.
4582         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4583         version of list_unlink added here.
4584         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4585         function in all places: idempotent one for timers, non-idempotent
4586         one for thread nodes.
4587         * sysdeps/pthread/timer_settime: Likewise.
4588         * sysdeps/pthread/timer_routines.c: Likewise.
4589
4590 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4591
4592         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4593         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4594
4595         * sysdeps/pthread/Makefile: Remove tests definition.
4596
4597 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4598             Yutaka Niibe  <gniibe@chroot.org>
4599
4600         * sysdeps/sh/pspinlock.c: New file.
4601         * sysdeps/sh/pt-machine.h: New file.
4602
4603 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4604
4605         * Makefile (tests): Add joinrace.
4606
4607         * Examples/ex6.c: Test return value of pthread_join.
4608
4609 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4610
4611         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4612         (__pthread_spin_trylock): Implement.
4613         (__pthread_spin_unlock): Implement.
4614         (__pthread_spin_init): Implement.
4615         (__pthread_spin_destroy): Implement.
4616
4617 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4618
4619         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4620         really append the entry.
4621
4622 2000-06-10  Andreas Jaeger  <aj@suse.de>
4623
4624         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4625
4626 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4627
4628         * sysdeps/pthread/timer_create.c: Thread matching now done on
4629         clock type as well as thread attributes.
4630         There are individual global signal-delivering threads for
4631         different clock types.
4632         * sysdeps/pthread/posix-timer.h: Likewise.
4633         * sysdeps/pthread/timer_routines.c: Likewise.
4634
4635         * sysdeps/pthread/timer_routines.c: Thread allocation and
4636         deallocation function now remembers to put thread on active
4637         list and remove from active list.
4638         Thus now the feature of binding multiple timers
4639         to a single thread actually works.
4640
4641 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4642
4643         * pthread.c (__pthread_create_2_1): Optimize a bit.
4644
4645         * internals.h (invalid_handle): Also test for p_terminated != 0.
4646         (nonexisting_handle): New function.  Same as old invalid_handle.
4647         * join.c (pthread_join): Use nonexisting_handle instead of
4648         invalid_handle to test for acceptable thread handle.
4649         * manager.c (pthread_handle_free): Likewise.
4650         * joinrace.c: New file.
4651         Reported by Permaine Cheung <pcheung@cygnus.com>.
4652
4653 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4654
4655         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4656         Correct handling of matching variable.
4657
4658         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4659         avoid warnings.
4660
4661         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4662         Be prepared for empty timer list.
4663
4664         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4665         CPUTIME clock ID.  Add support for thread clocks.
4666
4667         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4668         subtraction were switched.
4669
4670         * sysdeps/pthread/timer_routines.c (init_module): Use
4671         THREAD_MAXNODES threads.
4672
4673         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4674         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4675         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4676         with sigqueueinfo is this system call is available.
4677
4678         * sysdeps/pthread/timer_create.c (timer_create): Allow
4679         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4680
4681         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4682         functionality.
4683         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4684
4685 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4686
4687         * sysdeps/pthread/posix-timer.h: New file.
4688         * sysdeps/pthread/timer_create.c: New file.
4689         * sysdeps/pthread/timer_delete.c: New file.
4690         * sysdeps/pthread/timer_getoverr.c: New file.
4691         * sysdeps/pthread/timer_gettime.c: New file.
4692         * sysdeps/pthread/timer_routines.c: New file.
4693         * sysdeps/pthread/timer_settime.c: New file.
4694         * sysdeps/pthread/tst-timer.c: New file.
4695
4696 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4697
4698         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4699         LINK_MAX definitions if necessary.
4700
4701 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4702
4703         Added missing fork time handling of global libio lock.
4704
4705         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4706         not just the individual stream locks. Rewritten to use new
4707         iterator interface provided by libio rather than accessing
4708         global variable.
4709
4710         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4711         which lock and unlock the stream list using the new interface
4712         provied by libio.
4713         * internals.h: Likewise.
4714
4715         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4716         and __funlockfilelist in the parent after the fork.
4717         Child still calls __fresetlockfiles as before.
4718
4719         * linuxthreads.texi: Now explains what happens to streams at
4720         fork time. Also whole new section on forking and thread added.
4721         Definition of pthread_atfork moved out of Miscellaneous Functions
4722         to this new section.
4723
4724 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4725
4726         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4727         Add missing register.
4728         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4729
4730 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4731
4732         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4733         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4734         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4735
4736 2000-05-31  Andreas Jaeger  <aj@suse.de>
4737
4738         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4739
4740 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4741
4742         * spinlock.c (__pthread_lock): Remove ASSERT.
4743
4744         * Makefile (tests): Add ex8.
4745         * Examples/ex8.c: New file.
4746
4747 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4748
4749         Bugfix: The pthread_atfork mechanism now takes care of its
4750         own internal mutex at fork time.
4751
4752         * ptfork.c (__fork): Revised so that the mutex is held across
4753         the fork operation and while the handlers are called, and so that
4754         the child resets the mutex.
4755
4756         * linuxthreads.texi: Updated pthread_atfork documentation to make
4757         it clear that fork and pthread_atfork can't be reentered from
4758         atfork handlers, that pthread_atfork and fork are mutually atomic,
4759         and that the handlers are inherited by the child process.
4760
4761 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4762
4763         * Makefile (libpthread-routines): Add pspinlock.
4764         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4765         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4766         * condvar.c: Likewise.
4767         * internals.h: Likewise.
4768         * join.c: Likewise.
4769         * manager.c: Likewise.
4770         * mutex.c: Likewise.
4771         * pthread.c: Likewise.
4772         * rwlock.c: Likewise.
4773         * semaphore.c: Likewise.
4774         * signals.c: Likewise.
4775         * spinlock.h: Likewise.
4776         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4777         * sysdeps/alpha/pspinlock.c: New file.
4778         * sysdeps/arm/pspinlock.c: New file.
4779         * sysdeps/i386/pspinlock.c: New file.
4780         * sysdeps/m68k/pspinlock.c: New file.
4781         * sysdeps/mips/pspinlock.c: New file.
4782         * sysdeps/powerpc/pspinlock.c: New file.
4783         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4784         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4785         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4786         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4787
4788 2000-05-24  Andreas Jaeger  <aj@suse.de>
4789
4790         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4791
4792 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4793
4794         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4795
4796 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4797
4798         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4799
4800 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4801
4802         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4803         object state is represented with additional bits which distinguish
4804         whether that state was set up in the current process, or
4805         in an ancestor process. If that state was set in an ancestor,
4806         it means that a fork happened while thread was executing the init
4807         function. In that case, the state is reset to NEVER.
4808         * mutex.c (__pthread_once_fork_prepare): New function.
4809         (__pthread_once_fork_child): Likewise
4810         (__pthread_once_fork_parent): Likewise
4811         (__pthread_reset_pthread_once): Removed.
4812         * ptfork.c (__fork): Call new handlers in mutex.c.
4813         * internals.h: Declarations of new mutex.c functions added.
4814         Declaration of removed function deleted.
4815         * linuxthreads.texi: Updated documentation about pthread_once
4816         to clarify what happens under cancellation and forking.
4817
4818 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4819
4820         * internals.h: New thread manager request type, REQ_KICK.
4821         * join.c (pthread_exit): main thread now calls exit() instead
4822         of _exit() in order to proper process cleanup.
4823         * manager.c (__pthread_manager): Do not terminate manager
4824         after unblocking main thread; wait for main thread's
4825         REQ_PROCESS_EXIT request instead.
4826         Also, added REQ_KICK case to handle new request; this just does
4827         nothing.
4828         * manager.c (pthread_exited): Do not terminate manager after
4829         unblocking main thread.
4830         * manager.c (__pthread_manager_sighandler): If the main thread
4831         is waiting for all other threads to die, send a REQ_KICK into
4832         the thread manager request pipe to get it to clean out the threads
4833         and unblock the main thread as soon as possible. This fixes
4834         the 2000 millisecond hang on shutdown bug.
4835         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4836         including the main one call pthread_exit(), or implicitly do so.
4837         * Makefile (tests): Add ex7.
4838
4839 2000-05-05  Andreas Jaeger  <aj@suse.de>
4840
4841         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4842         (pthread_getcpuclockid): Correct test for ourselves.
4843
4844 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4845
4846         * internals.h (struct _pthread_descr_struct): Reorganization.
4847         Allocate room for 16 pointers at head of the structure for future
4848         thread-local data handling.  Move p_self member in this area.
4849         * manager.c (pthread_handle_create): Adjust use of p_self.
4850         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4851         * pthread.c (__pthread_initial_thread): Adjust initialization.
4852         (__pthread_manager_thread): Likewise.
4853
4854 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4855
4856         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4857         for eventmask larger than 1 word.
4858
4859 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4860
4861         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4862         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4863         minimal initialization.
4864         (pthread_initialize): Remove this code here.
4865         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4866         are working around the problem in glibc.
4867
4868 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4869
4870         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4871         now.  First gcc must be fixed (more concrete: libgcc).
4872
4873 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4874
4875         * pthread.c: Remove special treatement for interrupt handlers on x86.
4876         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4877         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4878         necessary.
4879         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4880
4881 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4882
4883         * join.c (pthread_exit): Set p_terminated after reporting the
4884         termination event instead of before.
4885
4886 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4887
4888         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4889         if __USE_UNIX98.
4890
4891 2000-04-18  Andreas Jaeger  <aj@suse.de>
4892
4893         * Versions: Use ld instead of ld.so.
4894
4895 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4896
4897         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4898         Remove the typedef keyword.
4899
4900 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4901
4902         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4903         not stbar.
4904         (READ_MEMORY_BARRIER): Define.
4905         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4906         MEMORY_BARRIER.
4907         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4908         headers.
4909
4910 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4911
4912         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4913         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4914         use thread_handle().
4915
4916 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4917
4918         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4919         if fast mutex is used.  Don't initialize `already_canceled' twice.
4920         Correctly test for return value of timedsuspend.
4921
4922         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4923         therefore don't need the _rt versions of the signal handlers.
4924
4925 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4926
4927         * pthread.c (pthread_yield): New function.
4928         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4929         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4930         * internals.h: Declare __pthread_yield.
4931
4932         * pthread.c (pthread_initialize): Avoid a bit more code if
4933         realtime signals are known to exist.
4934
4935         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4936         to dynamically detect RT signals and avoid generating compatibility
4937         functions with old kernel.
4938         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4939         __pthread_restart_new directly.
4940         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4941         __pthread_wait_for_restart_signal directly.
4942         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4943         __pthread_timedsuspend_new directly.
4944
4945 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4946
4947         * condvar.c: Remove all the special code to handle cond_timedwait.
4948         Use timedsuspend instead.
4949         * internals.h: Declare __pthread_timedsuspend_old,
4950         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4951         Remove declaration of __pthread_init_condvar.
4952         * pthread.c: Define __pthread_timedsuspend variable.
4953         (__pthread_timedsuspend_old): New function.  Timed suspension
4954         implementation for old Linux kernels.
4955         (__pthread_timedsuspend_new): New function.  Timed suspension
4956         implementation for new Linux kernels.
4957         * restart.h (timedsuspend): New function.  Call appropriate
4958         suspension function through __pthread_timedsuspend.
4959         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4960         the code.
4961         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4962
4963         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4964         undefined.
4965         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4966         where possible.
4967         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4968         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4969
4970         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4971         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4972
4973 2000-04-14  Andreas Jaeger  <aj@suse.de>
4974
4975         * weaks.c: Fix typo.
4976
4977         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4978         2.2 for linuxthreads.
4979
4980 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4981
4982         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4983         (pthread_getcpuclockid): Fix typo.
4984
4985 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4986
4987         * Makefile (libpthread-routines): Add getcpuclockid.
4988         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4989         * sysdeps/pthread/getcpuclockid.c: New file.
4990         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4991         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4992
4993         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4994         Defined.
4995         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4996
4997         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4998         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4999         and pthread_spin_unlock.
5000         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5001         into pthread_spinlock_t.  Change all uses.
5002         * spinlock.c: Implement pthread_spin_lock.
5003         Rename __pthread_unlock to __pthread_spin_unlock and define weak
5004         alias for real name.
5005         Define pthread_spin_trylock, pthread_spin_init, and
5006         pthread_spin_destroy.
5007         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5008         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5009         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5010         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5011         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5012         and pthread_spin_unlock.
5013         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5014         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5015         * condvar.c: Likewise.
5016         * internals.h: Likewise.
5017         * join.c: Likewise.
5018         * manager.c: Likewise.
5019         * mutex.c: Likewise.
5020         * pthread.c: Likewise.
5021         * rwlock.c: Likewise.
5022         * semaphore.c: Likewise.
5023         * signals.c: Likewise.
5024
5025         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5026         macros.
5027         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5028
5029 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5030
5031         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5032         _POSIX_SHARED_MEMORY_OBJECTS.
5033
5034 2000-04-11  Andreas Jaeger  <aj@suse.de>
5035
5036         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5037         (__compare_and_swap): Mark as modifying memory.
5038
5039 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5040
5041         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5042         __volatile__.
5043         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5044         Don't have the 'asm' __volatile__.
5045
5046 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5047
5048         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5049         * spinlock.c (__pthread_lock): Add memory barriers.
5050         (__pthread_unlock): Likewise.
5051         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5052         instruction.
5053         (RELEASE): Not needed anymore.
5054         (__compare_and_swap): Mark asm as modifying memory.
5055         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5056         of MEMORY_BARRIER.
5057         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5058         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5059         (MEMORY_BARRIER): Define using stbar.
5060         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5061         stbar.
5062         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5063         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5064         Mike Burrows <m3b@pa.dec.com>.
5065
5066 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5067
5068         * signals.c (sigaction): Fix return value for the case SIG is one
5069         of the signals the implementation uses.
5070         Patch by Xavier.Leroy@inria.fr.
5071
5072 2000-04-01  Andreas Jaeger  <aj@suse.de>
5073
5074         * attr.c: Use shlib-compat macros.
5075         * oldsemaphore.c: Likewise.
5076         * pthread.c: Likewise.
5077         * weaks.c: Likewise.
5078
5079 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5080
5081         * semaphore.c (sem_timedwait): New function.
5082         Patch by Carl Mailloux <carlm@oricom.ca>.
5083         * semaphore.h: Declare sem_timedwait.
5084         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5085
5086 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5087
5088         * sysdeps/pthread/Makefile: File removed.
5089
5090 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5091
5092         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5093         * internals.h (__pthread_reset_pthread_once): Add prototype.
5094         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5095
5096         * manager.c (pthread_handle_create): Store ID of new thread before
5097         clone call.
5098
5099 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5100
5101         * attr.c: Use new macros from shlib-compat.h to define versions.
5102         * oldsemaphore.c: Likewise.
5103         * semaphore.c: Likewise.
5104         * weaks.c: Likewise.
5105
5106         * pthread.c: Update for new SHLIB_COMPAT definition.
5107
5108         * manager.c (__pthread_manager): Unmask debug signal.
5109
5110         * pthread.c (pthread_initialize): Test for address of __dso_handle
5111         being NULL, not value.  Use __on_exit, not on_exit.
5112         Patch by Andreas Jaeger <aj@suse.de>.
5113
5114         * pthread.c: Use new macros from shlib-compat.h to define versions.
5115
5116 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5117
5118         * pthread.c (pthread_initialize): Instead of on_exit use
5119         __cxa_atexit if __dso_label is available to allow unloading the
5120         libpthread shared library.
5121
5122 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5123
5124         * condvar.c: Make tests for ownership of mutex less strict.
5125
5126 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5127
5128         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5129         current thread and return error if not.
5130         (pthread_cond_timedwait_relative_old): Likewise.
5131         (pthread_cond_timedwait_relative_new): Likewise.
5132
5133         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5134         (pthread_once_cancelhandler): New function.
5135         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5136
5137 2000-03-14  Andreas Jaeger  <aj@suse.de>
5138
5139         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5140         REG_GS.
5141         (pthread_handle_sigrestart_rt): Likewise.
5142         * signals.c (pthread_sighandler_rt): Likewise.
5143
5144 2000-03-02  Andreas Jaeger  <aj@suse.de>
5145
5146         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5147         Reported by Sean Chen <sean.chen@turbolinux.com>.
5148
5149 2000-02-28  Andreas Jaeger  <aj@suse.de>
5150
5151         * rwlock.c: Fix typo.
5152
5153 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5154
5155         * rwlock.c: Define __* variants of the functions and make old names
5156         aliases.
5157         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5158         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5159
5160 2000-02-25  Andreas Jaeger  <aj@suse.de>
5161
5162         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5163         pwrite64, lseek64, open64, and __open64 with version 2.2.
5164
5165 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5166
5167         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5168
5169 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5170
5171         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5172         nanosleep does not work either.  Get absolute time inside the
5173         loop.
5174         (pthread_cond_timedwait_relative_new): Likewise.
5175         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5176
5177 2000-02-13  Andreas Jaeger  <aj@suse.de>
5178
5179         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5180         (pthread_cond_timedwait_relative_old): Likewise.
5181
5182 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5183
5184         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5185         but keep the code around.  A bug in the kernel prevent us from
5186         using the code.
5187         (pthread_cond_timedwait_relative_new): Likewise.
5188         (PR libc/1597 and libc/1598).
5189
5190 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5191
5192         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5193         loop around nanosleep calls instead of around most of the function
5194         (pthread_cond_timedwait_relative_new): Likewise.
5195         body.  Got rid of backwards goto and one local.
5196
5197 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5198
5199         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5200         before every nanosleep call to account for time spent in the rest
5201         of the function.
5202         (pthread_cond_timedwait_relative_new): Likewise.
5203         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5204
5205 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5206
5207         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5208         from nanosleep call so that in case we restart we only wait for the
5209         remaining time.
5210         (pthread_cond_timedwait_relative_new): Likewise.
5211         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5212
5213 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5214
5215         * manager.c (pthread_allocate_stack): Compute guard page address
5216         correctly.  Patch by HJ Lu.
5217
5218         * sysdeps/pthread/pthread.h: Define
5219         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5220
5221 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5222
5223         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5224         preference handling.
5225         (pthread_rwlockattr_setkind_np): Allow
5226         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5227         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5228
5229 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5230
5231         * internals.h (pthread_readlock_info): New structure.
5232         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5233         p_untracked_readlock_count.
5234         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5235         Add initializers for new fields.
5236         * manager.c (pthread_free): Free read/write lock lists.
5237         * queue.h (queue_is_empty): New function.
5238         * rwlock.c: Implement requirements about when readers should get
5239         locks assigned.
5240         * sysdeps/pthread/pthread.h
5241         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5242         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5243         Define this name as well.
5244         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5245
5246 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5247
5248         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5249         Adjust initializers for struct _pthread_descr_struct change.
5250         * internals.h (struct _pthread_descr_struct): Move new elements to
5251         the end.
5252
5253 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5254
5255         Redesigned how cancellation unblocks a thread from internal
5256         cancellation points (sem_wait, pthread_join,
5257         pthread_cond_{wait,timedwait}).
5258         Cancellation won't eat a signal in any of these functions
5259         (*required* by POSIX and Single Unix Spec!).
5260         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5261         simultaneous condition variable signal (not required by POSIX
5262         or Single Unix Spec, but nice).
5263         * spinlock.c: __pthread_lock queues back any received restarts
5264         that don't belong to it instead of assuming ownership of lock
5265         upon any restart; fastlock can no longer be acquired by two threads
5266         simultaneously.
5267         * restart.h: Restarts queue even on kernels that don't have
5268         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5269         avoiding a rare race condition in pthread_cond_timedwait.
5270
5271 1999-12-31  Andreas Jaeger  <aj@suse.de>
5272
5273         * internals.h: Remove duplicate prototype declarations.
5274
5275         * weaks.c: Remove __THROW from prototypes since the file is not
5276         compiled by a C++ compiler.
5277         * internals.h: Likewise.
5278
5279 1999-12-30  Andreas Jaeger  <aj@suse.de>
5280
5281         * sysdeps/pthread/pthread.h: Move internal functions to...
5282         * sysdeps/pthread/bits/libc-lock.h: ...here.
5283
5284 1999-12-29  Andreas Jaeger  <aj@suse.de>
5285
5286         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5287
5288 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5289
5290         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5291         beginning.
5292
5293         * manager.c (__pthread_start): Add one more cast to prevent
5294         warning on 64bit machines.
5295
5296 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5297
5298         * manager.c (pthread_handle_create): Set p_pid of new thread
5299         before calling the callback function to report a new thread.
5300
5301 1999-12-20  Andreas Jaeger  <aj@suse.de>
5302
5303         * pthread.c (pthread_initialize): Move getrlimit call after
5304         setting of errno.
5305
5306 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5307
5308         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5309         pwrite64, lseek64, open64, and __open64.
5310         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5311         pwrite64, lseek64, open64, and __open64.
5312
5313         * manager.c (pthread_allocate_stack): Correct computation of
5314         new_thread_bottom.  Correct handling of stack size and when the
5315         rlimit method to guard for stack growth is used.
5316         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5317         minus one pagesize (not two).
5318
5319 1999-12-03  Andreas Jaeger  <aj@suse.de>
5320
5321         * Versions: Add __res_state with version GLIBC_2.2.
5322
5323         * errno.c (__res_state): New function to return thread specific
5324         resolver state.
5325
5326         * pthread.c (pthread_initialize): Initialize p_resp.
5327         (__pthread_reset_main_thread): Also set p_resp.
5328
5329         * manager.c (pthread_handle_create): Initialize p_resp.
5330
5331         * internals.h: Add thread specific resolver state.
5332         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5333
5334 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5335
5336         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5337         beginning.
5338         * sysdeps/i386/i686/pt-machine.h: Likewise.
5339         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5340
5341 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5342
5343         * manager.c (pthread_start_thread_event): Initialize p_pid already
5344         here.
5345
5346 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5347
5348         * internals.h: Add prototype for __pthread_manager_event.
5349         * manager.c (__pthread_manager_event): New function.
5350         (pthread_start_thread_event): Correct computation of self.
5351         Use INIT_THREAD_SELF.
5352         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5353         (__pthread_initialize_manager): Respect event flags also for creation
5354         of the manager thread.
5355
5356 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5357
5358         * pthread.c (__pthread_initialize_manager): Initialize
5359         __pthread_manager_thread.p_tid.
5360
5361 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5362
5363         * internals.h: Declare __pthread_last_event.
5364         * manager.c: Define __pthread_last_event.
5365         (pthread_handle_create): Set __pthread_last_event.
5366         (pthread_exited): Likewise.
5367         * join.c (pthread_exit): Likewise.
5368
5369         * Makefile (libpthread-routines): Add events.
5370         * events.c: New file.
5371         * internals.h: Protect against multiple inclusion.
5372         Include thread_dbP.h header.
5373         (struct _pthread_descr_struct): Add new fields p_report_events and
5374         p_eventbuf.
5375         Declare event reporting functions.
5376         * join.c (pthread_exit): Signal event if this is wanted.
5377         * manager.c (__pthread_threads_events): New variable.
5378         (pthread_handle_create): Take new parameters with event information.
5379         Signal TD_CREATE event if wanted.
5380         (__pthread_manager): Adjust pthread_handle_create call.
5381         (pthread_start_thread_event): New function.  Block until manager is
5382         finished and then call pthread_start_thread.
5383         (pthread_exited): Signal TD_REAP event if wanted.
5384
5385 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5386
5387         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5388
5389         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5390
5391 1999-10-25  Andreas Jaeger  <aj@suse.de>
5392
5393         * internals.h: Remove K&R compatibility.
5394         * no-tsd.c: Likewise.
5395         * semaphore.h: Likewise.
5396         * signals.c: Likewise.
5397         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5398         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5399         * weaks.c: Likewise.
5400
5401 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5402
5403         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5404         pthread_handle_sigcancel with functions that restore %gs from the
5405         signal context.  For each signal handling function, two wrappers
5406         are required, one for a non-RT signal and one for a RT signal.
5407         * signal.c: For i386, add code to restore %gs from the signal
5408         context in pthread_sighandler and pthread_sighandler_rt.
5409
5410 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5411
5412         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5413
5414 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5415
5416         * pthread.c (__pthread_initial_thread): Pass argument to
5417         PTHREAD_START_ARGS_INITIALIZER.
5418         (__pthread_manager_thread): Likewise.
5419
5420         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5421         initialize function.
5422
5423         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5424
5425         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5426
5427 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5428
5429         * internals.h: Correct return types for __libc_read and __libc_write.
5430
5431 1999-10-09  Andreas Jaeger  <aj@suse.de>
5432
5433         * internals.h: Add __new_sem_post to get prototype in
5434         manager.c; include semaphore.h for needed types.
5435
5436 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5437
5438         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5439         directly instead of calling sem_post which should not be necessary
5440         but is faster and might help in some case to work around problems.
5441         Patch by khendricks@ivey.uwo.ca [libc/1382].
5442
5443 1999-10-08  Andreas Schwab  <schwab@suse.de>
5444
5445         * sysdeps/pthread/Subdirs: New file.
5446         * Implies: Removed.
5447
5448 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5449
5450         * Implies: New file.
5451         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5452         * manager.c (pthread_handle_create): Initialize p_startfct.
5453         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5454
5455 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5456
5457         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5458         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5459         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5460
5461         * condvar.c (pthread_cond_timedwait_relative): Never return with
5462         EINTR.  Patch by Andreas Schwab.
5463
5464 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5465
5466         * signals.c (sigaction): Correct last patch.  Don't select
5467         pthread_sighandler_rt based on the signal number but instead of
5468         the SA_SIGINFO flag.
5469
5470 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5471
5472         * specific.c: Move definitions of struct pthread_key_struct and
5473         destr_function to ...
5474         * internals.h: ...here.
5475
5476 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5477
5478         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5479         this instead of pthread_handle_sigrestart if the signal is an RT
5480         signal.
5481
5482         * signals.c: Handle passing through of sighandler arguments also
5483         for real-time signals.
5484
5485 1999-09-03  Andreas Schwab  <schwab@suse.de>
5486
5487         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5488         fork as weak alias.
5489         (__vfork): New function, alias vfork.
5490         * Versions: Export __fork, vfork, and __vfork in libpthread.
5491
5492 1999-08-23  Andreas Schwab  <schwab@suse.de>
5493
5494         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5495         call to signal handler.
5496
5497 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5498
5499         * pthread.c (__pthread_reset_main_thread): Undo last change.
5500         (__pthread_kill_other_threads_np): Reset signal handlers for the
5501         signals we used in the thread implementation here.
5502
5503 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5504
5505         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5506         for the signals we used in the thread implementation [PR libc/1234].
5507
5508         * Versions: Export __pthread_kill_other_threads_np from libpthread
5509         for GLIBC_2.1.2.
5510
5511         * signals.c: Pass sigcontext through wrapper to the user function.
5512
5513 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5514
5515         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5516         __libc_internal_tsd_set.
5517
5518 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5519
5520         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5521         needed anymore.
5522
5523 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5524
5525         * internals.h: Align _pthread_descr_struct to 32 bytes.
5526         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5527         libc/1206.
5528
5529 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5530
5531         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5532         swap function.
5533
5534 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5535
5536         * Makefile (libpthread-routines): Add oldsemaphore routine.
5537         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5538         sem_trywait, and sem_wait to GLIBC_2.1.
5539         * oldsemaphore.c: New file.
5540         * semaphore.c: Add default_symbol_versions for the changed functions.
5541         (__new_sem_init): Rename from sem_init.
5542         (__new_sem_post): Rename from sem_post.
5543         (__new_sem_wait): Rename from sem_wait.
5544         (__new_sem_trywait): Rename from sem_trywait.
5545         (__new_sem_getvalue): Rename from sem_getvalue.
5546         (__new_sem_destroy): Rename from sem_destroy.
5547
5548 1999-06-23  Robey Pointer  <robey@netscape.com>
5549
5550         * internals.h: Added p_nextlock entry to separate queueing for a
5551         lock from queueing for a CV (sometimes a thread queues on a lock
5552         to serialize removing itself from a CV queue).
5553         * pthread.c: Added p_nextlock to initializers.
5554         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5555
5556 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5557
5558         * manager.c (pthread_handle_create): Free mmap region after stack
5559         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5560
5561 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5562
5563         * man/pthread_cond_init.man: Correct example.
5564         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5565
5566         * linuxthreads.texi (Condition Variables): Likewise.
5567
5568 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5569
5570         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5571         casx not cas, also successful casx returns the old value in rd
5572         and not the new value.
5573
5574 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5575
5576         * manager.c: If pthread_create() is given a NULL attribute
5577         and the thread manager runs with a realtime policy, set the
5578         scheduling policy of the newly created thread back to SCHED_OTHER.
5579         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5580         initialize the schedpolicy field of new_thread->p_start_args
5581         to that of the calling thread.
5582
5583 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5584
5585         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5586         instruction does not allow memory element to use offset.
5587
5588 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5589
5590         * manager.c (pthread_allocate_stack): Optimize initialization of new
5591         thread descriptor.
5592
5593         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5594         Don't use initializer since it is all zeroes.
5595         (__libc_once_define): Likewise.
5596
5597 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5598
5599         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5600         doesn't exist anymore.
5601         * sysdeps/i386/Implies: Likewise.
5602         * sysdeps/m68k/Implies: Likewise.
5603         * sysdeps/mips/Implies: Likewise.
5604         * sysdeps/powerpc/Implies: Likewise.
5605         * sysdeps/sparc/sparc32/Implies: Likewise.
5606         * sysdeps/sparc/sparc64/Implies: Likewise.
5607
5608 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5609
5610         * sysdeps/alpha/bits/semaphore.h: Removed.
5611         * sysdeps/powerpc/bits/semaphore.h: Removed.
5612         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5613         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5614         * Makefile (headers): Remove bits/semaphore.h.
5615
5616         * semaphore.h: Define _pthread_descr if necessary.
5617         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5618         Define SEM_FAILED.
5619         (sem_t): Protect element names with leading __.
5620         Add declarations for sem_close, sem_open, and sem_unlink.
5621         * semaphore.c: Adjust all functions for new element names.
5622         Define sem_close, sem_open, and sem_unlink.
5623         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5624         GLIBC_2.1.1.
5625         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5626         necessary.
5627
5628 1999-03-16  H.J. Lu  <hjl@gnu.org>
5629
5630         * specific.c (pthread_key_delete): Check th->p_terminated to see
5631         if the thread is running.
5632
5633         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5634         Added to GLIBC_2.0 for libc.so.
5635
5636 1999-02-12  H.J. Lu  <hjl@gnu.org>
5637
5638         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5639         __libc_allocate_rtsig): Added to GLIBC_2.1.
5640
5641         * internals.h (DEFAULT_SIG_RESTART): Removed.
5642         (DEFAULT_SIG_CANCEL): Removed.
5643
5644         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5645         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5646         (__pthread_sig_restart, __pthread_sig_cancel,
5647         __pthread_sig_debug): Initialized.
5648         (pthread_initialize): Call init_rtsigs () to initialize
5649         real-time signals.
5650
5651 1999-02-03  H.J. Lu  <hjl@gnu.org>
5652
5653         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5654         Don't restart the thread which sent REQ_DEBUG.
5655         (pthread_start_thread): Check if __pthread_sig_debug > 0
5656         before debugging.
5657
5658         * pthread.c (__pthread_initialize_manager): Suspend ourself
5659         after sending __pthread_sig_debug to gdb instead of
5660         __pthread_sig_cancel.
5661
5662 1999-01-24  H.J. Lu  <hjl@gnu.org>
5663
5664         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5665         from mask if __pthread_sig_debug > 0.
5666         (pthread_handle_create): Increment __pthread_handles_num.
5667
5668         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5669         * pthread.c (__pthread_initialize_manager): Likewise.
5670
5671         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5672         instead of __libc_allocate_rtsig (2).
5673         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5674         instead of __pthread_sig_cancel.
5675         (pthread_handle_sigdebug): Fix comments.
5676
5677 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5678
5679         * manager.c (pthread_allocate_stack): Set
5680         __pthread_nonstandard_stacks if user-specified stack is used.
5681
5682 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5683
5684         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5685         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5686
5687 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5688
5689         * pthread.c: Use a third signal __pthread_sig_debug distinct
5690         from __pthread_sig_cancel to notify gdb when a thread is
5691         created
5692         * manager.c: Likewise.
5693         * internals.h: Likewise.
5694         * signals.c: The implementation of sigwait(s) assumed that
5695         all signals in s have signal handlers already attached.
5696         This is not required by the standard, so make it work
5697         also if some of the signals have no handlers.
5698
5699 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5700
5701         * linuxthreads.texi: Remove pointers from first @node.  Move old
5702         @node spec inside comment.
5703
5704 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5705
5706         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5707         _IO_lock_unlock.
5708
5709 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5710
5711         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5712         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5713
5714 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5715
5716         * manager.c: Threads now send __pthread_sig_cancel on termination.
5717         Change clone call and signal masks.
5718         * thread.c (pthread_handle_sigrestart): Remove special code for
5719         manager.
5720         (pthread_handle_sigcancel): In manager thread call
5721         __pthread_manager_sighandler.
5722         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5723         * sysdeps/i386/i686/pt-machine.h: Likewise.
5724         Patches by Xavier Leroy.
5725
5726 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5727
5728         * spinlock.c (__pthread_unlock): Don't crash if called for an
5729         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5730
5731         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5732         overall runtime.
5733
5734 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5735
5736         * Examples/ex3.c: Wait until all threads are started before
5737         searching for the number to avoid race condition on very fast
5738         systems.
5739
5740 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5741
5742         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5743         declaration since it's not needed.
5744
5745         * sysdeps/pthread/pthread.h: Move internal functions to ...
5746         * internals.h: ...here.
5747
5748 1998-12-02  H.J. Lu  <hjl@gnu.org>
5749
5750         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5751         SIGRTMIN is defined.
5752         (__pthread_sig_cancel): Likewise.
5753
5754 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5755
5756         * wrapsyscall.c: Include <sys/mman.h> for msync,
5757         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5758         Correct msync declaration.
5759
5760 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5761
5762         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5763         __libc_tsd_set): New macros for new interface.
5764         * no-tsd.c: New file, provide uninitialized defns of
5765         __libc_internal_tsd_get and __libc_internal_tsd_set.
5766         * Makefile (routines): Add no-tsd.
5767
5768 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5769
5770         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5771         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5772         __libc_internal_tsd_set): Move decls to ...
5773         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5774         declarations.
5775
5776         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5777         __libc_internal_tsd_set): Make these pointers to functions, not
5778         functions; remove #pragma weak decls for them.
5779         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5780         Define static functions and initialized pointers to them.
5781
5782 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5783
5784         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5785         (CFLAGS-specific.c): Likewise.
5786         (CFLAGS-pthread.c): Likewise.
5787         (CFLAGS-ptfork.c): Likewise.
5788         (CFLAGS-cancel.c): Likewise.
5789         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5790         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5791
5792         * mutex.c (pthread_mutex_init): Define as strong symbol.
5793         (pthread_mutex_destroy): Likewise.
5794         (pthread_mutex_trylock): Likewise.
5795         (pthread_mutex_lock): Likewise.
5796         (pthread_mutex_unlock): Likewise.
5797         (pthread_mutexattr_init): Likewise.
5798         (pthread_mutexattr_destroy): Likewise.
5799         (pthread_once): Likewise.
5800         * ptfork.c (pthread_atfork): Likewise.
5801         * specific.c (pthread_key_create): Likewise.
5802         (pthread_setspecific): Likewise.
5803         (pthread_getspecific): Likewise.
5804
5805 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5806
5807         * linuxthreads.texi: Fix punctuation after xref.
5808
5809 1998-11-10  H.J. Lu  <hjl@gnu.org>
5810
5811         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5812         if it is defined in <linux/limits.h>.
5813
5814 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5815
5816         * spinlock.h (__pthread_trylock): Define inline.
5817         (__pthread_lock): Add extra parameter to declaration.  Declare
5818         using internal_function.
5819         (__pthread_unlock): Declare using internal_function.
5820         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5821         of local variable self.  Avoid recomputing self.  Define using
5822         internal_function.
5823         (__pthread_trylock): Remove.
5824         (__pthread_unlock): Define using internal_function.
5825         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5826         computed self value is possible.
5827         * condvar.c: Likewise.
5828         * join.c: Likewise.
5829         * manager.c: Likewise.
5830         * mutex.c: Likewise.
5831         * pthread.c: Likewise.
5832         * rwlock.c: Likewise.
5833         * semaphore.c: Likewise.
5834         * signals.c: Likewise.
5835
5836 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5837
5838         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5839         __ to field names of the struct.
5840         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5841         Likewise.
5842         (pthread_attr_t): Likewise.
5843         (pthread_cond_t): Likewise.
5844         (pthread_condattr_t): Likewise.
5845         (pthread_mutex_t): Likewise.
5846         (pthread_mutexattr_t): Likewise.
5847         (pthread_rwlock_t): Likewise.
5848         (pthread_rwlockattr_t): Likewise.
5849         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5850         * cancel.c: Likewise.
5851         * condvar.c: Likewise.
5852         * manager.c: Likewise.
5853         * mutex.c: Likewise.
5854         * pthread.c: Likewise.
5855         * ptlongjmp.c: Likewise.
5856         * rwlock.c: Likewise.
5857         * spinlock.c: Likewise.
5858
5859 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5860
5861         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5862         also with PT_EI.
5863
5864         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5865         definitions.
5866
5867         * Makefile (libpthread-routines): Add pt-machine.
5868         * pt-machine.c: New file.
5869         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5870         yet defined.  Use PT_EI in extern inline definitions.
5871         * sysdeps/arm/pt-machine.h: Likewise.
5872         * sysdeps/i386/pt-machine.h: Likewise.
5873         * sysdeps/i386/i686/pt-machine.h: Likewise.
5874         * sysdeps/m68k/pt-machine.h: Likewise.
5875         * sysdeps/mips/pt-machine.h: Likewise.
5876         * sysdeps/powerpc/pt-machine.h: Likewise.
5877         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5878         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5879
5880 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5881
5882         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5883         is declared.
5884
5885 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5886
5887         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5888         argument.
5889         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5890
5891 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5892
5893         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5894         guard.
5895
5896 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5897
5898         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5899         array index overflow.
5900
5901 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5902
5903         * sysdeps/pthread/semaphore.h: New file.
5904
5905 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5906
5907         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5908         _LIBC_TSD_KEY_DL_ERROR.
5909
5910 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5911
5912         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5913         * sysdeps/i386/pt-machine.h: Likewise.
5914         Suggested by Roland McGrath.
5915
5916 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5917
5918         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5919         access thread data with non-constant offsets.
5920         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5921         necessary.
5922
5923         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5924         THREAD_SETMEM_NC definitions.
5925
5926         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5927         THREAD_SETMEM_NC.
5928         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5929
5930 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5931
5932         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5933         not already defined.
5934         (struct _pthread_descr_struct): Add p_self and p_nr field.
5935         * manager.c (__pthread_handles): Define second element to point
5936         to manager thread.
5937         (__pthread_handles_num): Initialize to 2.
5938         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5939         (pthread_start_thread): Likewise.
5940         (pthread_handle_create): Start search for free slot at entry 2.
5941         Initialize new fields p_self and p_nr.
5942         Call __clone with CLONE_PTRACE if available.
5943         (pthread_free): Call FREE_THREAD_SELF if available.
5944         * pthread.c (__pthread_initial_thread): Initialize new fields.
5945         (__pthread_manager_thread): Likewise.
5946         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5947
5948         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5949         elements of the thread descriptor.
5950         * condvar.c: Likewise.
5951         * errno.c: Likewise.
5952         * join.c: Likewise.
5953         * manager.c: Likewise.
5954         * pthread.c: Likewise.
5955         * ptlongjmp.c: Likewise.
5956         * semaphore.c: Likewise.
5957         * signals.c: Likewise.
5958         * specific.c: Likewise.
5959         * spinlock.c: Likewise.
5960
5961         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5962
5963         * sysdeps/i386/useldt.h: New file.
5964         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5965
5966         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5967         THREAD_SETMEM using __thread_self.
5968         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5969
5970 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5971
5972         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5973         turned out that we didn't need to queue after all.
5974
5975 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5976
5977         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5978         and wastes space; correct types.
5979
5980 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5981
5982         * signals.c (sigaction): Handle NULL argument.
5983
5984 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5985
5986         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5987         of sigset_t.
5988
5989 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5990
5991         * Makefile (linuxthreads-version): Extract correct number from
5992         Banner.
5993
5994 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5995
5996         * Banner: Bump version number to 0.8
5997         * FAQ.html: Many updates, in particular w.r.t. debugging.
5998         * manager.c: Support for non-default stacksize for
5999         LinuxThreads-allocated stacks;
6000         don't use guard pages for stacks with default size, rely on
6001         rlimit(RLIMIT_STACK) instead (it's cheaper).
6002         * attr.c: Likewise.
6003         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6004         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6005         * condvar.c: Likewise.
6006         * internals.h: Likewise.
6007         * restart.h: Likewise.
6008         * signals.c: Likewise.
6009         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6010
6011 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6012
6013         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6014         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
6015         * Versions: Put __pthread_mutexattr_settype under version
6016         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
6017         __pthread_mutexattr_gettype.
6018
6019 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6020
6021         * sysdeps/pthread/bits/libc-lock.h: Make
6022         __pthread_mutexattr_settype weak.  Don't make
6023         __pthread_mutexattr_setkind_np weak.
6024
6025 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
6026
6027         * manager.c (pthread_handle_create): Check whether sched_setscheduler
6028         call can succeed here.
6029
6030         * mutex.c: Define __pthread_mutexattr_settype and make
6031         __pthread_mutexattr_setkind_np an alias.
6032         Likewise for __pthread_mutexattr_gettype.
6033
6034 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6035
6036         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6037         is root.
6038
6039 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6040
6041         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6042
6043 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6044
6045         * Examples/ex6.c: Include <unistd.h> for usleep.
6046
6047 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6048
6049         * Examples/ex4.c (main): Use exit, not pthread_exit.
6050
6051 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6052
6053         * Versions: Add __pthread_mutexattr_gettype and
6054         __pthread_mutexattr_settype.
6055         * lockfile.c: Use __pthread_mutexattr_settype instead of
6056         __pthread_mutexattr_setkind_np.
6057         * mutex.c: Define __pthread_mutexattr_gettype and
6058         __pthread_mutexattr_settype.
6059         * weak.c: Likewise.
6060         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6061         __pthread_mutexattr_settype.
6062         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6063         Use __pthread_mutexattr_settype.
6064
6065 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6066
6067         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6068         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6069         pthread_mutexattr_settype.
6070         * sysdeps/pthread/pthread.h: Declare these functions.
6071         Move pthread_sigmask and pthread_kill declaration in separate header.
6072         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6073
6074 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6075
6076         * Makefile: Add rules to compile and run tests.
6077         * Examples/ex1.c: Little changes to fix warnings.
6078         * Examples/ex2.c: Likewise.
6079         * Examples/ex3.c: Likewise.
6080         * Examples/ex4.c: Likewise.
6081         * Examples/ex5.c: Likewise.
6082         * Examples/ex6.c: New file.
6083
6084 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6085
6086         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6087
6088 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6089
6090         * attr.c: Include <string.h>.
6091
6092 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6093
6094         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6095         * internals.h: Include limits.h.
6096         * manager.c: Use memcpy to copy sched_param.
6097         * ptfork.c: Include errno.h.
6098         * pthread.c: Likewise.
6099         * semaphore.c: Likewise.
6100         * specific.c: Likewise.
6101         * spinlock.h: Likewise.
6102         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6103         type definition to ...
6104         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6105
6106 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6107
6108         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6109
6110         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6111         as macros as demanded in POSIX.1, Annex C.
6112
6113 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6114
6115         * internals.h (struct pthread_request): For free use pthread_t
6116         instead of pthread_descr.
6117         * join.c (pthread_join): Pass thread_id, not th to manager.
6118         (pthread_detach): Likewise.
6119         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6120         (pthread_exited): Remove detached queue code.
6121         (pthread_handle_free): Expect thread ID parameter and use it to
6122         validate the thread decsriptor.  Don't use detached queue.
6123         Patches by Xavier Leroy.
6124
6125 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6126
6127         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6128         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6129         __pthread_atfork, __pthread_key_create, __pthread_once.
6130         * internals.h: Doc fix.
6131         * pthread.c (__pthread_initialize): Define again.
6132
6133 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6134
6135         * manager.c (pthread_exited): If thread is not detached put it on
6136         special list.
6137         (pthread_handle_free): If thread is not on list with living threads
6138         search on list with detached threads.
6139
6140         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6141         for new definition of pthread_rwlock_t.
6142
6143         * spinlock.c: Correct test whether to compile
6144         __pthread_compare_and_swap or not.
6145
6146 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6147
6148         * attr.c: Finish user stack support.  Change locking code to be safe
6149         in situations with different priorities.
6150         * cancel.c: Likewise.
6151         * condvar.c: Likewise.
6152         * internals.h: Likewise.
6153         * join.c: Likewise.
6154         * manager.c: Likewise.
6155         * mutex.c: Likewise.
6156         * pthread.c: Likewise.
6157         * ptlongjmp.c: Likewise.
6158         * queue.h: Likewise.
6159         * rwlock.c: Likewise.
6160         * semaphore.c: Likewise.
6161         * semaphore.h: Likewise.
6162         * signals.c: Likewise.
6163         * spinlock.c: Likewise.
6164         * spinlock.h: Likewise.
6165         * sysdeps/pthread/pthread.h: Likewise.
6166         Patches by Xavier Leroy.
6167
6168         * sysdeps/i386/i686/pt-machine.h: New file.
6169
6170 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6171
6172         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6173         [sg]et_stackaddr prototypes always available.
6174
6175         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6176         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6177
6178 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6179
6180         * manager.c (pthread_free): Undo patch from 980430.
6181         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6182
6183 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6184
6185         * manager.c: Define __pthread_manager_adjust_prio and use it to
6186         increase priority when needed.
6187         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6188         * mutex.c: Optimize mutexes to wake up only one thread.
6189         * pthread.c: Move PID of manager for global variable in structure
6190         element.
6191         Patches by Xavier Leroy.
6192
6193 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6194
6195         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6196
6197 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6198
6199         * attr.c: Correct typo.
6200
6201 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6202
6203         * manager.c (pthread_free): Unmap guard before the stack.
6204         Patch by Matthias Urlichs.
6205
6206 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6207
6208         * manager.c (pthread_free): Detect already free child.
6209         Patch by Xavier Leroy, reported by Matthias Urlichs.
6210
6211 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6212
6213         * Makefile (linuxthreads-version): Renamed back from
6214         libpthread-version.
6215
6216 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6217
6218         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6219         __libc_longjmp.
6220
6221 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6222
6223         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6224         * internals.h: Add definitions for new spinlock implementation.
6225         * ptlongjmp.c: New file.
6226         * spinlock.c: New file.
6227         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6228         new function __pthread_acquire to prevent deadlocks with thread
6229         with different priorities.
6230         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6231
6232 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6233
6234         * manager.c (__pthread_manager): Reduce first argument to select
6235         to include just the needed file descriptor.
6236
6237 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6238
6239         * manager.c: Fix last patch which caused core dumps.
6240
6241         * pthread.c: Correctly handle missing SIGRTMIN.
6242
6243 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6244
6245         * libpthread.map: Add __libc_internal_tsd_get and
6246         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6247         libc internal versions of the cancelable functions.
6248
6249 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6250
6251         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6252
6253 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6254
6255         * attr.c: Implement pthread_attr_[gs]etguardsize,
6256         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6257         Change pthread_attr_init to have two interfaces.
6258         * internals.h (struct _pthread_descr_struct): Add new fields for
6259         above functions.
6260         * libpthread.map: Add names in GLIBC_2.1 section.
6261         * manager.c (pthread_handle_create): Implement guardsize and
6262         user stack.
6263         (pthread_free): Likewise.
6264         * pthread.c (pthread_create): Add new interface for changed
6265         pthread_attr_t.
6266         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6267         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6268         PTHREAD_STACK_MIN.
6269
6270 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6271
6272         * manager.c: Enable resetting of the thread scheduling policy
6273         to SCHED_OTHER when the parent thread has a different one.
6274
6275 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6276
6277         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6278         _POSIX_ASYNCHRONOUS_IO.
6279
6280         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6281         mutexes.
6282         * mutex.c: Implement new mutex types.
6283
6284         * internals.h: Include <signal.h>.
6285
6286         * libpthread.map: Add __erno_location and __h_errno_location.
6287
6288         * errno.c: Return pointer to variable actually in use.  This might
6289         not be the one in the thread structure.
6290         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6291         and p_h_errnop.
6292         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6293         of manager thread structure.
6294         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6295         thread.
6296         * pthread.c: Adapt initializer for thread structures.
6297         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6298         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6299         current thread to global variables.
6300
6301 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6302
6303         * rwlock.c: New file.
6304         * Makefile (libpthread-routines): Add rwlock.
6305         * sysdeps/pthread/pthread.h: Define data structures and declare
6306         functions.
6307         * libpthread.map: Add new functions.
6308
6309 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6310
6311         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6312         * sysdeps/arm/Implies: likewise.
6313         * README: Document it.
6314
6315 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6316
6317         * signals.c: Remove unneeded initializer for sigwaited, saving a
6318         warning.
6319
6320 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6321
6322         * semaphore.c (sem_init): Set sem_spinlock only if available.
6323
6324 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6325
6326         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6327         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6328
6329         * Makefile: Update from LinuxThreads 0.7.
6330         * internals.h. Likewise.
6331         * manager.c: Likewise.
6332         * mutex.c: Likewise.
6333         * pthread.c: Likewise.
6334         * signals.c: Likewise.
6335         * specific.c: Likewise.
6336         * Examples/ex3.c: Likewise.
6337
6338 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6339
6340         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6341         open.
6342
6343 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6344
6345         * wrapsyscall.c: Add socket functions which are also cancelation
6346         points.
6347
6348 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6349
6350         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6351         New functions for fast thread specific data within libc.
6352
6353         * internals.h: Add new array p_libc_specific to struct
6354         _pthread_descr_struct.
6355
6356         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6357
6358 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6359
6360         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6361         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6362
6363 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6364
6365         * internals.h (struct _pthread_descr_struct): Add definitions for
6366         two-level specific key handling.
6367         * manager.c (pthread_handle_create): Initialize specific memory array.
6368         * specific.c: Implement two-level key handling.
6369         * weaks.c: Don't provide dummy key handling.
6370         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6371         Add definition of __libc_key_t.
6372         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6373         as 1024.
6374         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6375         PTHREAD_DESTRUCTOR_ITERATIONS.
6376
6377         * manager.c (pthread_handle_create): Compare mmap result with
6378         MAP_FAILED.
6379
6380         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6381         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6382
6383 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6384
6385         sysdeps/sparc -> sysdeps/sparc/sparc32
6386         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6387
6388         * internals.h: Change definition of THREAD_SELF to be an expression,
6389         not a statement that did a return.
6390         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6391         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6392         Follow Solaris and use a "system reserved" register (%g6) to hold
6393         the thread descriptor.
6394         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6395
6396 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6397
6398         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6399         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6400         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6401
6402         * semaphore.c: Include spinlock.h only when needed.
6403
6404         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6405         keys for entries not in use.
6406
6407         * weaks.c: Implement key handling functions for real.
6408
6409 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6410
6411         Initial sparc64-linux support:
6412         * sysdeps/sparc64/Implies: New file.
6413         * sysdeps/sparc64/pt-machine.h: Likewise.
6414
6415 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6416
6417         * semaphore.c: Include spinlock.h at correct place.
6418         Patch by HJ Lu.
6419
6420 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6421
6422         The Great Bit File Move:
6423         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6424         * sysdeps/powerpc/semaphorebits.h: Likewise.
6425         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6426         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6427         * sysdeps/pthread/libc-lock.h: -> bits/
6428         * sysdeps/pthread/stdio-lock.h: Likewise.
6429         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6430         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6431         * semaphore.h: Likewise.
6432         * sysdeps/pthread/pthread.h: Likewise.
6433
6434         * lockfile.c: <foo.h> -> <bits/foo.h>.
6435         * semaphore.h: Likewise.
6436
6437         * Makefile: (headers): foo.h -> bits/foo.h.
6438         * sysdeps/pthread/Makefile: Likewise.
6439
6440 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6441
6442         * semaphore.c (sem_init): Set sem_spinlock only if available.
6443
6444         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6445         asm constraints.
6446
6447 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6448
6449         Update from LinuxThreads 0.6.
6450
6451         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6452         and __sched_get_priority_min instead of names without `__'.
6453
6454         * manager.c: Rewrite large parts to implement opaque pthread_t.
6455
6456         * cancel.c: Adapt for opaque pthread_t type.
6457         * condvar.c: Likewise.
6458         * errno.c: Likewise.
6459         * join.c: Likewise.
6460         * mutex.c: Likewise.
6461         * pthread.c: Likewise.
6462         * signals.c: Likewise.
6463         * specific.c: Likewise.
6464         * restart.h: Likewise.
6465         * queue.h: Likewise.
6466         * Examples/ex3.c: Likewise.
6467         * Examples/ex4.c: Likewise.
6468         * sysdeps/pthread/pthread.h: Likewise.
6469
6470         * pthread.c: Accumulate time for all threads in thread manager.
6471
6472         * semaphore.c: Implement fallback implementation for architectures
6473         sometimes missing compare-exchange operations.
6474
6475         * cancel.c (pthread_cancel): Validate handle argument.
6476         * join.c (pthread_join): Likewise.
6477         (pthread_detach): Likewise.
6478         * signals.c (pthread_kill): Likewise.
6479
6480         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6481
6482         * queue.h (enqueue): Enqueue thread according to priority.
6483
6484         * internals.c (struct pthread_start_args): New struct for passing
6485         args to cloning function.
6486         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6487         opaque pthread_t.
6488
6489         * Examples/Makefile (clean): Pass -f option to rm.
6490
6491         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6492         and define TEST_FOR_COMPARE_AND_SWAP.
6493         * sysdeps/i386/i486/pt-machine.h: Removed.
6494
6495         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6496         to 1024.
6497
6498 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6499
6500         * restart.h (suspend): Clear p_signal before suspending.
6501         (suspend_with_cancellation): Likewise.
6502         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6503
6504         * weaks.c: Make __pthread_key_create return 1.
6505         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6506         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6507         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6508         using libio.
6509
6510 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6511
6512         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6513
6514 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6515
6516         * sysdeps/powerpc/Implies: Added.
6517         * sysdeps/powerpc/pt-machine.h: Added.
6518         * sysdeps/powerpc/semaphorebits.h: Added.
6519
6520 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6521
6522         * pthread.c (__pthread_initial_thread): Correct
6523         initializer.
6524         (__pthread_manager_thread): Likewise.
6525         Reported by Andreas Jaeger.
6526
6527 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6528
6529         Since sigset_t no longer fits in a register, we can't pass in the
6530         thread's initial mask so easily.  Take this opportunity to simplify
6531         the clone implementation by only accepting a single void* argument.
6532
6533         * manager.c (__pthread_manager): Put thread vitals in the thread
6534         struct instead of as arguments through clone.
6535         (pthread_start_thread): Look for them there.
6536         * internals.h (struct _pthread): Add p_initial_fn,
6537         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6538         * pthread.c (pthread_initialize_manager): Revise clone invocation.