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