1 2003-04-26 Ulrich Drepper <drepper@redhat.com>
3 * pthread.c (__pthread_initialize_manager): Remove one last
4 p_multiple_threads call.
6 2003-04-22 Jakub Jelinek <jakub@redhat.com>
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
16 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
18 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
20 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
22 (NO_TLS_OFFSET): Define.
24 2003-04-22 Roland McGrath <roland@redhat.com>
26 * Makeconfig (shared-thread-library): Reverse link order to work
29 2003-04-20 Ulrich Drepper <drepper@redhat.com>
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
35 * internals.h: Split pthread_functions definition into...
36 * sysdeps/pthread/pthread-functions.h: ...new file.
38 * sysdeps/i386/useldt.h: Include <sysdep.h>.
40 2003-04-13 Jakub Jelinek <jakub@redhat.com>
42 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
43 match changes in NPTL sysdep-cancel.h.
45 2003-04-11 Roland McGrath <roland@redhat.com>
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.
51 2003-04-10 Jakub Jelinek <jakub@redhat.com>
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.
64 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
66 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
68 2003-04-03 Ulrich Drepper <drepper@redhat.com>
70 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
71 missing ; after ENTRY use [PR libc/4997].
73 2003-04-03 Jakub Jelinek <jakub@redhat.com>
75 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
76 in case the parent blocked it.
78 2003-04-02 Jakub Jelinek <jakub@redhat.com>
80 * Makefile (libpthread-routines): Add pthread_atfork.
81 (libpthread-static-only-routines): Add pthread_atfork.
83 2003-04-01 Jakub Jelinek <jakub@redhat.com>
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.
98 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
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.
105 2003-03-25 Ulrich Drepper <drepper@redhat.com>
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.
111 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
113 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
114 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
116 2003-03-22 Jakub Jelinek <jakub@redhat.com>
118 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
120 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
122 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
123 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
125 2003-03-21 Jakub Jelinek <jakub@redhat.com>
127 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
128 (TLS_SETUP_GS_SEGMENT): Fix a typo.
130 2003-03-19 Ulrich Drepper <drepper@redhat.com>
132 * sysdeps/pthread/Makefile: Fix cut&paste error.
134 2003-03-18 Roland McGrath <roland@redhat.com>
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.
141 2003-03-14 Jakub Jelinek <jakub@redhat.com>
143 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
144 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
147 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
149 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
151 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
152 Handle 64-bit longs on n64.
154 2003-03-07 Jakub Jelinek <jakub@redhat.com>
156 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
157 __pthread_spin_trylock): Rewritten.
159 2003-03-06 Ulrich Drepper <drepper@redhat.com>
161 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
164 2003-03-02 Ulrich Drepper <drepper@redhat.com>
166 * sysdeps/pthread/timer_create.c (timer_create): Return correct
167 error for CPU clocks.
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.
173 2003-03-01 Roland McGrath <roland@redhat.com>
175 * sysdeps/powerpc/powerpc64/pt-machine.h
176 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
178 * sysdeps/powerpc/tls.h: Don't define those here.
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.
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.
203 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
206 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
208 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
209 Conditionalize .toc section magic on this.
211 2003-02-21 Roland McGrath <roland@redhat.com>
213 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
214 instead of __rpc_thread_destroy.
216 2003-02-21 Jakub Jelinek <jakub@redhat.com>
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):
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.
226 2003-02-21 Roland McGrath <roland@redhat.com>
228 * Makefile (install-lib-ldscripts): New variable.
230 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
232 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
233 interprocedure branches.
235 2003-02-19 Ulrich Drepper <drepper@redhat.com>
237 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
238 need the target thread's lock.
240 2003-02-17 Ulrich Drepper <drepper@redhat.com>
242 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
245 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
246 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
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
263 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
265 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
266 Check pthread_create existance, not __pthread_fork.
268 2003-02-12 Ulrich Drepper <drepper@redhat.com>
270 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
272 2003-02-10 Jakub Jelinek <jakub@redhat.com>
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):
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.
291 2003-02-09 Andreas Jaeger <aj@suse.de>
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.
297 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
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.
312 (INIT_THREAD_SELF): Likewise.
313 (NONTLS_INIT_TP): New.
314 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
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
320 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
321 whenever libpthread.so is loaded.
323 2003-02-08 Andreas Schwab <schwab@suse.de>
325 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
326 libpthread.so is loaded.
328 2003-02-07 Ulrich Drepper <drepper@redhat.com>
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.
334 2003-02-07 Jakub Jelinek <jakub@redhat.com>
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):
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.
349 2003-02-05 Ulrich Drepper <drepper@redhat.com>
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.
355 2003-02-03 Jakub Jelinek <jakub@redhat.com>
357 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
358 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
360 2003-02-04 Andreas Jaeger <aj@suse.de>
362 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
365 2003-01-30 Jakub Jelinek <jakub@redhat.com>
367 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
369 2003-01-30 Jakub Jelinek <jakub@redhat.com>
371 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
372 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
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.
387 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
389 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
391 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
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):
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.
401 2003-01-24 Jakub Jelinek <jakub@redhat.com>
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):
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.
417 2003-01-25 Guido Guenther <agx@sigxcpu.org>
419 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
420 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
422 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
424 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
427 2003-01-17 Richard Henderson <rth@redhat.com>
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
439 2003-01-15 Jakub Jelinek <jakub@redhat.com>
441 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
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.
447 2003-01-16 Jakub Jelinek <jakub@redhat.com>
449 * pthread.c (_pthread_initialize_minimal): Use
450 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
451 been already initialized.
453 2003-01-16 Jakub Jelinek <jakub@redhat.com>
455 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
458 2003-01-15 Jakub Jelinek <jakub@redhat.com>
460 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
461 __libc_lock_init_recursive): Initialize fields directly.
463 2003-01-15 Jakub Jelinek <jakub@redhat.com>
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):
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.
475 2003-01-14 Ulrich Drepper <drepper@redhat.com>
477 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
480 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
484 2003-01-14 Jakub Jelinek <jakub@redhat.com>
486 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
488 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
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.
494 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
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):
506 2003-01-10 Andreas Schwab <schwab@suse.de>
508 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
510 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
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):
517 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
519 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
520 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
522 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
524 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
526 2002-01-09 Richard Henderson <rth@redhat.com>
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.
532 2003-01-11 Philip Blundell <philb@gnu.org>
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
542 (PSEUDO): Use SINGLE_THREAD_P_INT.
544 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
546 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
548 2003-01-11 Jakub Jelinek <jakub@redhat.com>
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,
561 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
563 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
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.
573 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
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.
579 2003-01-09 Jakub Jelinek <jakub@redhat.com>
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.
592 2003-01-06 Jakub Jelinek <jakub@redhat.com>
594 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
595 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
597 2003-01-06 Jakub Jelinek <jakub@redhat.com>
599 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
600 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
602 2003-01-06 Philip Blundell <philb@gnu.org>
604 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
606 2003-01-06 Jakub Jelinek <jakub@redhat.com>
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.
614 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
616 2003-01-05 Andreas Schwab <schwab@suse.de>
618 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
621 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
624 (CDISABLE): Likewise.
626 2003-01-05 Ulrich Drepper <drepper@redhat.com>
628 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
629 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
631 * Makefile (libc.so-no-z-defs): Define to yes.
633 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
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.
642 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
644 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
645 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
647 2003-01-04 Jakub Jelinek <jakub@redhat.com>
649 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
650 even if NOT_IN_libc is defined.
652 2003-01-05 Jakub Jelinek <jakub@redhat.com>
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.
660 2003-01-03 Richard Henderson <rth@redhat.com>
662 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
664 2003-01-03 Andreas Jaeger <aj@suse.de>
666 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
668 2003-01-03 Jakub Jelinek <jakub@redhat.com>
670 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
672 2003-01-02 Ulrich Drepper <drepper@redhat.com>
674 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
677 2003-01-02 Jakub Jelinek <jakub@redhat.com>
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.
688 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
690 (pthread_cond_t): Add __align member, shorten __padding.
691 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
692 __padding and __align too.
694 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
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):
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.
726 * Makefile (tests, tests-static): Add tst-cancel-static.
727 * tst-cancel-static.c: New test.
729 2003-01-02 Jakub Jelinek <jakub@redhat.com>
731 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
733 2003-01-02 Ulrich Drepper <drepper@redhat.com>
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
739 * Versions [libpthread]: Add definitions for new pthread_cond_*
740 interfaces for version GLIBC_2.3.2.
742 2002-12-31 Ulrich Drepper <drepper@redhat.com>
744 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
746 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
747 for __register_atfork.
749 2002-12-31 Jakub Jelinek <jakub@redhat.com>
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.
760 * sysdeps/pthread/errno-loc.c (__errno_location): Add
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.
772 * sysdeps/pthread/list.h: Remove assert.h include.
773 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
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):
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
814 2002-12-30 Jakub Jelinek <jakub@redhat.com>
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.
823 2002-12-28 Jakub Jelinek <jakub@redhat.com>
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
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.
854 * tst-cancel-wrappers.sh: Add line continuations.
856 2002-12-27 Jakub Jelinek <jakub@redhat.com>
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
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):
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.
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.
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.
917 2002-12-22 Jakub Jelinek <jakub@redhat.com>
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.
942 2002-12-27 Andreas Schwab <schwab@suse.de>
944 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
946 2002-12-22 Roland McGrath <roland@redhat.com>
948 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
950 2002-12-21 Ulrich Drepper <drepper@redhat.com>
952 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
953 Reported by Art Hass <ahaas@airmail.net>.
955 2002-12-19 Jakub Jelinek <jakub@redhat.com>
957 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
958 Use return 0 as 6th argument to FORWARD4.
960 2002-12-18 Jakub Jelinek <jakub@redhat.com>
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.
968 2002-12-18 Jakub Jelinek <jakub@redhat.com>
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.
978 2002-12-18 Jakub Jelinek <jakub@redhat.com>
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.
985 2002-12-17 Jakub Jelinek <jakub@redhat.com>
987 * wrapsyscall.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
1005 (__libc_maybe_call): In libpthread.* don't check for existance
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
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.
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.
1087 2002-12-15 Ulrich Drepper <drepper@redhat.com>
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.
1094 2002-12-10 Ulrich Drepper <drepper@redhat.com>
1096 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1097 weak. There is no reason for that.
1098 (CANCELABLE_SYSCALL_VA): Likewise.
1100 2002-12-09 Ulrich Drepper <drepper@redhat.com>
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.
1108 2002-12-06 Ulrich Drepper <drepper@redhat.com>
1110 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1112 2002-12-05 Roland McGrath <roland@redhat.com>
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.
1118 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1120 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
1122 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1123 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
1125 2002-12-03 Roland McGrath <roland@redhat.com>
1127 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
1128 from dynamic linker internal cell to new libc cell.
1130 2002-11-28 Roland McGrath <roland@redhat.com>
1132 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
1133 before other headers, so FLOATING_STACKS is not defined wrongly.
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.
1142 2002-11-28 Ulrich Drepper <drepper@redhat.com>
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.
1148 2002-11-19 Ulrich Drepper <drepper@redhat.com>
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.
1155 2002-11-14 Roland McGrath <roland@redhat.com>
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):
1168 (generated): Append them.
1169 (extra-objs): Append libc-tsd.os.
1171 * libc-tls-loc.c: New file.
1172 * Makefile (libpthread-routines): Add it.
1174 2002-11-14 Andreas Schwab <schwab@suse.de>
1176 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
1179 2002-11-13 Roland McGrath <roland@redhat.com>
1181 * Examples/ex6.c (main): Improve error reporting.
1183 2002-11-04 Ulrich Drepper <drepper@redhat.com>
1185 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
1186 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
1188 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
1190 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
1192 2002-10-22 Jakub Jelinek <jakub@redhat.com>
1194 * manager.c (pthread_start_thread): Call __uselocale even
1195 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
1197 2002-10-17 Roland McGrath <roland@redhat.com>
1199 * Makefile (unload): Don't link in libpthread.so.
1200 ($(objpfx)unload.out): Do depend on it.
1201 * unload.c (main): Improve error reporting.
1203 2002-10-09 Roland McGrath <roland@redhat.com>
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.
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.
1220 2002-10-11 Ulrich Drepper <drepper@redhat.com>
1222 * sysdeps/unix/sysv/linux/execve.c: New file.
1224 2002-10-09 Jakub Jelinek <jakub@redhat.com>
1226 * no-tsd.c: Include stdlib.h.
1228 2002-10-07 Jakub Jelinek <jakub@redhat.com>
1230 * sysdeps/unix/sysv/linux/allocalim.h: New file.
1231 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
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
1241 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
1243 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
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
1250 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
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.
1256 2002-09-29 Jakub Jelinek <jakub@redhat.com>
1258 * sysdeps/pthread/tst-timer.c (main): Clear
1259 SIGEV2.sigev_notify_attributes.
1261 2002-09-29 Ulrich Drepper <drepper@redhat.com>
1263 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
1264 INLINE_SYSCALL for set_thread_area syscall.
1266 2002-09-28 Roland McGrath <roland@redhat.com>
1268 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
1269 Don't call setrlimit, since we did no prior bogon we need to undo.
1271 2002-09-27 Roland McGrath <roland@redhat.com>
1273 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
1275 2002-09-24 Roland McGrath <roland@redhat.com>
1277 * sysdeps/x86_64/tls.h: New file.
1279 2002-09-23 Roland McGrath <roland@redhat.com>
1281 * Examples/ex13.c (dump_mut): int -> size_t for counter.
1283 2002-09-18 Bruno Haible <bruno@clisp.org>
1285 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
1286 an unexpected error code.
1288 * internals.h (__pthread_message): Add const to first parameter type.
1289 * pthread.c (__pthread_message): Likewise.
1291 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
1293 2002-09-17 Roland McGrath <roland@redhat.com>
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.
1300 2002-09-12 Jakub Jelinek <jakub@redhat.com>
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.
1306 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
1308 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
1310 2002-09-04 Bruno Haible <bruno@clisp.org>
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.
1317 2002-09-04 Bruno Haible <bruno@clisp.org>
1319 * sysdeps/alpha/pt-machine.h: Choose different include file location
1320 on non-Linux platforms.
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.
1326 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
1327 the structure of 'struct sigevent'.
1329 * errno.c (__errno_location, __h_errno_location, __res_state):
1330 Use prototype function definitions.
1332 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
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.
1339 2002-09-02 Roland McGrath <roland@redhat.com>
1341 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
1343 2002-09-01 Roland McGrath <roland@redhat.com>
1345 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
1346 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
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.
1356 2002-08-31 Ulrich Drepper <drepper@redhat.com>
1358 * Makefile: Don't use rule for crt%.o, spell it out as rules for
1361 2002-08-30 Roland McGrath <roland@redhat.com>
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.
1370 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
1371 crtn.o pathname too.
1373 2002-08-30 Jakub Jelinek <jakub@redhat.com>
1375 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
1378 2002-08-30 Roland McGrath <roland@redhat.com>
1380 * tst-static-locale.c: New file.
1381 * Makefile (tests, tests-static): Add it.
1383 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
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>.
1393 2002-08-28 Roland McGrath <roland@redhat.com>
1395 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
1397 2002-08-28 Jakub Jelinek <jakub@redhat.com>
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.
1403 2002-08-28 Ulrich Drepper <drepper@redhat.com>
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
1409 2002-08-08 Jakub Jelinek <jakub@redhat.com>
1411 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
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).
1419 2002-08-26 Brian Youmans <3diff@gnu.org>
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.
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:
1494 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1496 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1498 2002-08-26 Ulrich Drepper <drepper@redhat.com>
1500 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
1501 overflow [PR libc/4244].
1503 2002-08-25 Ulrich Drepper <drepper@redhat.com>
1505 * sysdeps/pthread/timer_routines.c (thread_func): Make the
1506 compiler happy by adding a return statement which will never be
1509 * tst-context.c (main): Cast to long before casting to pointer.
1511 * Examples/ex17.c (main): Use correct format string.
1513 * Examples/ex9.c (thread): Remove incorrect return statement.
1515 2002-08-23 Ulrich Drepper <drepper@redhat.com>
1517 * pthread.c (__linuxthreads_version): New global constant.
1519 2002-08-23 Andreas Jaeger <aj@suse.de>
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.
1526 2002-08-22 Roland McGrath <roland@redhat.com>
1528 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
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
1537 2002-08-21 Ulrich Drepper <drepper@redhat.com>
1539 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1540 also to the third definition of this macro.
1542 2002-06-17 Andreas Jaeger <aj@suse.de>
1544 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1547 2002-08-20 Ulrich Drepper <drepper@redhat.com>
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.
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
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.
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
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.
1581 2002-08-19 Ulrich Drepper <drepper@redhat.com>
1583 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1584 computing index from %gs value.
1586 2002-08-16 Roland McGrath <roland@redhat.com>
1588 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1589 register value from entry number properly.
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.
1603 2002-08-15 Roland McGrath <roland@redhat.com>
1605 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1606 return a value as callers now expect.
1608 2002-08-11 Roland McGrath <roland@redhat.com>
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.
1615 * manager.c (pthread_handle_create): Move p_header field initializers
1618 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1620 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1622 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1624 * pthread.c (__linuxthreads_initial_report_events): New variable.
1625 (__pthread_initialize_manager): Use it to initialize p_report_events
1627 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1629 2002-08-07 Roland McGrath <roland@redhat.com>
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.
1634 2002-08-02 Roland McGrath <roland@redhat.com>
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
1641 * pthread.c (__pthread_initialize_minimal): Likewise.
1643 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1645 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1647 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1650 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1651 Don't use p_libc_specific element in thread descriptor.
1653 2002-07-30 Roland McGrath <roland@redhat.com>
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.
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.
1680 * weaks.c: Don't include <errno.h> here.
1682 2002-08-01 Roland McGrath <roland@redhat.com>
1684 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
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.
1690 2002-08-02 Jakub Jelinek <jakub@redhat.com>
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.
1697 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1699 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1700 * sysdeps/i386/pt-machine.h: Likewise.
1701 * sysdeps/i386/useldt.h: Likewise.
1703 2002-07-22 Ulrich Drepper <drepper@redhat.com>
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.
1711 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1713 * errno.c (__errno_location): Don't define unless !USE_TLS
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.
1720 2002-07-02 H.J. Lu <hjl@gnu.org>
1722 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1724 * sysdeps/mips/pt-machine.h: Likewise.
1726 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1728 * manager.c (pthread_handle_create): Initialize self-reference in
1731 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1733 * Examples/ex9.c (main): Remove unused th variable.
1735 2002-07-10 Ulrich Drepper <drepper@redhat.com>
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.
1742 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1744 * Examples/ex9.c (main): Use list of children and join them.
1745 (thread): Do not call exit.
1747 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1749 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1750 Unconditionally use the code using spinlock. Use __pthread_release
1752 (wait_node_free): Likewise.
1753 (__pthread_acquire, __pthread_release): Unconditionally define.
1755 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1757 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1759 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1761 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1763 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1765 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1767 (pthread_cancel): Likewise.
1768 * internals.h (__pthread_create_2_1): Likewise.
1769 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1771 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1773 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1774 Patch by Glen Nakamura <gen@flex.com>.
1776 2002-05-03 Ulrich Drepper <drepper@redhat.com>
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).
1785 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1787 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1789 2002-04-08 Ulrich Drepper <drepper@redhat.com>
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>.
1797 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1799 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
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):
1806 * sysdeps/sh/tls.h: New file.
1808 2002-04-08 Jakub Jelinek <jakub@redhat.com>
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).
1815 2002-04-05 Ulrich Drepper <drepper@redhat.com>
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.
1832 2002-04-05 Jakub Jelinek <jakub@redhat.com>
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.
1840 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1842 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1844 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1846 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1848 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1850 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1852 2002-03-17 Andreas Jaeger <aj@suse.de>
1854 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
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.
1872 * internals.h: Move testandset and __compare_and_swap prototypes
1875 2002-03-03 Andreas Jaeger <aj@suse.de>
1877 * errno.c: Include resolv.h to avoid warning.
1879 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1881 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1884 2002-02-23 Ulrich Drepper <drepper@redhat.com>
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>.
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
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.
1905 2002-02-17 Andreas Schwab <schwab@suse.de>
1907 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1910 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1912 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1913 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1915 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1917 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1919 2002-02-08 Richard Henderson <rth@redhat.com>
1921 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1923 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1925 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1928 2002-02-07 H.J. Lu <hjl@gnu.org>
1930 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1932 (__pthread_spin_lock): Remove ".set noreorder".
1933 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1935 2002-02-05 H.J. Lu <hjl@gnu.org>
1937 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1939 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1940 (__compare_and_swap): Likewise.
1942 2002-02-07 Ulrich Drepper <drepper@redhat.com>
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...
1950 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1951 Define THREAD_GETMEM accordingly.
1953 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1955 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1957 * sysdeps/i386/tls.h: Define THREAD_DTV.
1959 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1961 * internals.h: Move thread descriptor definition...
1962 * descr.h.: ...here. New file.
1963 * sysdeps/i386/tls.h: New file.
1965 2002-02-01 H.J. Lu <hjl@gnu.org>
1967 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1968 different register in the delayed slot. Use branch likely.
1970 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1971 (__compare_and_swap): Return 0 only when failed to compare. Use
1974 2002-02-01 Jakub Jelinek <jakub@redhat.com>
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.
1984 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1986 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1987 in SHARED code, use GL(dl_cpuclock_offset).
1989 2002-01-28 Andreas Jaeger <aj@suse.de>
1991 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1992 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1994 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
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.
2000 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
2002 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2005 2002-01-12 Andreas Schwab <schwab@suse.de>
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.
2012 2002-01-14 Andreas Jaeger <aj@suse.de>
2014 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2016 2002-01-11 Andreas Schwab <schwab@suse.de>
2018 * signals.c (sighandler): Initialize all elements to SIG_ERR.
2019 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2021 2002-01-06 Richard Henderson <rth@redhat.com>
2023 * sysdeps/alpha/elf/pt-initfini.c: New file.
2025 2001-12-29 Andreas Jaeger <aj@suse.de>
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.
2032 * Examples/ex18.c: Include unistd.h for prototype of sleep.
2034 2001-12-14 Ulrich Drepper <drepper@redhat.com>
2036 * man/pthread_atfork.man: Adjust description of mutex handling
2037 after fork for current implementation.
2038 * linuxthreads.texi: Likewise [PR libc/2519].
2040 2001-12-13 Andreas Schwab <schwab@suse.de>
2042 * specific.c (pthread_key_delete): Don't contact the thread
2043 manager if no threads have been created yet.
2045 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
2047 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2048 qualifier to be safe.
2050 2001-11-30 Andreas Schwab <schwab@suse.de>
2052 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2053 that self is the manager thread, and initialize the thread
2055 (thread_self_stack) [THREAD_SELF]: New function to find self via
2057 * manager.c (pthread_handle_create): Don't block cancel signal any
2060 2001-11-29 Andreas Jaeger <aj@suse.de>
2062 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2064 (INIT_THREAD_SELF): New.
2065 (THREAD_GETMEM): New.
2067 (THREAD_SETMEM): New.
2068 (THREAD_SETMEM_NC): New.
2069 (FLOATING_STACKS): Define.
2070 (ARCH_STACK_MAX_SIZE): Define.
2072 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
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.
2090 2001-11-22 Wolfram Gloger <wg@malloc.de>
2092 * pthread.c (pthread_onexit_process): Don't call free
2093 after threads have been asynchronously terminated.
2095 * manager.c (pthread_handle_exit): Surround cancellation
2096 of threads with __flockfilelist()/__funlockfilelist().
2098 2001-11-26 Andreas Schwab <schwab@suse.de>
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.
2104 2001-11-15 Ulrich Drepper <drepper@redhat.com>
2106 * sysdeps/i386/i686/Implies: Removed.
2107 * sysdeps/i386/i686/Versions: New file.
2109 2001-10-31 Andreas Jaeger <aj@suse.de>
2111 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2113 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
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.
2120 2001-09-22 Andreas Jaeger <aj@suse.de>
2122 * linuxthreads/tst-context.c: Avoid compile warning.
2124 2001-09-20 Andreas Jaeger <aj@suse.de>
2126 * shlib-versions: Add x86-64.
2128 2001-09-19 Andreas Jaeger <aj@suse.de>
2130 * sysdeps/x86_64/Makefile: New file.
2131 * sysdeps/x86_64/pspinlock.c: New file.
2132 * sysdeps/x86_64/pt-machine.h: New file.
2134 2001-09-12 Jakub Jelinek <jakub@redhat.com>
2136 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
2138 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2140 2001-09-11 Ulrich Drepper <drepper@redhat.com>
2141 Wolfram Gloger <wg@malloc.de>
2143 * join.c: Protect all communications from and to manager with
2145 * manager.c: Likewise.
2146 * pthread.c: Likewise.
2147 * smeaphore.c: Likewise.
2149 2001-08-29 Ulrich Drepper <drepper@redhat.com>
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.
2155 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
2158 2001-08-27 Jakub Jelinek <jakub@redhat.com>
2160 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
2161 non-opaque type if __USE_UNIX98.
2163 2001-08-26 Jakub Jelinek <jakub@redhat.com>
2165 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
2166 non-opaque lock types also if _IO_MTSAFE_IO is defined.
2168 2001-08-23 Roland McGrath <roland@frob.com>
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.
2177 2001-08-22 Roland McGrath <roland@frob.com>
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.
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.
2195 2001-08-14 Jakub Jelinek <jakub@redhat.com>
2197 * lockfile.c (__pthread_provide_lockfile): New variable.
2198 * pthread.c (__pthread_require_lockfile): New variable.
2199 * cancel.c (__pthread_require_lockfile): New variable.
2201 2001-07-31 Ulrich Drepper <drepper@redhat.com>
2203 * tst-context.c (threadfct): Initialize context before calling
2206 * Examples/ex17.c: Make sure test thread is around long enough.
2208 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
2210 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
2212 2001-07-24 Ulrich Drepper <drepper@redhat.com>
2214 * tst-context.c (main): Print explanation before bailing out
2215 because context handling is not supported.
2217 2001-07-23 Ulrich Drepper <drepper@redhat.com>
2219 * Makefile (tests): Add tst-context.
2220 * tst-context.c: New file.
2222 * sysdeps/pthread/bits/stdio-lock.h: Define
2223 _IO_cleanup_region_start_noarg.
2225 2001-07-23 Jakub Jelinek <jakub@redhat.com>
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.
2232 2001-07-19 Jakub Jelinek <jakub@redhat.com>
2234 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
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.
2241 2001-07-16 Andreas Schwab <schwab@suse.de>
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.
2248 2001-07-16 Ulrich Drepper <drepper@redhat.com>
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.
2255 2001-06-16 H.J. Lu <hjl@gnu.org>
2257 * internals.h: Include <stackinfo.h>.
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.
2265 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
2267 * attr.c: Make _STACK_GROWS_UP work.
2268 * internals.h: Likewise.
2269 * manager.c: Likewise.
2270 * pthread.c: Likewise.
2272 2001-06-15 H.J. Lu <hjl@gnu.org>
2274 * pthread.c (__pthread_reset_main_thread): Fix a typo.
2276 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
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.
2283 2001-04-30 Alan Modra <amodra@one.net.au>
2285 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
2287 2001-05-25 Bruce Mitchener <bruce@cubik.org>
2289 * linuxthreads.texi: Spelling corrections.
2291 2001-05-25 Ulrich Drepper <drepper@redhat.com>
2293 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
2294 returning successfully.
2295 Patch by Gene Cooperman <gene@ccs.neu.edu>.
2297 2001-05-24 Ulrich Drepper <drepper@redhat.com>
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>.
2304 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
2305 (__pthread_alt_trylock): Likewise.
2307 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
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.
2331 2001-05-20 Roland McGrath <roland@frob.com>
2333 * Makeconfig: New file, variables used to be in main libc Makeconfig.
2335 2001-05-09 Geoff Keating <geoffk@redhat.com>
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.
2342 2001-04-24 Andreas Jaeger <aj@suse.de>
2344 * wrapsyscall.c: send* and recv* return ssize_t.
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>.
2350 2001-04-23 Ulrich Drepper <drepper@redhat.com>
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.
2356 * sysdeps/ia64/Versions: New file.
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.
2362 * Makefile (libpthread-routines): Add ptclock_gettime and
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.
2373 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
2374 * sysdeps/i386/i586/ptclock_settime.c: Removed.
2375 * sysdeps/i386/i586/Makefile: Removed.
2377 2001-04-22 Ulrich Drepper <drepper@redhat.com>
2379 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
2380 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2382 2001-04-21 Andreas Jaeger <aj@suse.de>
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.
2389 * manager.c (__pthread_manager): Add noreturn
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.
2396 * internals.h: Add __pthread_clock_gettime and
2397 __pthread_clock_settime prototypes.
2399 2001-04-21 Ulrich Drepper <drepper@redhat.com>
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.
2409 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
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.
2417 2001-04-18 Jakub Jelinek <jakub@redhat.com>
2419 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
2420 $generated, not $postclean-generated.
2422 2001-04-18 Andreas Jaeger <aj@suse.de>
2424 * Makefile (otherlibs): Added.
2426 2001-04-18 Jakub Jelinek <jakub@redhat.com>
2428 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2430 2001-04-16 Ulrich Drepper <drepper@redhat.com>
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>.
2436 2001-04-12 Ulrich Drepper <drepper@redhat.com>
2438 * tst-cancel.c: Disable most tests. Add new test where all
2439 cleanup handlers must run.
2440 * Makefile (tests): Add tst-cancel again.
2442 * cancel.c (__pthread_perform_cleanup): Correct condition for
2443 leaving cleanup loop early.
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.
2451 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2453 * Makefile (tests): Comment out tst-cancel for now.
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.
2460 2001-04-11 David S. Miller <davem@redhat.com>
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.
2466 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2468 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
2470 (_pthread_cleanup_push_defer): Likewise.
2472 * tst-cancel.c (main): Fix loop printing cleanup output.
2474 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
2476 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
2478 (__pthread_spin_trylock): Likewise.
2479 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2481 2001-04-10 Ulrich Drepper <drepper@redhat.com>
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
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.
2511 * Makefile (tests): Add tst-cancel.
2512 * tst-cancel.c: New file.
2514 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
2516 * sysdeps/cris/pt-machine.h: New file.
2517 * sysdeps/cris/pspinlock.c: New file.
2519 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
2521 * shlib-versions: Add case for Linux on CRIS.
2523 2001-03-26 Ulrich Drepper <drepper@redhat.com>
2525 * attr.c (pthread_getattr_np): Correct computation of stack size
2526 for machiens with register stack.
2528 * Examples/ex17.c (main): Correct detection of failed mmap call.
2530 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2532 * pthread.c (__pthread_initialize_manager): Fix a typo.
2534 2001-03-21 Jakub Jelinek <jakub@redhat.com>
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.
2541 2001-03-20 Ulrich Drepper <drepper@redhat.com>
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.
2547 2001-03-18 Ulrich Drepper <drepper@redhat.com>
2549 * Makefile: When generating DSO link with libc_nonshared.a.
2551 2001-02-26 Jakub Jelinek <jakub@redhat.com>
2553 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2555 2001-02-23 Jakub Jelinek <jakub@redhat.com>
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>.
2564 2001-03-16 Ulrich Drepper <drepper@redhat.com>
2566 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2568 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
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.
2574 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
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.
2580 2001-03-15 Ulrich Drepper <drepper@redhat.com>
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.
2588 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2590 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2593 2001-02-20 Hans Boehm <hans_boehm@hp.com>
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.
2602 2001-02-17 Jakub Jelinek <jakub@redhat.com>
2604 * spinlock.c (__pthread_lock): Force lock->__status to be read from
2605 memory on every spin.
2607 2001-02-10 Andreas Jaeger <aj@suse.de>
2609 * Makefile (extra-objs): New.
2611 2001-02-09 Jakub Jelinek <jakub@redhat.com>
2613 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2614 __pthread_initialize_minimal prototype.
2616 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2618 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2620 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2622 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2624 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2626 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2627 broken code. Patch by Jes Sorensen.
2629 2001-02-06 Andreas Jaeger <aj@suse.de>
2631 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2633 * internals.h: ...here.
2635 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2637 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2639 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2641 * Versions: Remove __pthread_initialize_minimal.
2643 2001-02-01 Ulrich Drepper <drepper@redhat.com>
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.
2650 * pthread.c: Cleanups.
2652 2001-01-28 Andreas Jaeger <aj@suse.de>
2654 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2655 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2656 * spinlock.c: Likewise.
2658 2001-01-28 Ulrich Drepper <drepper@redhat.com>
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.
2667 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2669 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2670 as struct __pthread_attr_s.
2672 * semaphore.h (sem_t): Cleanup namespace, rename status and
2675 2001-01-13 Jakub Jelinek <jakub@redhat.com>
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.
2682 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2684 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
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
2694 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2696 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2698 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2700 * Makefile (tests): Add ex15.
2701 * Examples/ex15.c: New test.
2703 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2705 * pthread.c (pthread_exit_process): Free memory allocated for
2708 2000-12-31 Ulrich Drepper <drepper@redhat.com>
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.
2714 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2716 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2718 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2720 2000-11-15 Wolfram Gloger <wg@malloc.de>
2722 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2723 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2725 2000-12-27 Andreas Jaeger <aj@suse.de>
2727 * Examples/ex13.c: Make local functions static.
2728 * ecmutex.c: Likewise.
2729 * joinrace.c: Likewise.
2730 * Examples/ex14.c: Likewise.
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.
2738 * oldsemaphore.c: Add prototypes to shut up GCC.
2739 * pt-machine.c: Likewise.
2741 * weaks.c: Add prototype for pthread_exit.
2743 * internals.h: Add some prototypes, format prototypes and add
2745 Move __libc_waitpid prototype to include/sys/wait.h.
2747 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2748 * mutex.c: Likewise.
2749 * specific.c: Likewise.
2750 * ptfork.c: Likewise.
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.
2768 2000-12-27 Ulrich Drepper <drepper@redhat.com>
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.
2775 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2777 * Examples/ex6.c (test_thread): Make static.
2778 * Examples/ex12.c (test_thread): Make static and add noreturn
2781 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2783 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2784 and compare_and_swap_with_release_semantics returns int not long.
2786 2000-12-17 Andreas Jaeger <aj@suse.de>
2788 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
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.
2797 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2799 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2800 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2802 2000-12-17 Andreas Jaeger <aj@suse.de>
2804 * internals.h: Add prototypes for testandset and
2805 __compare_and_swap to shut up gcc warnings.
2807 2000-12-06 Wolfram Gloger <wg@malloc.de>
2809 * join.c (pthread_detach): Allow case where the thread has already
2812 2000-12-05 Andreas Jaeger <aj@suse.de>
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>.
2819 2000-11-20 Jakub Jelinek <jakub@redhat.com>
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.
2829 2000-11-08 Bruce Mitchener <bruce@cubik.org>
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.
2836 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2838 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2840 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2841 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2843 2000-11-06 Ulrich Drepper <drepper@redhat.com>
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>.
2849 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2851 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2854 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2856 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2857 here. Reported by Bruce Mitchener <bruce@cubik.org>.
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>.
2870 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2871 Yutaka Niibe <gniibe@chroot.org>
2873 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2874 has restrictions, use register.
2876 2000-10-23 Andreas Schwab <schwab@suse.de>
2878 * Examples/ex14.c (TIMEOUT): Override default timeout.
2880 2000-10-16 Ulrich Drepper <drepper@redhat.com>
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>.
2887 2000-10-12 Alan Modra <alan@linuxcare.com.au>
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.
2895 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
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.
2908 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2910 * shlib-versions: Add version definitions for hppa-linux.
2912 2000-10-12 Alan Modra <alan@linuxcare.com.au>
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.
2918 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2920 * mutex.c (__pthread_mutex_destroy): Correct test of
2921 busy mutex for mutexes using alternate fastlocks.
2922 Patch by dtc@cmucl.cons.org.
2924 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2926 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2928 2000-09-28 Ulrich Drepper <drepper@redhat.com>
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>.
2934 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2937 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2939 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2940 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2942 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2943 _POSIX_MONOTONIC_CLOCK.
2945 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2948 2000-09-20 Andreas Jaeger <aj@suse.de>
2950 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2951 "testrtsig.h" conditional.
2953 2000-09-11 Ulrich Drepper <drepper@redhat.com>
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.
2961 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2963 * Examples/ex14.c: New file.
2964 * Makefile (tests): Add ex14.
2966 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2967 mutex. Patch by dtc@cmucl.cons.org.
2969 * ecmutex.c: New file.
2970 * Makefile (tests): Add ecmutex.
2972 2000-09-04 H.J. Lu <hjl@gnu.org>
2974 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2975 instead of roundup to round up to the page size.
2977 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2979 * manager.c (pthread_exited): Correctly report event as TD_REAP
2980 instead of TD_DEATH. Fix comments.
2982 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2984 * spinlock.h (testandset): Add cast to avoid warning.
2985 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2987 2000-09-02 Andreas Jaeger <aj@suse.de>
2989 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2992 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2994 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2995 Fix typo in last patch (_mode -> _flags).
2997 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2998 Provide definition which respects _IO_USER_LOCK flag.
3000 2000-08-30 Ulrich Drepper <drepper@redhat.com>
3002 * manager.c (pthread_allocate_stack): Clear descriptor only if not
3005 2000-08-25 Ulrich Drepper <drepper@redhat.com>
3007 * Makefile: Add rules to build and run unload.
3008 * unload.c: New file.
3010 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3012 * sysdeps/pthread/pthread.h
3013 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3014 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3016 2000-08-24 Andreas Jaeger <aj@suse.de>
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.
3024 2000-08-22 Andreas Jaeger <aj@suse.de>
3026 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3028 * Makefile (tests): Add ex13.
3030 2000-08-20 Ulrich Drepper <drepper@redhat.com>
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.
3036 2000-08-15 Ulrich Drepper <drepper@redhat.com>
3038 * Makefile (tests): Add ex12. Add rule to build it.
3039 * Examples/ex12.c: New file.
3041 2000-08-13 Ulrich Drepper <drepper@redhat.com>
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.
3048 2000-08-12 Andreas Jaeger <aj@suse.de>
3050 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3052 (__compare_and_swap): Likewise.
3053 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3055 2000-08-10 Ulrich Drepper <drepper@redhat.com>
3057 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3058 p_h_errnop correctly and not to NULL.
3060 2000-08-05 Ulrich Drepper <drepper@redhat.com>
3062 * Banner: Bump version number to 0.9.
3064 2000-08-04 Ulrich Drepper <drepper@redhat.com>
3066 * Makefile (tests): Add tststack. Add rule to build the program.
3067 * tststack.c: New file.
3069 * internals.h: Declare __pthread_max_stacksize.
3070 * pthread.c (__pthread_max_stacksize): New variable.
3071 (__pthread_initialize_manager): Determine __pthread_initialize_manager
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.
3081 * attr.c (__pthread_attr_setstacksize): Also test value against
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
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.
3092 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3093 1 to avoid removing the stack.
3095 2000-07-27 Jes Sorensen <jes@linuxcare.com>
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.
3105 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3106 * sysdeps/ia64/pspinlock.c: New file.
3108 2000-08-03 Ulrich Drepper <drepper@redhat.com>
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.
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.
3120 * mutex.c: Use __builtin_expect.
3121 * pthread.c: Likewise.
3123 2000-08-02 Andreas Jaeger <aj@suse.de>
3125 * sysdeps/s390/pspinlock.c: New file.
3126 * sysdeps/s390/pt-machine.h: New file.
3127 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
3129 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3131 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
3133 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3135 2000-07-26 Andreas Jaeger <aj@suse.de>
3137 * pthread.c: Initialize p_sem_avail.
3139 2000-07-25 Ulrich Drepper <drepper@redhat.com>
3141 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
3142 * semaphore.c: Handle spurious wakeups.
3144 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
3145 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
3147 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
3148 (__pthread_wait_for_restart): Likewise.
3150 * condvar.c (pthread_cond_wait): Also check whether thread is
3151 cancelable before aborting loop.
3152 (pthread_cond_timedwait): Likewise.
3154 * signals.c (pthread_sighandler): Remove special code to restrore
3156 (pthread_sighandler_t): Likewise.
3158 2000-07-25 Mark Kettenis <kettenis@gnu.org>
3160 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
3161 * pthread.c: Include <resolv.h>.
3162 (_res): Undefine. Add extern declaration.
3164 2000-07-24 Ulrich Drepper <drepper@redhat.com>
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.
3172 * condvar.c: Handle spurious wakeups. [PR libc/1749].
3173 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
3175 2000-07-21 Ulrich Drepper <drepper@redhat.com>
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.
3182 2000-07-20 Ulrich Drepper <drepper@redhat.com>
3184 * Makefile: Pass -z nodelete to linker for libpthread.so
3185 generation if it understand this option.
3187 2000-07-18 Mark Kettenis <kettenis@gnu.org>
3189 * manager.c (pthread_handle_create): Remove initialization of
3190 new_thread->p_res._sock.
3192 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
3194 Bugfixes to the variant of the code for machines with no compare
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.
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.
3205 2000-07-18 Ulrich Drepper <drepper@redhat.com>
3207 * spinlock.h (__pthread_alt_trylock): Fix code used if no
3208 compare&swap is available.
3210 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
3213 * pthread.c (pthread_initialize): Don't use sysconf to determine
3214 whether the machine has more than one processor.
3216 * spinlock.c (__pthread_alt_timedlock): Add back one of the
3217 removed thread_self calls.
3219 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
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.
3225 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
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().
3232 2000-07-18 Jakub Jelinek <jakub@redhat.com>
3234 * pthread.c (__pthread_initialize_manager): Lock
3235 __pthread_manager_thread.p_lock before calling clone.
3237 2000-05-05 H.J. Lu <hjl@gnu.org>
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
3243 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
3245 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
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.
3251 1999-12-19 H.J. Lu <hjl@gnu.org>
3253 * internals.h (page_roundup): New.
3254 * attr.c (__pthread_attr_setguardsize); Use page_roundup
3256 * manager.c (pthread_allocate_stack): Make sure guardaddr is
3257 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
3260 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
3262 * manager.c (pthread_allocate_stack): Unmap the stack top
3263 if failed to map the stack bottom.
3265 (pthread_free): Fix the guard page.
3267 * pthread.c (pthread_initialize): Set rlimit correctly for
3268 NEED_SEPARATE_REGISTER_STACK.
3270 1999-12-16 H.J. Lu <hjl@gnu.org>
3272 * pthread.c (__pthread_initialize_manager): Pass
3273 __pthread_manager_thread_bos instead of
3274 __pthread_manager_thread_tos to __clone2.
3276 1999-12-16 H.J. Lu <hjl@gnu.org>
3278 * manager.c (pthread_allocate_stack): Correct the calculation
3279 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
3282 1999-12-13 H.J. Lu <hjl@gnu.org>
3284 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
3285 bit after setting ar.ccv.
3287 1999-12-12 H.J. Lu <hjl@gnu.org>
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.
3294 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
3296 * manager.c (pthread_allocate_stack): Handle
3297 NEED_SEPARATE_REGISTER_STACK.
3298 (pthread_handle_create): Likewise.
3299 * pthread.c (__pthread_initialize_manager): Likewise.
3301 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
3303 1999-12-02 H.J. Lu <hjl@gnu.org>
3305 * sysdeps/ia64/pt-machine.h: New.
3307 2000-07-13 Ulrich Drepper <drepper@redhat.com>
3309 * wrapsyscall.c: Mark non-__ protected names as weak.
3312 2000-07-12 Bruno Haible <haible@clisp.cons.org>
3314 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
3316 2000-07-12 Ulrich Drepper <drepper@redhat.com>
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>.
3323 2000-07-06 Ulrich Drepper <drepper@redhat.com>
3325 * Version: Export __sigaction.
3326 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
3328 * pthread.c: Use __libc_sigaction instead of __sigaction.
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.
3337 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
3338 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
3341 2000-07-04 Greg McGary <greg@mcgary.org>
3343 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
3344 pragmas. Include bp-sym.h only if _LIBC.
3346 2000-07-04 Ulrich Drepper <drepper@redhat.com>
3348 * spinlock.c (__pthread_unlock): Properly place write barrier.
3349 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3351 2000-07-03 Ulrich Drepper <drepper@redhat.com>
3353 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
3354 faster on SMP systems. No more emulation of compare&swap for adaptive
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>.
3367 * pthread.c: Remove initialization to zero from global variables.
3369 2000-06-29 Jakub Jelinek <jakub@redhat.com>
3371 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
3373 2000-06-28 Greg McGary <greg@mcgary.org>
3375 * weaks.c: Wrap BP_SYM () around weak extern declarations of
3376 pthread functions that have pointers in their return+arg signatures.
3378 2000-06-27 Greg McGary <greg@mcgary.org>
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.
3384 2000-06-26 Ulrich Drepper <drepper@redhat.com>
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
3391 * spinlock.c: Pretty print.
3393 2000-06-25 Ulrich Drepper <drepper@redhat.com>
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>.
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.
3422 2000-06-21 Andreas Jaeger <aj@suse.de>
3424 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
3427 * join.c: Include <stdlib.h> for exit prototype.
3429 2000-06-20 Ulrich Drepper <drepper@redhat.com>
3431 * sysdeps/i386/useldt.h: Include <stdlib.h>.
3433 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
3434 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
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>.
3445 2000-06-19 H.J. Lu <hjl@gnu.org>
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
3453 * spinlock.c (__pthread_unlock): Call
3454 compare_and_swap_with_release_semantics () instead of
3455 compare_and_swap ().
3457 2000-06-19 Ulrich Drepper <drepper@redhat.com>
3459 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
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.
3466 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
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.
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.
3478 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
3479 timer_valid): New inline functions added.
3481 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
3482 restructured, recursive deadlock bug fixed.
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.
3490 2000-06-14 Ulrich Drepper <drepper@redhat.com>
3492 * shlib-versions: Add entry for SH.
3493 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
3495 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3497 A few optimizations. Got rid of unnecessary wakeups of timer threads,
3498 tightened up some critical regions and micro-optimized some list
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.
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.
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.
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.
3529 2000-06-13 Ulrich Drepper <drepper@redhat.com>
3531 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3532 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3534 * sysdeps/pthread/Makefile: Remove tests definition.
3536 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3537 Yutaka Niibe <gniibe@chroot.org>
3539 * sysdeps/sh/pspinlock.c: New file.
3540 * sysdeps/sh/pt-machine.h: New file.
3542 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3544 * Makefile (tests): Add joinrace.
3546 * Examples/ex6.c: Test return value of pthread_join.
3548 2000-06-11 Geoff Keating <geoffk@cygnus.com>
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.
3556 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3558 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3559 really append the entry.
3561 2000-06-10 Andreas Jaeger <aj@suse.de>
3563 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3565 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
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.
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.
3580 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3582 * pthread.c (__pthread_create_2_1): Optimize a bit.
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>.
3592 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3594 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3595 Correct handling of matching variable.
3597 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3600 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3601 Be prepared for empty timer list.
3603 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3604 CPUTIME clock ID. Add support for thread clocks.
3606 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3607 subtraction were switched.
3609 * sysdeps/pthread/timer_routines.c (init_module): Use
3610 THREAD_MAXNODES threads.
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.
3617 * sysdeps/pthread/timer_create.c (timer_create): Allow
3618 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3620 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3622 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3624 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
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.
3635 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3637 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3638 LINK_MAX definitions if necessary.
3640 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3642 Added missing fork time handling of global libio lock.
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
3649 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3650 which lock and unlock the stream list using the new interface
3652 * internals.h: Likewise.
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.
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.
3663 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3665 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3666 Add missing register.
3667 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3669 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3671 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3672 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3673 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3675 2000-05-31 Andreas Jaeger <aj@suse.de>
3677 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3679 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3681 * spinlock.c (__pthread_lock): Remove ASSERT.
3683 * Makefile (tests): Add ex8.
3684 * Examples/ex8.c: New file.
3686 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3688 Bugfix: The pthread_atfork mechanism now takes care of its
3689 own internal mutex at fork time.
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.
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.
3700 2000-05-24 Ulrich Drepper <drepper@redhat.com>
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.
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.
3727 2000-05-24 Andreas Jaeger <aj@suse.de>
3729 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3731 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3733 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3735 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3737 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3739 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
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.
3757 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
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
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.
3778 2000-05-05 Andreas Jaeger <aj@suse.de>
3780 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3781 (pthread_getcpuclockid): Correct test for ourselves.
3783 2000-05-05 Ulrich Drepper <drepper@redhat.com>
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.
3793 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3795 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3796 for eventmask larger than 1 word.
3798 2000-04-27 Ulrich Drepper <drepper@redhat.com>
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.
3807 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3809 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3810 now. First gcc must be fixed (more concrete: libgcc).
3812 2000-04-24 Ulrich Drepper <drepper@redhat.com>
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
3818 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3820 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3822 * join.c (pthread_exit): Set p_terminated after reporting the
3823 termination event instead of before.
3825 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3827 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3830 2000-04-18 Andreas Jaeger <aj@suse.de>
3832 * Versions: Use ld instead of ld.so.
3834 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3836 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3837 Remove the typedef keyword.
3839 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3841 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3843 (READ_MEMORY_BARRIER): Define.
3844 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3846 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3849 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3851 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3852 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3853 use thread_handle().
3855 2000-04-16 Ulrich Drepper <drepper@redhat.com>
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.
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.
3864 2000-04-15 Ulrich Drepper <drepper@redhat.com>
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.
3871 * pthread.c (pthread_initialize): Avoid a bit more code if
3872 realtime signals are known to exist.
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.
3884 2000-04-15 Ulrich Drepper <drepper@redhat.com>
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
3900 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3902 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3904 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3906 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3907 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3909 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3910 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3912 2000-04-14 Andreas Jaeger <aj@suse.de>
3914 * weaks.c: Fix typo.
3916 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3917 2.2 for linuxthreads.
3919 2000-04-13 Ulrich Drepper <drepper@redhat.com>
3921 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3922 (pthread_getcpuclockid): Fix typo.
3924 2000-04-12 Ulrich Drepper <drepper@redhat.com>
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.
3932 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
3934 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
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.
3957 * manager.c: Likewise.
3958 * mutex.c: Likewise.
3959 * pthread.c: Likewise.
3960 * rwlock.c: Likewise.
3961 * semaphore.c: Likewise.
3962 * signals.c: Likewise.
3964 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
3966 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3968 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3970 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
3971 _POSIX_SHARED_MEMORY_OBJECTS.
3973 2000-04-11 Andreas Jaeger <aj@suse.de>
3975 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
3976 (__compare_and_swap): Mark as modifying memory.
3978 2000-04-11 Geoff Keating <geoffk@cygnus.com>
3980 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
3982 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
3983 Don't have the 'asm' __volatile__.
3985 2000-04-11 Ulrich Drepper <drepper@redhat.com>
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
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
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
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>.
4005 2000-04-09 Ulrich Drepper <drepper@redhat.com>
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.
4011 2000-04-01 Andreas Jaeger <aj@suse.de>
4013 * attr.c: Use shlib-compat macros.
4014 * oldsemaphore.c: Likewise.
4015 * pthread.c: Likewise.
4016 * weaks.c: Likewise.
4018 2000-03-26 Ulrich Drepper <drepper@redhat.com>
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.
4025 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
4027 * sysdeps/pthread/Makefile: File removed.
4029 2000-03-23 Ulrich Drepper <drepper@redhat.com>
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.
4035 * manager.c (pthread_handle_create): Store ID of new thread before
4038 2000-03-21 Ulrich Drepper <drepper@redhat.com>
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.
4045 * pthread.c: Update for new SHLIB_COMPAT definition.
4047 * manager.c (__pthread_manager): Unmask debug signal.
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>.
4053 * pthread.c: Use new macros from shlib-compat.h to define versions.
4055 2000-03-19 Ulrich Drepper <drepper@redhat.com>
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.
4061 2000-03-16 Ulrich Drepper <drepper@redhat.com>
4063 * condvar.c: Make tests for ownership of mutex less strict.
4065 2000-03-14 Ulrich Drepper <drepper@redhat.com>
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.
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>.
4076 2000-03-14 Andreas Jaeger <aj@suse.de>
4078 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4080 (pthread_handle_sigrestart_rt): Likewise.
4081 * signals.c (pthread_sighandler_rt): Likewise.
4083 2000-03-02 Andreas Jaeger <aj@suse.de>
4085 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
4086 Reported by Sean Chen <sean.chen@turbolinux.com>.
4088 2000-02-28 Andreas Jaeger <aj@suse.de>
4090 * rwlock.c: Fix typo.
4092 2000-02-27 Ulrich Drepper <drepper@redhat.com>
4094 * rwlock.c: Define __* variants of the functions and make old names
4096 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
4097 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
4099 2000-02-25 Andreas Jaeger <aj@suse.de>
4101 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4102 pwrite64, lseek64, open64, and __open64 with version 2.2.
4104 2000-02-22 Ulrich Drepper <drepper@redhat.com>
4106 * semaphore.h (SEM_FAILED): Use 0 not NULL.
4108 2000-02-14 Ulrich Drepper <drepper@redhat.com>
4110 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
4111 nanosleep does not work either. Get absolute time inside the
4113 (pthread_cond_timedwait_relative_new): Likewise.
4114 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4116 2000-02-13 Andreas Jaeger <aj@suse.de>
4118 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
4119 (pthread_cond_timedwait_relative_old): Likewise.
4121 2000-02-13 Ulrich Drepper <drepper@redhat.com>
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
4126 (pthread_cond_timedwait_relative_new): Likewise.
4127 (PR libc/1597 and libc/1598).
4129 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
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.
4136 2000-01-31 Ulrich Drepper <drepper@redhat.com>
4138 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
4139 before every nanosleep call to account for time spent in the rest
4141 (pthread_cond_timedwait_relative_new): Likewise.
4142 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
4144 2000-01-29 Ulrich Drepper <drepper@redhat.com>
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
4149 (pthread_cond_timedwait_relative_new): Likewise.
4150 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
4152 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
4154 * manager.c (pthread_allocate_stack): Compute guard page address
4155 correctly. Patch by HJ Lu.
4157 * sysdeps/pthread/pthread.h: Define
4158 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
4160 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
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>.
4168 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
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
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>.
4185 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
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
4192 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
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
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.
4210 1999-12-31 Andreas Jaeger <aj@suse.de>
4212 * internals.h: Remove duplicate prototype declarations.
4214 * weaks.c: Remove __THROW from prototypes since the file is not
4215 compiled by a C++ compiler.
4216 * internals.h: Likewise.
4218 1999-12-30 Andreas Jaeger <aj@suse.de>
4220 * sysdeps/pthread/pthread.h: Move internal functions to...
4221 * sysdeps/pthread/bits/libc-lock.h: ...here.
4223 1999-12-29 Andreas Jaeger <aj@suse.de>
4225 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
4227 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
4229 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
4232 * manager.c (__pthread_start): Add one more cast to prevent
4233 warning on 64bit machines.
4235 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
4237 * manager.c (pthread_handle_create): Set p_pid of new thread
4238 before calling the callback function to report a new thread.
4240 1999-12-20 Andreas Jaeger <aj@suse.de>
4242 * pthread.c (pthread_initialize): Move getrlimit call after
4245 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
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.
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).
4258 1999-12-03 Andreas Jaeger <aj@suse.de>
4260 * Versions: Add __res_state with version GLIBC_2.2.
4262 * errno.c (__res_state): New function to return thread specific
4265 * pthread.c (pthread_initialize): Initialize p_resp.
4266 (__pthread_reset_main_thread): Also set p_resp.
4268 * manager.c (pthread_handle_create): Initialize p_resp.
4270 * internals.h: Add thread specific resolver state.
4271 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
4273 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
4275 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
4277 * sysdeps/i386/i686/pt-machine.h: Likewise.
4278 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
4280 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
4282 * manager.c (pthread_start_thread_event): Initialize p_pid already
4285 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
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.
4295 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
4297 * pthread.c (__pthread_initialize_manager): Initialize
4298 __pthread_manager_thread.p_tid.
4300 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
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.
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
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.
4324 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
4326 * restart.h (suspend_with_cancellation): Rewrite as a macro.
4328 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
4330 1999-10-25 Andreas Jaeger <aj@suse.de>
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.
4340 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
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.
4349 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
4351 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
4353 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
4355 * pthread.c (__pthread_initial_thread): Pass argument to
4356 PTHREAD_START_ARGS_INITIALIZER.
4357 (__pthread_manager_thread): Likewise.
4359 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
4360 initialize function.
4362 * manager.c (pthread_handle_create): Remove p_startfct initialization.
4364 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
4366 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
4368 * internals.h: Correct return types for __libc_read and __libc_write.
4370 1999-10-09 Andreas Jaeger <aj@suse.de>
4372 * internals.h: Add __new_sem_post to get prototype in
4373 manager.c; include semaphore.h for needed types.
4375 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
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].
4382 1999-10-08 Andreas Schwab <schwab@suse.de>
4384 * sysdeps/pthread/Subdirs: New file.
4387 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
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.
4394 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
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.
4400 * condvar.c (pthread_cond_timedwait_relative): Never return with
4401 EINTR. Patch by Andreas Schwab.
4403 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
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.
4409 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
4411 * specific.c: Move definitions of struct pthread_key_struct and
4412 destr_function to ...
4413 * internals.h: ...here.
4415 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
4417 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
4418 this instead of pthread_handle_sigrestart if the signal is an RT
4421 * signals.c: Handle passing through of sighandler arguments also
4422 for real-time signals.
4424 1999-09-03 Andreas Schwab <schwab@suse.de>
4426 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
4428 (__vfork): New function, alias vfork.
4429 * Versions: Export __fork, vfork, and __vfork in libpthread.
4431 1999-08-23 Andreas Schwab <schwab@suse.de>
4433 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
4434 call to signal handler.
4436 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
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.
4442 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
4444 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
4445 for the signals we used in the thread implementation [PR libc/1234].
4447 * Versions: Export __pthread_kill_other_threads_np from libpthread
4450 * signals.c: Pass sigcontext through wrapper to the user function.
4452 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
4454 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
4455 __libc_internal_tsd_set.
4457 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4459 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
4462 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4464 * internals.h: Align _pthread_descr_struct to 32 bytes.
4465 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
4468 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
4470 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
4473 1999-07-09 Cristian Gafton <gafton@redhat.com>
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.
4487 1999-06-23 Robey Pointer <robey@netscape.com>
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.
4495 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
4497 * manager.c (pthread_handle_create): Free mmap region after stack
4498 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
4500 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4502 * man/pthread_cond_init.man: Correct example.
4503 Reported by Tomas Berndtsson <tomas@nocrew.org>.
4505 * linuxthreads.texi (Condition Variables): Likewise.
4507 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
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.
4513 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
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.
4522 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
4524 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
4525 instruction does not allow memory element to use offset.
4527 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
4529 * manager.c (pthread_allocate_stack): Optimize initialization of new
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.
4536 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
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.
4547 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
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.
4555 * semaphore.h: Define _pthread_descr if necessary.
4556 Don't include limits.h. Define SEM_VALUE_MAX directly.
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
4564 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
4567 1999-03-16 H.J. Lu <hjl@gnu.org>
4569 * specific.c (pthread_key_delete): Check th->p_terminated to see
4570 if the thread is running.
4572 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
4573 Added to GLIBC_2.0 for libc.so.
4575 1999-02-12 H.J. Lu <hjl@gnu.org>
4577 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
4578 __libc_allocate_rtsig): Added to GLIBC_2.1.
4580 * internals.h (DEFAULT_SIG_RESTART): Removed.
4581 (DEFAULT_SIG_CANCEL): Removed.
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
4590 1999-02-03 H.J. Lu <hjl@gnu.org>
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
4597 * pthread.c (__pthread_initialize_manager): Suspend ourself
4598 after sending __pthread_sig_debug to gdb instead of
4599 __pthread_sig_cancel.
4601 1999-01-24 H.J. Lu <hjl@gnu.org>
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.
4607 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
4608 * pthread.c (__pthread_initialize_manager): Likewise.
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.
4616 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
4618 * manager.c (pthread_allocate_stack): Set
4619 __pthread_nonstandard_stacks if user-specified stack is used.
4621 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
4623 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
4624 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
4626 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
4628 * pthread.c: Use a third signal __pthread_sig_debug distinct
4629 from __pthread_sig_cancel to notify gdb when a thread is
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.
4638 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4640 * linuxthreads.texi: Remove pointers from first @node. Move old
4641 @node spec inside comment.
4643 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
4645 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
4648 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
4650 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
4651 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
4653 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
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
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.
4665 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
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>.
4670 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
4673 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
4675 * Examples/ex3.c: Wait until all threads are started before
4676 searching for the number to avoid race condition on very fast
4679 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4681 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
4682 declaration since it's not needed.
4684 * sysdeps/pthread/pthread.h: Move internal functions to ...
4685 * internals.h: ...here.
4687 1998-12-02 H.J. Lu <hjl@gnu.org>
4689 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
4690 SIGRTMIN is defined.
4691 (__pthread_sig_cancel): Likewise.
4693 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4695 * wrapsyscall.c: Include <sys/mman.h> for msync,
4696 <stdlib.h> for system and <termios.h> for tcdrain prototype.
4697 Correct msync declaration.
4699 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
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.
4707 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
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_*
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.
4721 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
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.
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.
4744 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4746 * linuxthreads.texi: Fix punctuation after xref.
4748 1998-11-10 H.J. Lu <hjl@gnu.org>
4750 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
4751 if it is defined in <linux/limits.h>.
4753 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
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
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.
4768 * manager.c: Likewise.
4769 * mutex.c: Likewise.
4770 * pthread.c: Likewise.
4771 * rwlock.c: Likewise.
4772 * semaphore.c: Likewise.
4773 * signals.c: Likewise.
4775 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
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):
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.
4798 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
4800 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
4803 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
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.
4819 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4821 * semaphore.h: Include <sys/types.h> so that _pthread_descr
4824 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
4826 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
4828 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
4830 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4832 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
4835 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4837 * signals.c (sigaction): Check that sig is less than NSIG to avoid
4838 array index overflow.
4840 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
4842 * sysdeps/pthread/semaphore.h: New file.
4844 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
4846 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
4847 _LIBC_TSD_KEY_DL_ERROR.
4849 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
4851 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
4852 * sysdeps/i386/pt-machine.h: Likewise.
4853 Suggested by Roland McGrath.
4855 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
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
4862 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
4863 THREAD_SETMEM_NC definitions.
4865 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
4867 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4869 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
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
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.
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.
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.
4900 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
4902 * sysdeps/i386/useldt.h: New file.
4903 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
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.
4909 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
4911 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
4912 turned out that we didn't need to queue after all.
4914 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
4916 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
4917 and wastes space; correct types.
4919 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
4921 * signals.c (sigaction): Handle NULL argument.
4923 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
4925 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
4928 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4930 * Makefile (linuxthreads-version): Extract correct number from
4933 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
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).
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.
4950 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
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.
4958 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4960 * sysdeps/pthread/bits/libc-lock.h: Make
4961 __pthread_mutexattr_settype weak. Don't make
4962 __pthread_mutexattr_setkind_np weak.
4964 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
4966 * manager.c (pthread_handle_create): Check whether sched_setscheduler
4967 call can succeed here.
4969 * mutex.c: Define __pthread_mutexattr_settype and make
4970 __pthread_mutexattr_setkind_np an alias.
4971 Likewise for __pthread_mutexattr_gettype.
4973 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4975 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
4978 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
4980 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
4982 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4984 * Examples/ex6.c: Include <unistd.h> for usleep.
4986 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4988 * Examples/ex4.c (main): Use exit, not pthread_exit.
4990 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
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.
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.
5004 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
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.
5013 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
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.
5023 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
5025 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5027 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5029 * attr.c: Include <string.h>.
5031 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
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.
5045 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
5047 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5049 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5050 as macros as demanded in POSIX.1, Annex C.
5052 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
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.
5064 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
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.
5072 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
5074 * manager.c (pthread_exited): If thread is not detached put it on
5076 (pthread_handle_free): If thread is not on list with living threads
5077 search on list with detached threads.
5079 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5080 for new definition of pthread_rwlock_t.
5082 * spinlock.c: Correct test whether to compile
5083 __pthread_compare_and_swap or not.
5085 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
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.
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.
5107 * sysdeps/i386/i686/pt-machine.h: New file.
5109 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
5111 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
5112 [sg]et_stackaddr prototypes always available.
5114 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5115 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
5117 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
5119 * manager.c (pthread_free): Undo patch from 980430.
5120 Reported by David Wragg <dpw@doc.ic.ac.uk>.
5122 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
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
5130 Patches by Xavier Leroy.
5132 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
5134 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
5136 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5138 * attr.c: Correct typo.
5140 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
5142 * manager.c (pthread_free): Unmap guard before the stack.
5143 Patch by Matthias Urlichs.
5145 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
5147 * manager.c (pthread_free): Detect already free child.
5148 Patch by Xavier Leroy, reported by Matthias Urlichs.
5150 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5152 * Makefile (linuxthreads-version): Renamed back from
5155 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
5157 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
5160 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
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>.
5171 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5173 * manager.c (__pthread_manager): Reduce first argument to select
5174 to include just the needed file descriptor.
5176 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
5178 * manager.c: Fix last patch which caused core dumps.
5180 * pthread.c: Correctly handle missing SIGRTMIN.
5182 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
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.
5188 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
5190 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
5192 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
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
5199 * libpthread.map: Add names in GLIBC_2.1 section.
5200 * manager.c (pthread_handle_create): Implement guardsize and
5202 (pthread_free): Likewise.
5203 * pthread.c (pthread_create): Add new interface for changed
5205 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
5206 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
5209 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
5211 * manager.c: Enable resetting of the thread scheduling policy
5212 to SCHED_OTHER when the parent thread has a different one.
5214 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
5216 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5217 _POSIX_ASYNCHRONOUS_IO.
5219 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
5221 * mutex.c: Implement new mutex types.
5223 * internals.h: Include <signal.h>.
5225 * libpthread.map: Add __erno_location and __h_errno_location.
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
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
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.
5240 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
5242 * rwlock.c: New file.
5243 * Makefile (libpthread-routines): Add rwlock.
5244 * sysdeps/pthread/pthread.h: Define data structures and declare
5246 * libpthread.map: Add new functions.
5248 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
5250 * sysdeps/arm/pt-machine.h: New file; add ARM support.
5251 * sysdeps/arm/Implies: likewise.
5252 * README: Document it.
5254 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5256 * signals.c: Remove unneeded initializer for sigwaited, saving a
5259 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5261 * semaphore.c (sem_init): Set sem_spinlock only if available.
5263 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
5265 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
5266 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
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.
5277 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
5279 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
5282 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
5284 * wrapsyscall.c: Add socket functions which are also cancelation
5287 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
5289 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
5290 New functions for fast thread specific data within libc.
5292 * internals.h: Add new array p_libc_specific to struct
5293 _pthread_descr_struct.
5295 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
5297 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
5299 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
5300 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
5302 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
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
5313 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
5314 PTHREAD_DESTRUCTOR_ITERATIONS.
5316 * manager.c (pthread_handle_create): Compare mmap result with
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.
5322 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
5324 sysdeps/sparc -> sysdeps/sparc/sparc32
5325 sysdeps/sparc64 -> sysdeps/sparc/sparc64
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.
5335 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
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.
5341 * semaphore.c: Include spinlock.h only when needed.
5343 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
5344 keys for entries not in use.
5346 * weaks.c: Implement key handling functions for real.
5348 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
5350 Initial sparc64-linux support:
5351 * sysdeps/sparc64/Implies: New file.
5352 * sysdeps/sparc64/pt-machine.h: Likewise.
5354 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
5356 * semaphore.c: Include spinlock.h at correct place.
5359 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
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.
5373 * lockfile.c: <foo.h> -> <bits/foo.h>.
5374 * semaphore.h: Likewise.
5376 * Makefile: (headers): foo.h -> bits/foo.h.
5377 * sysdeps/pthread/Makefile: Likewise.
5379 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5381 * semaphore.c (sem_init): Set sem_spinlock only if available.
5383 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
5386 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
5388 Update from LinuxThreads 0.6.
5390 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
5391 and __sched_get_priority_min instead of names without `__'.
5393 * manager.c: Rewrite large parts to implement opaque pthread_t.
5395 * cancel.c: Adapt for opaque pthread_t type.
5396 * condvar.c: Likewise.
5397 * errno.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.
5409 * pthread.c: Accumulate time for all threads in thread manager.
5411 * semaphore.c: Implement fallback implementation for architectures
5412 sometimes missing compare-exchange operations.
5414 * cancel.c (pthread_cancel): Validate handle argument.
5415 * join.c (pthread_join): Likewise.
5416 (pthread_detach): Likewise.
5417 * signals.c (pthread_kill): Likewise.
5419 * spinlock.h (acquire): Use __sched_yield not sched_yield.
5421 * queue.h (enqueue): Enqueue thread according to priority.
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
5428 * Examples/Makefile (clean): Pass -f option to rm.
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.
5434 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
5437 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
5439 * restart.h (suspend): Clear p_signal before suspending.
5440 (suspend_with_cancellation): Likewise.
5441 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
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
5449 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
5451 * sysdeps/sparc/pt-machine (RELEASE): Fix.
5453 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
5455 * sysdeps/powerpc/Implies: Added.
5456 * sysdeps/powerpc/pt-machine.h: Added.
5457 * sysdeps/powerpc/semaphorebits.h: Added.
5459 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
5461 * pthread.c (__pthread_initial_thread): Correct
5463 (__pthread_manager_thread): Likewise.
5464 Reported by Andreas Jaeger.
5466 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
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.
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.