1 2003-12-29 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
4 (INIT_SYSINFO): Define.
7 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
9 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
11 2003-12-26 Jakub Jelinek <jakub@redhat.com>
13 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
14 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
16 * semaphore.h (sem_wait, sem_timedwait): Likewise.
18 2003-12-17 Jakub Jelinek <jakub@redhat.com>
20 * manager.c (pthread_free): Call _dl_deallocate_tls even for
22 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
24 (pthread_onexit_process): Update comment.
25 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
26 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
27 (tst-stack1-ENV): Set.
28 ($(objpfx)tst-stack1-mem): New.
29 * tst-stack1.c: New test.
31 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
33 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
34 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
35 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
36 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
37 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
40 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
42 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
43 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
45 2003-12-10 David Mosberger <davidm@hpl.hp.com>
47 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
48 message. Add include of <stddef.h>.
49 (INIT_NEW_WAY): New macro.
50 (INIT_OLD_WAY): Likewise.
51 (_init): Add unwind directives. Invoke
52 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
54 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
56 (_fini): Add unwind directives. Drop unnecessary .align 16
57 directive (bundles are always 16-byte aligned).
58 (_fini_EPILOG_BEGINS): Add unwind-directives.
60 2003-11-19 David Mosberger <davidm@hpl.hp.com>
62 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
64 2003-12-10 Andreas Jaeger <aj@suse.de>
65 Ruediger Oertel <ro@suse.de>
67 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
69 2003-11-30 Andreas Jaeger <aj@suse.de>
71 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
72 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
75 2003-11-04 Jakub Jelinek <jakub@redhat.com>
77 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
78 __libc_sigaction if it has been one of the special values before.
80 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
82 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
83 (__pthread_find_self): Likewise.
84 * manager.c (thread_segment): _STACK_GROWS_UP case added.
86 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
88 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
90 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
92 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
94 2003-10-07 Jakub Jelinek <jakub@redhat.com>
96 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
98 (SAVE_OLDTYPE_0): Fix a typo.
100 2003-10-02 Ulrich Drepper <drepper@redhat.com>
102 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
105 2003-10-02 Jakub Jelinek <jakub@redhat.com>
107 * Makefile (tests): Add tst-cancel8.
108 * tst-cancel8.c: New test.
110 2003-10-02 Ulrich Drepper <drepper@redhat.com>
112 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
113 restoring of the old cancellation type.
115 2003-09-10 Chris Demetriou <cgd@broadcom.com>
117 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
119 2003-09-30 Jakub Jelinek <jakub@redhat.com>
121 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
122 mutex_lock, mutex_trylock, mutex_unlock): Remove.
124 2003-09-27 Wolfram Gloger <wg@malloc.de>
126 * sysdeps/pthread/malloc-machine.h: New file.
128 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
130 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
131 if NEED_SEPARATE_REGISTER_STACK is defined.
133 2003-09-22 Philip Blundell <philb@gnu.org>
135 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
136 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
138 * pthread.c (__pthread_elements): Initialise these new elements.
139 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
141 (__libc_cleanup_pop): Likewise.
143 2003-09-22 Jakub Jelinek <jakub@redhat.com>
145 * attr.c: Include stdlib.h.
147 2003-09-18 Jakub Jelinek <jakub@redhat.com>
149 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
151 * tst-attr1.c: New test.
152 * Makefile (tests): Add tst-attr1.
154 2003-09-17 Philip Blundell <philb@gnu.org>
156 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
157 libpthread is loaded. Elide backwards compatibility code when not
160 2003-09-17 Jakub Jelinek <jakub@redhat.com>
162 * descr.h (manager_thread): Rename to...
163 (__pthread_manager_threadp): ... this.
164 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
165 (__pthread_manager_threadp): New variable.
166 * internals.h (__manager_thread): Define to
167 __pthread_manager_threadp if USE_TLS.
169 2003-09-15 Jakub Jelinek <jakub@redhat.com>
171 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
172 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
173 -mpreferred-stack-boundary=4.
175 2003-09-16 Ulrich Drepper <drepper@redhat.com>
177 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
178 values for the initial thread.
180 2003-09-17 Jakub Jelinek <jakub@redhat.com>
182 * pthread.c (manager_thread): Remove static, add attribute_hidden.
183 (thread_self_stack): Rename to...
184 (__pthread_self_stack): ... this. Remove static.
185 (pthread_handle_sigcancel): Use check_thread_self ().
186 (pthread_handle_sigrestart): Likewise.
187 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
189 * descr.h (manager_thread): Declare.
190 * internals.h (__pthread_self_stack): New prototype.
191 (__manager_thread): Define.
192 (check_thread_self): New function.
194 2003-09-15 Jakub Jelinek <jakub@redhat.com>
196 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
197 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
199 2003-09-12 Jakub Jelinek <jakub@redhat.com>
201 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
202 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
203 __SLONGWORD_TYPE otherwise.
205 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
207 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
208 [READ_MEMORY_BARRIER]: Define.
209 [WRITE_MEMORY_BARRIER]: Define.
211 2003-09-10 Jakub Jelinek <jakub@redhat.com>
213 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
214 ptr___pthread_cond_timedwait to the end of the structure to avoid
215 breaking Wine unnecessarily.
217 2003-09-08 Jakub Jelinek <jakub@redhat.com>
219 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
221 2003-09-02 Jakub Jelinek <jakub@redhat.com>
223 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
224 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
225 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
226 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
227 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
228 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
229 * attr.c (__old_pthread_attr_setstacksize,
230 __old_pthread_attr_setstack): New functions.
231 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
232 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
233 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
234 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
235 * tststack.c: Include limits.h and sys/param.h.
236 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
238 * barrier.c (__pthread_barrierattr_getpshared): Always
239 return PTHREAD_PROCESS_PRIVATE.
240 (pthread_barrierattr_setpshared): Return EINVAL if pshared
241 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
243 2003-09-02 Ulrich Drepper <drepper@redhat.com>
245 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
246 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
249 * barrier.c (pthread_barrierattr_setpshared): We don't handle
250 inter-process barriers.
252 2003-09-01 Jakub Jelinek <jakub@redhat.com>
254 * Makefile (tests): Add tst-tls1.
255 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
256 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
257 ($(objpfx)tst-tls1): New.
258 ($(objpfx)tst-tls2.out): Likewise.
259 (tests): Depend on $(objpfx)tst-tls2.out.
260 * tst-tls1.c: New test.
262 * tst-tls1mod.c: New.
263 * tst-tls1moda.c: New.
264 * tst-tls1modb.c: New.
265 * tst-tls1modc.c: New.
266 * tst-tls1modd.c: New.
267 * tst-tls1mode.c: New.
268 * tst-tls1modf.c: New.
269 * tst-tls2.sh: New test.
271 * internals.h (__pthread_cond_timedwait): New prototype.
272 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
273 ptr___pthread_cond_timedwait.
274 * pthread.c (__pthread_functions): Initialize them.
275 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
276 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
277 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
278 pthread_cond_timedwait@@GLIBC_2.3.2.
280 2003-08-27 Ulrich Drepper <drepper@redhat.com>
282 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
283 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
284 __THROW to match NPTL.
286 2003-08-13 Ulrich Drepper <drepper@redhat.com>
288 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
289 -DBROKEN_THREAD_SIGNALS.
291 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
293 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
294 Correct spelling of per thread resolver state.
296 2003-08-07 Jakub Jelinek <jakub@redhat.com>
298 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
299 (__rtld_lock_default_lock_recursive,
300 __rtld_lock_default_unlock_recursive): Define.
301 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
302 __rtld_lock_unlock_recursive): Define using
303 GL(_dl_rtld_*lock_recursive).
304 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
305 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
306 number of times as GL(_dl_load_lock) using non-mt implementation was
309 2003-07-31 Jakub Jelinek <jakub@redhat.com>
311 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
312 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
314 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
316 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
318 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
319 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
320 PTHREAD_STACK_MIN in comments.
322 * sysdeps/alpha/pt-machine.h (PT_EI): Add
323 __attribute__((always_inline)).
324 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
325 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
326 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
327 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
328 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
329 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
330 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
331 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
332 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
333 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
334 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
335 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
336 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
337 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
338 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
339 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
340 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
341 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
343 * Examples/ex13.c (main): Change res type to void * to avoid
345 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
347 2003-07-30 Jakub Jelinek <jakub@redhat.com>
349 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
351 (pthread_initialize): Initialize GL(dl_init_static_tls).
353 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
355 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
356 before __timer_dealloc.
357 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
358 Don't call list_unlink.
360 2003-07-29 Roland McGrath <roland@redhat.com>
362 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
364 2003-07-25 Roland McGrath <roland@redhat.com>
366 * manager.c (pthread_start_thread): Fix typo in last change.
368 2003-07-14 Guido Guenther <agx@sigxcpu.org>
370 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
371 use L() for local labels.
373 2003-07-22 Jakub Jelinek <jakub@redhat.com>
375 * descr.h (struct _pthread_descr_struct): Provide p_res member
376 even if USE_TLS && HAVE___THREAD.
377 * sysdeps/pthread/res-state.c (__res_state): Return __resp
379 * manager.c: Include resolv.h.
380 (pthread_start_thread): Initialize __resp.
381 * libc-tls-loc.c (__res_state): Return __resp.
382 * Makefile (tests): Add tst-_res1.
383 (modules-names, extra-objs, test-extras, test-modules): Add support
385 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
386 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
388 * tst-_res1.c: New test.
389 * tst-_res1mod1.c: New test.
390 * tst-_res1mod2.c: New test.
392 2003-07-20 Ulrich Drepper <drepper@redhat.com>
394 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
397 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
399 2003-07-14 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
402 in test for compilation in libc.
404 2003-07-04 Jakub Jelinek <jakub@redhat.com>
406 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
407 different symbol for the cancellation syscall wrapper and
408 non-cancellation syscall wrapper.
409 (PSEUDO_END): Define.
411 2003-07-05 Richard Henderson <rth@redhat.com>
413 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
415 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
417 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
420 2003-06-21 Andreas Schwab <schwab@suse.de>
422 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
425 2003-06-20 Richard Henderson <rth@redhat.com>
427 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
428 Remove ptw-osf_sigprocmask.
430 2003-06-18 Jakub Jelinek <jakub@redhat.com>
432 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
433 __librt_disable_asynccancel): Declare.
434 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
436 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
438 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
439 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
440 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
441 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
442 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
443 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
444 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
445 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
446 * sysdeps/x86_64/tcb-offsets.sym: New file.
447 * sysdeps/x86_64/Makefile: New file.
448 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
449 * Versions (libc): Export __librt_enable_asynccancel,
450 __librt_disable_asynccancel and __librt_multiple_threads as
452 * libc-cancellation.c (__librt_multiple_threads,
453 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
455 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
457 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
458 (SINGLE_THREAD_P): Replace @ got notation with @toc.
460 2003-06-11 Ulrich Drepper <drepper@redhat.com>
462 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
463 initializer [PR libc/5052].
465 2003-06-09 Andreas Schwab <schwab@suse.de>
467 * Makefile: Move inclusion of ../Rules down after extra-objs is
470 2003-06-06 Ulrich Drepper <drepper@redhat.com>
472 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
473 5+ arg syscalls only needed for PIC.
474 Patch by Ralph Siemsen <ralphs@netwinder.org>.
476 2003-06-05 Richard Henderson <rth@redhat.com>
478 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
479 and require CFI assembler directives.
480 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
482 2003-05-30 Andreas Jaeger <aj@suse.de>
484 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
485 (SAVESTK_0): Add CFI directives.
486 (SAVESTK_3): Likewise.
487 (SAVESTK_5): Likewise.
488 (RESTSTK_0): Likewise.
489 (RESTSTK_3): Likewise.
490 (RESTSTK_5): Likewise.
492 2003-05-05 Ulrich Drepper <drepper@redhat.com>
494 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
497 2003-05-04 Roland McGrath <roland@redhat.com>
499 * Makefile ($(objpfx)../libc.so): New target.
501 2003-04-26 Ulrich Drepper <drepper@redhat.com>
503 * pthread.c (__pthread_initialize_manager): Remove one last
504 p_multiple_threads call.
506 2003-04-22 Jakub Jelinek <jakub@redhat.com>
508 * pthread.c (__pthread_initialize_manager): Subtract
509 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
510 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
511 instead of sizeof (pthread_descr).
512 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
513 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
514 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
516 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
518 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
520 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
522 (NO_TLS_OFFSET): Define.
524 2003-04-22 Roland McGrath <roland@redhat.com>
526 * Makeconfig (shared-thread-library): Reverse link order to work
529 2003-04-20 Ulrich Drepper <drepper@redhat.com>
531 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
532 compiler knows we use the ldt_entry variable and that the syscall
535 * internals.h: Split pthread_functions definition into...
536 * sysdeps/pthread/pthread-functions.h: ...new file.
538 * sysdeps/i386/useldt.h: Include <sysdep.h>.
540 2003-04-13 Jakub Jelinek <jakub@redhat.com>
542 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
543 match changes in NPTL sysdep-cancel.h.
545 2003-04-11 Roland McGrath <roland@redhat.com>
547 * Makefile (multidir): Don't set the variable here with $(shell ...).
548 ($(objpfx)multidir.mk): New target, generated makefile; include that.
549 (generated): Append it.
551 2003-04-10 Jakub Jelinek <jakub@redhat.com>
553 * Makefile (multidir, crti-objs, crtn-objs): New variables.
554 (generated-dirs): Add pathname component of multidir.
555 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
556 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
557 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
558 $(objpfx)$(multidir)/crtn.o): New.
559 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
560 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
561 before-compile, generated): Don't generate and use specs.
562 ($(objpfx)specs): Remove.
564 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
566 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
568 2003-04-03 Ulrich Drepper <drepper@redhat.com>
570 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
571 missing ; after ENTRY use [PR libc/4997].
573 2003-04-03 Jakub Jelinek <jakub@redhat.com>
575 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
576 in case the parent blocked it.
578 2003-04-02 Jakub Jelinek <jakub@redhat.com>
580 * Makefile (libpthread-routines): Add pthread_atfork.
581 (libpthread-static-only-routines): Add pthread_atfork.
583 2003-04-01 Jakub Jelinek <jakub@redhat.com>
585 * pthread.c (__pthread_wait_for_restart_signal): Use
586 __pthread_sigsuspend instead of sigsuspend.
587 * internals.h (__pthread_sigsuspend): New prototype.
588 * Makefile (libpthread-routines): Add pt-sigsuspend.
589 (tests): Add tst-cancel7.
590 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
591 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
592 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
593 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
594 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
595 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
596 * tst-cancel7.c: New test.
598 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
600 * alloca_cutoff.c: Include internals.h.
601 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
602 * sysdeps/pthread/herrno-loc.c: Likewise.
603 * sysdeps/pthread/res-state.c: Likewise.
605 2003-03-25 Ulrich Drepper <drepper@redhat.com>
607 * sysdeps/pthread/bits/typesizes.h: New file.
608 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
609 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
611 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
613 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
614 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
616 2003-03-22 Jakub Jelinek <jakub@redhat.com>
618 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
620 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
622 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
623 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
625 2003-03-21 Jakub Jelinek <jakub@redhat.com>
627 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
628 (TLS_SETUP_GS_SEGMENT): Fix a typo.
630 2003-03-19 Ulrich Drepper <drepper@redhat.com>
632 * sysdeps/pthread/Makefile: Fix cut&paste error.
634 2003-03-18 Roland McGrath <roland@redhat.com>
636 * Versions (libpthread: GLIBC_2.2): Remove
637 pthread_barrierattr_getpshared, never really existed.
638 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
639 (libpthread: GLIBC_PRIVATE): ... here.
641 2003-03-14 Jakub Jelinek <jakub@redhat.com>
643 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
644 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
647 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
649 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
651 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
652 Handle 64-bit longs on n64.
654 2003-03-07 Jakub Jelinek <jakub@redhat.com>
656 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
657 __pthread_spin_trylock): Rewritten.
659 2003-03-06 Ulrich Drepper <drepper@redhat.com>
661 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
664 2003-03-02 Ulrich Drepper <drepper@redhat.com>
666 * sysdeps/pthread/timer_create.c (timer_create): Return correct
667 error for CPU clocks.
669 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
670 _POSIX_MONOTONIC_CLOCK.
671 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
673 2003-03-01 Roland McGrath <roland@redhat.com>
675 * sysdeps/powerpc/powerpc64/pt-machine.h
676 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
678 * sysdeps/powerpc/tls.h: Don't define those here.
680 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
681 tcbhead_t with multiple_threads member.
682 [USE_TLS] (tcbhead_t): Define minimal one-word version.
683 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
684 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
685 derive thread register offset of p_multiple_threads member.
687 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
688 Conditionalize p_header member on this.
689 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
690 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
691 * sysdeps/sh/tls.h: Likewise.
692 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
693 * sysdeps/sh/tcb-offsets.sym: Likewise.
694 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
695 (SINGLE_THREAD_P): Likewise.
696 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
697 (SINGLE_THREAD_P): Likewise.
698 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
699 (SINGLE_THREAD_P): Likewise.
700 * pthread.c (__pthread_initialize_manager): Likewise.
701 * manager.c (pthread_handle_create): Likewise.
703 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
706 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
708 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
709 Conditionalize .toc section magic on this.
711 2003-02-21 Roland McGrath <roland@redhat.com>
713 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
714 instead of __rpc_thread_destroy.
716 2003-02-21 Jakub Jelinek <jakub@redhat.com>
718 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
719 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
720 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
722 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
723 to crti.o and crtn.o.
724 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
726 2003-02-21 Roland McGrath <roland@redhat.com>
728 * Makefile (install-lib-ldscripts): New variable.
730 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
732 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
733 interprocedure branches.
735 2003-02-19 Ulrich Drepper <drepper@redhat.com>
737 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
738 need the target thread's lock.
740 2003-02-17 Ulrich Drepper <drepper@redhat.com>
742 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
745 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
746 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
748 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
749 * sysdeps/powerpc/tcb-offsets.sym: New file.
750 * sysdeps/powerpc/tls.h: New file.
751 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
752 (ARCH_STACK_MAX_SIZE): Define.
753 (THREAD_SELF): Define.
754 (INIT_THREAD_SELF): Define.
755 (THREAD_GETMEM): Define.
756 (THREAD_GETMEM_NC): Define.
757 (THREAD_SETMEM): Define.
758 (THREAD_SETMEM_NC): Define.
759 (__thread_self): Declare.
760 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
763 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
765 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
766 Check pthread_create existance, not __pthread_fork.
768 2003-02-12 Ulrich Drepper <drepper@redhat.com>
770 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
772 2003-02-10 Jakub Jelinek <jakub@redhat.com>
774 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
775 pthread_create existance, not __pthread_fork.
776 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
777 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
778 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
779 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
781 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
782 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
783 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
784 Add .weak pthread_create.
785 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
786 Check pthread_create existance, not __pthread_fork.
787 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
788 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
789 __fork whenever libpthread.so is loaded.
791 2003-02-09 Andreas Jaeger <aj@suse.de>
793 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
794 Rework: %r9 is destroyed by functions so don't use it as
795 temporary, align stack correctly, fix parameter for CDISABLE.
797 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
799 * sysdeps/sh/Makefile: New file.
800 * sysdeps/sh/tcb-offsets.sym: Likewise.
801 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
802 of linuxthreads/descr.h after the definition of THREAD_SELF.
803 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
804 (TLS_TCB_SIZE): Set size of tcbhead_t.
805 (TLS_PRE_TCB_SIZE): Define.
806 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
807 a member of thread structure.
808 (THREAD_DTV): Likewise.
809 (TLS_INIT_TP_EXPENSIVE): Remove.
810 (TLS_INIT_TP): Set gbr register only.
812 (INIT_THREAD_SELF): Likewise.
813 (NONTLS_INIT_TP): New.
814 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
816 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
817 SYSCALL_INST_PAD macro after DO_CALL.
818 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
820 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
821 whenever libpthread.so is loaded.
823 2003-02-08 Andreas Schwab <schwab@suse.de>
825 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
826 libpthread.so is loaded.
828 2003-02-07 Ulrich Drepper <drepper@redhat.com>
830 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
831 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
832 no __NR_vfork definition.
834 2003-02-07 Jakub Jelinek <jakub@redhat.com>
836 * tst-popen2.c: New test.
837 * Makefile (tests): Add tst-popen2.
838 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
839 whenever libpthread.so is loaded.
840 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
841 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
842 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
843 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
845 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
846 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
847 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
849 2003-02-05 Ulrich Drepper <drepper@redhat.com>
851 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
852 variable for non-libpthread case to the same value the
853 pthread_once function would use.
855 2003-02-03 Jakub Jelinek <jakub@redhat.com>
857 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
858 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
860 2003-02-04 Andreas Jaeger <aj@suse.de>
862 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
865 2003-01-30 Jakub Jelinek <jakub@redhat.com>
867 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
869 2003-01-30 Jakub Jelinek <jakub@redhat.com>
871 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
872 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
874 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
875 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
876 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
877 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
878 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
879 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
880 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
881 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
882 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
883 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
884 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
885 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
887 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
889 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
891 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
893 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
894 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
895 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
897 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
898 branch with 32 bit offset.
899 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
901 2003-01-24 Jakub Jelinek <jakub@redhat.com>
903 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
904 as required by TLS ABI.
905 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
906 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
907 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
908 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
910 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
911 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
912 instead of %g6 for thread pointer.
913 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
914 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
915 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
917 2003-01-25 Guido Guenther <agx@sigxcpu.org>
919 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
920 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
922 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
924 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
927 2003-01-17 Richard Henderson <rth@redhat.com>
929 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
930 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
931 (TLS_PRE_TCB_SIZE): New.
932 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
933 new ia64-style thread pointer layout.
934 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
935 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
936 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
939 2003-01-15 Jakub Jelinek <jakub@redhat.com>
941 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
943 (NONTLS_INIT_TP): Revert last change.
944 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
945 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
947 2003-01-16 Jakub Jelinek <jakub@redhat.com>
949 * pthread.c (_pthread_initialize_minimal): Use
950 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
951 been already initialized.
953 2003-01-16 Jakub Jelinek <jakub@redhat.com>
955 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
958 2003-01-15 Jakub Jelinek <jakub@redhat.com>
960 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
961 __libc_lock_init_recursive): Initialize fields directly.
963 2003-01-15 Jakub Jelinek <jakub@redhat.com>
965 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
966 __fork to be far away from __vfork ifndef SHARED.
967 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
969 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
970 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
971 Add a missing instruction.
972 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
973 branch to __fork even if __NR_vfork is not defined.
975 2003-01-14 Ulrich Drepper <drepper@redhat.com>
977 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
980 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
982 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
984 2003-01-14 Jakub Jelinek <jakub@redhat.com>
986 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
988 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
990 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
991 unterminated string literals.
992 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
994 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
996 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
997 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
998 PSEUDO_END to PSEUDO.
999 (PSEUDO_END): Remove.
1000 (SINGLE_THREAD_P): Save an instruction.
1001 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1002 parameter to SINGLE_THREAD_P call.
1003 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1006 2003-01-10 Andreas Schwab <schwab@suse.de>
1008 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1010 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1012 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1013 backchain in pseudo_cancel. Minor code improvements.
1014 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1017 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1019 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1020 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1022 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1024 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1026 2002-01-09 Richard Henderson <rth@redhat.com>
1028 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1029 ret follows pseudo, and thus avoid branch-to-branch in cancel
1030 case. Use SYSCALL_ERROR_LABEL.
1032 2003-01-11 Philip Blundell <philb@gnu.org>
1034 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1035 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1036 Correctly unstack lr.
1037 (UNDOARGS_5): Fix ordering of pushes and pops.
1038 (SINGLE_THREAD_P_PIC): New.
1039 (SINGLE_THREAD_P_INT): New.
1040 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1042 (PSEUDO): Use SINGLE_THREAD_P_INT.
1044 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1046 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1048 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1050 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1051 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1052 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1053 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1054 INIT_THREAD_SELF): Define.
1055 [HAVE_TLS_SUPPORT]: Include descr.h.
1056 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1057 struct _pthread_descr_struct.
1058 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1059 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1061 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1063 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1065 (__pthread_initialize_manager): Rename tcb to mgr.
1066 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1067 _pthread_descr) below tcbp, otherwise to tcbp.
1068 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1069 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1070 before freeing. Fix clone arguments if report_events and USE_TLS.
1071 (pthread_free): Adjust th back before freeing.
1073 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1075 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1076 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1077 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1079 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1081 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1082 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1083 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1084 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1085 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1086 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1087 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1088 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1089 * tst-popen.c: New test.
1090 * Makefile (tests): Add tst-popen.
1092 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1094 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1095 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1097 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1099 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1100 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1102 2003-01-06 Philip Blundell <philb@gnu.org>
1104 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1106 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1108 * internals.h (LIBC_CANCEL_HANDLED): Define.
1109 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1110 * signals.c (LIBC_CANCEL_HANDLED): Add.
1111 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1112 * tst-cancel-wrappers.sh: Remove all exceptions.
1114 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1116 2003-01-05 Andreas Schwab <schwab@suse.de>
1118 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1121 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1123 (CENABLE): Likewise.
1124 (CDISABLE): Likewise.
1126 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1128 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1129 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1131 * Makefile (libc.so-no-z-defs): Define to yes.
1133 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1135 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1136 (tcbhead_t): Add multiple_threads member.
1137 (TLS_INIT_TP_EXPENSIVE): Define.
1138 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1139 strings. Remove unused code.
1140 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1142 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1144 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1145 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1147 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1149 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1150 even if NOT_IN_libc is defined.
1152 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1154 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1155 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1156 * sysdeps/s390/Makefile: New file.
1157 * sysdeps/s390/tcb-offsets.sym: New file.
1158 * sysdeps/s390/tls.h: New file.
1160 2003-01-03 Richard Henderson <rth@redhat.com>
1162 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1164 2003-01-03 Andreas Jaeger <aj@suse.de>
1166 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1168 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1170 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1172 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1174 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1177 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1179 * internals.h (struct pthread_functions): Rename
1180 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1181 * pthread.c (pthread_functions): Adjust.
1182 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1183 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1184 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1185 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1186 and pthread_cond_wait.
1188 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1190 (pthread_cond_t): Add __align member, shorten __padding.
1191 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1192 __padding and __align too.
1194 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1196 * sysdeps/pthread/sigaction.c: New file.
1197 * sysdeps/unix/sysv/linux/raise.c: New file.
1198 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1199 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1200 weak_extern with #ifndef SHARED.
1201 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1203 * signals.c (__sigaction): Renamed to...
1204 (__pthread_sigaction): ... this.
1205 (__sigaction): New strong alias, #ifdef SHARED only.
1206 (sigaction): Protect with #ifdef SHARED.
1207 (sigwait): Renamed to...
1208 (__pthread_sigwait): ... this.
1209 (sigwait): New strong alias, #ifdef SHARED only.
1210 (raise): Renamed to...
1211 (__pthread_raise): ... this.
1212 (raise): New strong alias, #ifdef SHARED only.
1213 * internals.h (__pthread_sigaction, __pthread_sigwait,
1214 __pthread_raise): New prototypes.
1215 (struct pthread_functions): Add ptr_pthread_sigaction,
1216 ptr_pthread_sigwait, ptr_pthread_raise.
1217 * pthread.c (pthread_functions): Renamed to...
1218 (__pthread_functions): ... this. No longer static, no longer
1219 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1220 and ptr_pthread_raise.
1221 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1222 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1223 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1224 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1226 * Makefile (tests, tests-static): Add tst-cancel-static.
1227 * tst-cancel-static.c: New test.
1229 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1231 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1233 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1235 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1236 * condvar.c: Add symbol versioning. The compatibility versions
1237 are the same as the change in the interface does not effect this
1239 * Versions [libpthread]: Add definitions for new pthread_cond_*
1240 interfaces for version GLIBC_2.3.2.
1242 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1244 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1246 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1247 for __register_atfork.
1249 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1251 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1252 ASSEMBLER test macro.
1253 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1254 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1255 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1256 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1257 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1258 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1260 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1262 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1263 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1264 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1265 __libc_current_sigrtmax): Likewise.
1266 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1267 __libc_internal_tsd_set, __libc_internal_tsd_address,
1268 __libc_alloca_cutoff.
1269 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1270 __libc_internal_tsd_set, __libc_internal_tsd_address.
1272 * sysdeps/pthread/list.h: Remove assert.h include.
1273 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1275 * sysdeps/pthread/list.h: New file.
1276 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1277 * sysdeps/unix/sysv/linux/fork.c: New file.
1278 * sysdeps/unix/sysv/linux/fork.h: New file.
1279 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1280 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1281 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1282 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1283 * sysdeps/unix/sysv/linux/Makefile: New file.
1284 * sysdeps/unix/sysv/linux/Versions: New file.
1285 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1286 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1287 use it instead of currentframe. No longer static.
1288 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1289 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1290 (struct pthread_functions): Add ptr_pthread_fork,
1291 ptr_pthread_cleanup_upto.
1292 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1293 ptr_pthread_cleanup_upto.
1294 * ptfork.c: Include fork.h.
1295 (struct handler_list, struct handler_list_block): Remove.
1296 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1297 pthread_atfork_child): Remove.
1298 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1299 (__pthread_fork): New function.
1300 (__fork, __vfork): Call __libc_fork.
1301 * Makefile (libpthread-routines): Add old_pthread_atfork.
1302 (libpthread-nonshared): Add pthread_atfork.
1303 (others): Depend on $(objpfx)libpthread_nonshared.a.
1304 ($(objpfx)libpthread_nonshared.a): New rule.
1305 (install): Depend on $(inst_libdir)/libpthread.so.
1306 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1308 (tests): Depend on libpthread_nonshared.a too.
1309 * old_pthread_atfork.c: New file.
1310 * pthread_atfork.c: New file.
1311 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1314 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1316 * forward.c: Make all functions available by default again. It
1317 caused too much trouble.
1318 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1319 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1320 ptr___pthread_attr_init_2_*.
1321 * pthread.c (pthread_functions): Adjust.
1323 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1325 * libc_pthread_init.c (__libc_pthread_init): Remove
1326 MULTIPLE_THREADS_OFFSET check.
1327 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1328 (SYSINFO_OFFSET): Remove.
1329 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1331 * sysdeps/i386/tcb-offsets.sym: New file.
1332 * sysdeps/pthread/tcb-offsets.h: New file.
1333 * sysdeps/sparc/sparc32/tls.h: Removed.
1334 * sysdeps/sparc/sparc64/tls.h: Move...
1335 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1336 * sysdeps/sparc/Makefile: New file.
1337 * sysdeps/sparc/tcb-offsets.sym: New file.
1338 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1339 * sysdeps/ia64/Makefile: New file.
1340 * sysdeps/ia64/tcb-offsets.sym: New file.
1341 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1342 (MULTIPLE_THREADS_OFFSET): Remove.
1343 Replace defined MULTIPLE_THREADS_OFFSET
1344 with defined FLOATING_STACKS && USE___THREAD.
1345 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1346 (MULTIPLE_THREADS_OFFSET): Remove.
1347 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1348 (MULTIPLE_THREADS_OFFSET): Remove.
1349 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1350 (MULTIPLE_THREADS_OFFSET): Remove.
1351 * pthread.c (__pthread_initialize_manager): Remove
1352 MULTIPLE_THREADS_OFFSET cbeck.
1354 * tst-cancel-wrappers.sh: Add line continuations.
1356 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1358 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1359 and bits/libc-lock.h.
1360 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1361 __libc_internal_tsd_address): Remove.
1362 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1363 __pthread_internal_tsd_set): New weak_externs.
1364 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1365 using __libc_maybe_call2.
1366 (__libc_tsd_key_t): Move to ...
1367 * descr.h (__libc_tsd_key_t): ...here.
1368 Remove bits/libc-tsd.h include.
1369 * sysdeps/pthread/errno-loc.c: New file.
1370 * sysdeps/pthread/herrno-loc.c: New file.
1371 * sysdeps/pthread/res-state.c: New file.
1372 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1373 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1374 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1375 of THREAD_[SG]ETMEM.
1376 * specific.c (libc_internal_tsd_set): Renamed to...
1377 __pthread_internal_tsd_set. Remove static.
1378 (libc_internal_tsd_get): Renamed to...
1379 __pthread_internal_tsd_get. Remove static.
1380 (libc_internal_tsd_address): Renamed to...
1381 __pthread_internal_tsd_address. Remove static.
1382 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1383 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1384 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1386 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1387 __pthread_internal_tsd_address): New prototypes.
1388 (struct pthread_functions): Add
1389 ptr_pthread_internal_tsd_([sg]et|address) fields.
1390 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1391 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1392 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1393 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1394 * alloca_cutoff.c: New file.
1395 * no-tsd.c: Removed.
1396 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1397 * pt-system.c (system): Remove cancellation handling.
1398 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1399 cancellation routines.
1401 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1402 (tcbhead_t): Add sysinfo field.
1403 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1404 (TLS_INIT_TP): Use INIT_SYSINFO.
1405 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1406 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1407 (MULTIPLE_THREADS_OFFSET): Adjust.
1408 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1409 (MULTIPLE_THREADS_OFFSET): Likewise.
1410 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1411 (MULTIPLE_THREADS_OFFSET): Likewise.
1412 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1413 (MULTIPLE_THREADS_OFFSET): Likewise.
1414 * descr.h: Include stdint.h.
1415 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1417 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1419 * libc_pthread_init.c: Include stdlib.h.
1420 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1421 (TLS_INIT_TP_EXPENSIVE): Define.
1422 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1423 __libc_maybe_call2): In _LIBC check SHARED define.
1424 * sysdeps/ia64/tls.h: New file.
1425 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1426 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1427 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1428 * sysdeps/sparc/sparc32/tls.h: New file.
1429 * sysdeps/sparc/sparc64/tls.h: New file.
1430 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1431 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1432 * Makefile (tests): Add tst-cancel[1-6].
1433 (tests-reverse): Add tst-cancel5.
1434 Link libc.so before libpthread.so for tests-reverse.
1435 * tst-cancel1.c: New file.
1436 * tst-cancel2.c: New file.
1437 * tst-cancel3.c: New file.
1438 * tst-cancel4.c: New file.
1439 * tst-cancel5.c: New file.
1440 * tst-cancel6.c: New file.
1442 2002-12-27 Andreas Schwab <schwab@suse.de>
1444 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1446 2002-12-22 Roland McGrath <roland@redhat.com>
1448 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1450 2002-12-21 Ulrich Drepper <drepper@redhat.com>
1452 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1453 Reported by Art Hass <ahaas@airmail.net>.
1455 2002-12-19 Jakub Jelinek <jakub@redhat.com>
1457 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1458 Use return 0 as 6th argument to FORWARD4.
1460 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1462 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1463 define if __ASSUME_LDT_WORKS > 0.
1464 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1465 struct member access if !FLOATING_STACKS.
1466 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1468 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1470 * internals.h (__pthread_thread_self): New prototype.
1471 (struct pthread_functions): Add ptr_pthread_thread_self field.
1472 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1473 (__pthread_thread_self): New function.
1474 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1475 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1476 use thread_self() directly if not FLOATING_STACKS.
1478 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1480 * sysdeps/x86_64/pt-machine.h: Guard most of the header
1481 with #ifndef __ASSEMBLER__.
1482 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1483 pthread_attr_init_2_0 use.
1485 2002-12-17 Jakub Jelinek <jakub@redhat.com>
1487 * wrapsyscall.c: Removed.
1489 * Makefile (distribute): Add tst-cancel-wrappers.sh.
1490 (routines): Remove weaks. Add forward,
1491 libc_pthread_init, libc-cancellation.
1492 (shared-only-routines): Remove weaks. Add forward.
1493 (libpthread-routines): Remove wrapsyscall.
1494 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1495 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1496 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1497 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1498 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1499 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1500 (libpthread-shared-only-routines): Add pt-allocrtsig.
1501 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1502 ($(objpfx)tst-cancel-wrappers.out): New rule.
1503 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1505 (__libc_maybe_call): In libpthread.* don't check for existance
1507 (__libc_maybe_call2): Define.
1508 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1509 __libc_lock_trylock, __libc_lock_unlock): Use it.
1510 * sysdeps/pthread/flockfile.c: New file.
1511 * sysdeps/pthread/ftrylockfile.c: New file.
1512 * sysdeps/pthread/funlockfile.c: New file.
1513 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1514 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1515 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1516 * libc-cancellation.c: New file.
1517 * forward.c: New file.
1518 * libc_pthread_init.c: New file.
1519 * pt-system.c: New file.
1520 * pthread.c: Remove locale.h.
1521 (__pthread_manager_thread): Initialize multiple_threads.
1522 (__pthread_multiple_threads): Declare.
1523 (pthread_functions): New variable.
1524 (__pthread_initialize_minimal): Remove __uselocale call.
1525 Call __libc_pthread_init.
1526 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1527 initial thread's multiple_threads and __libc_multiple_threads.
1528 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1530 (pthread_setschedparam, pthread_getschedparam): Rename to __
1531 prefixed variants. Add strong_alias.
1532 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1533 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1534 (init_rtsigs): Use __libc_current_sigrtmin_private.
1535 (pthread_initialize): Only call init_rtsigs if
1536 !__ASSUME_REALTIME_SIGNALS.
1537 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1538 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1539 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1540 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1541 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1542 __pthread_attr_getinheritsched, __pthread_attr_setscope,
1543 __pthread_attr_getscope, __pthread_cond_init,
1544 __pthread_cond_destroy, __pthread_cond_wait,
1545 __pthread_cond_signal, __pthread_cond_broadcast,
1546 __pthread_condattr_init, __pthread_condattr_destroy,
1547 __pthread_equal, __pthread_getschedparam,
1548 __pthread_setschedparam, __pthread_setcancelstate,
1549 __pthread_setcanceltype, __pthread_enable_asynccancel,
1550 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1551 (__pthread_mutex_init, __pthread_mutex_destroy,
1552 __pthread_mutex_lock, __pthread_mutex_unlock,
1553 __pthread_mutex_trylock): Likewise.
1555 (struct pthread_functions): New type.
1556 (__libc_pthread_functions): New variable.
1557 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1558 * descr.h (struct _pthread_descr_struct): Add
1559 p_header.data.multiple_threads field.
1560 * manager.c (pthread_handle_create): Initialize multiple_threads.
1561 * cancel.c (__pthread_enable_asynccancel,
1562 __pthread_disable_asynccancel): New functions.
1563 (__pthread_provide_wrappers): Remove.
1564 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1565 prefixed variants. Add strong_alias.
1566 * condvar.c (pthread_cond_init, pthread_cond_destroy,
1567 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1568 pthread_condattr_init, pthread_condattr_destroy): Likewise.
1569 * join.c (pthread_exit): Likewise.
1570 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1571 pthread_attr_getdetachstate, pthread_attr_setschedparam,
1572 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1573 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1574 pthread_attr_getinheritsched, pthread_attr_setscope,
1575 pthread_attr_getscope): Likewise.
1576 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1577 __pthread_mutex_lock, __pthread_mutex_unlock,
1578 __pthread_mutex_trylock): Add hidden_def.
1579 * Versions (libc): Add __libc_pthread_init,
1580 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1581 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1582 * lockfile.c: Remove some USE_IN_LIBIO guards.
1583 (__pthread_provide_lockfile): Remove.
1584 * pt-allocrtsig.c: New file.
1585 * tst-cancel-wrappers.sh: New test.
1587 2002-12-15 Ulrich Drepper <drepper@redhat.com>
1589 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1590 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1591 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
1592 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
1594 2002-12-10 Ulrich Drepper <drepper@redhat.com>
1596 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1597 weak. There is no reason for that.
1598 (CANCELABLE_SYSCALL_VA): Likewise.
1600 2002-12-09 Ulrich Drepper <drepper@redhat.com>
1602 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
1603 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
1604 * Versions: Export creat, poll, pselect, readv, select, sigpause,
1605 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
1606 libpthread in version GLIBC_2.3.2.
1608 2002-12-06 Ulrich Drepper <drepper@redhat.com>
1610 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1612 2002-12-05 Roland McGrath <roland@redhat.com>
1614 * pthread.c (__pthread_initialize_minimal)
1615 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
1616 TCB if the dynamic linker didn't do it at startup.
1618 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1620 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
1622 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1623 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
1625 2002-12-03 Roland McGrath <roland@redhat.com>
1627 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
1628 from dynamic linker internal cell to new libc cell.
1630 2002-11-28 Roland McGrath <roland@redhat.com>
1632 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
1633 before other headers, so FLOATING_STACKS is not defined wrongly.
1635 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
1636 even if [! FLOATING_STACKS].
1637 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
1638 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
1639 dl_osversion >= 2.3.99 and fatal if not.
1640 (TLS_DO_MODIFY_LDT): Use it.
1642 2002-11-28 Ulrich Drepper <drepper@redhat.com>
1644 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1645 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
1646 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1648 2002-11-19 Ulrich Drepper <drepper@redhat.com>
1650 * Versions (libc: GLIBC_2.0): Remove names of functions which are
1651 not defined in libc.
1652 * Makefile (shared-only-routines): Add weaks.
1653 * weaks.c: Remove functions which are not exported from libc.so.
1655 2002-11-14 Roland McGrath <roland@redhat.com>
1657 * libc-tsd.c: New file.
1658 * Makefile (distribute): Add it.
1659 (libc-link.so): New variable.
1660 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
1661 (libc-ok-for-link): New variable.
1662 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
1663 libc-ok-for-link to $(use-thread).
1664 [$(libc-ok-for-link) = no]
1665 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
1666 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
1668 (generated): Append them.
1669 (extra-objs): Append libc-tsd.os.
1671 * libc-tls-loc.c: New file.
1672 * Makefile (libpthread-routines): Add it.
1674 2002-11-14 Andreas Schwab <schwab@suse.de>
1676 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
1679 2002-11-13 Roland McGrath <roland@redhat.com>
1681 * Examples/ex6.c (main): Improve error reporting.
1683 2002-11-04 Ulrich Drepper <drepper@redhat.com>
1685 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
1686 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
1688 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
1690 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
1692 2002-10-22 Jakub Jelinek <jakub@redhat.com>
1694 * manager.c (pthread_start_thread): Call __uselocale even
1695 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
1697 2002-10-17 Roland McGrath <roland@redhat.com>
1699 * Makefile (unload): Don't link in libpthread.so.
1700 ($(objpfx)unload.out): Do depend on it.
1701 * unload.c (main): Improve error reporting.
1703 2002-10-09 Roland McGrath <roland@redhat.com>
1705 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
1706 Under [__PIC__], call the function via the pointer fetched for
1707 comparison rather than a call by name that uses the PLT.
1708 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
1709 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
1710 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
1711 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
1712 (__libc_key_create, __libc_getspecific, __libc_setspecific)
1713 (__libc_atfork): Use it.
1715 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
1716 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
1717 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
1718 (ld: GLIBC_PRIVATE): Set removed.
1720 2002-10-11 Ulrich Drepper <drepper@redhat.com>
1722 * sysdeps/unix/sysv/linux/execve.c: New file.
1724 2002-10-09 Jakub Jelinek <jakub@redhat.com>
1726 * no-tsd.c: Include stdlib.h.
1728 2002-10-07 Jakub Jelinek <jakub@redhat.com>
1730 * sysdeps/unix/sysv/linux/allocalim.h: New file.
1731 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
1733 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
1734 Pass stack size to caller.
1735 (pthread_handle_create): Set p_alloca_cutoff.
1736 * pthread.c (__pthread_initial_thread): Use C99 designated
1737 initializers. Set p_alloca_cutoff.
1738 (__pthread_manager_thread): Likewise.
1739 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
1741 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
1743 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
1745 * specific.c (__libc_alloca_cutoff): New function.
1746 * no-tsd.c (__libc_alloca_cutoff): New function.
1747 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
1750 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1752 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
1753 * sysdeps/sh/tls.h: Likewise.
1754 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1756 2002-09-29 Jakub Jelinek <jakub@redhat.com>
1758 * sysdeps/pthread/tst-timer.c (main): Clear
1759 SIGEV2.sigev_notify_attributes.
1761 2002-09-29 Ulrich Drepper <drepper@redhat.com>
1763 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
1764 INLINE_SYSCALL for set_thread_area syscall.
1766 2002-09-28 Roland McGrath <roland@redhat.com>
1768 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
1769 Don't call setrlimit, since we did no prior bogon we need to undo.
1771 2002-09-27 Roland McGrath <roland@redhat.com>
1773 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
1775 2002-09-24 Roland McGrath <roland@redhat.com>
1777 * sysdeps/x86_64/tls.h: New file.
1779 2002-09-23 Roland McGrath <roland@redhat.com>
1781 * Examples/ex13.c (dump_mut): int -> size_t for counter.
1783 2002-09-18 Bruno Haible <bruno@clisp.org>
1785 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
1786 an unexpected error code.
1788 * internals.h (__pthread_message): Add const to first parameter type.
1789 * pthread.c (__pthread_message): Likewise.
1791 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
1793 2002-09-17 Roland McGrath <roland@redhat.com>
1795 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
1796 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
1797 offset (positive or negative) relative to the thread struct.
1798 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
1800 2002-09-12 Jakub Jelinek <jakub@redhat.com>
1802 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
1803 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
1804 Replace /usr/lib/crt[in].o with crt[in].o too.
1806 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
1808 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
1810 2002-09-04 Bruno Haible <bruno@clisp.org>
1812 * pthread.c: Include <sys/time.h>.
1813 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
1814 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
1815 * Makefile (distribute): Add smp.h to the list.
1817 2002-09-04 Bruno Haible <bruno@clisp.org>
1819 * sysdeps/alpha/pt-machine.h: Choose different include file location
1820 on non-Linux platforms.
1822 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
1823 (open, open64): Change va_arg argument type to the integral type to
1824 which mode_t promotes.
1826 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
1827 the structure of 'struct sigevent'.
1829 * errno.c (__errno_location, __h_errno_location, __res_state):
1830 Use prototype function definitions.
1832 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
1834 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
1835 * sysdeps/powerpc/pt-machine.h: moved to...
1836 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
1837 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
1839 2002-09-02 Roland McGrath <roland@redhat.com>
1841 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
1843 2002-09-01 Roland McGrath <roland@redhat.com>
1845 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
1846 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
1848 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
1849 (__libc_internal_tsd_address): Declare it.
1850 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
1851 __libc_internal_tsd_address.
1852 * specific.c (libc_internal_tsd_address): New function.
1853 (__libc_internal_tsd_address): New variable.
1854 * no-tsd.c (__libc_internal_tsd_address): New variable.
1856 2002-08-31 Ulrich Drepper <drepper@redhat.com>
1858 * Makefile: Don't use rule for crt%.o, spell it out as rules for
1861 2002-08-30 Roland McGrath <roland@redhat.com>
1863 * Makefile (extra-objs, omit-deps): Add crtn.
1864 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
1865 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
1866 ($(objpfx)crtn.S): New target.
1867 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
1868 (generated): Add crtn.S.
1870 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
1871 crtn.o pathname too.
1873 2002-08-30 Jakub Jelinek <jakub@redhat.com>
1875 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
1878 2002-08-30 Roland McGrath <roland@redhat.com>
1880 * tst-static-locale.c: New file.
1881 * Makefile (tests, tests-static): Add it.
1883 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
1885 * spinlock.c (__pthread_lock): Fix spurious wakeup
1886 handling. Don't clear lowest bit of list pointer as sign the thread
1887 is still on the wait list. Don't restart after spurious wakeup
1888 with spinning to get the lock.
1889 (__pthread_unlock): Take set lowest bit into account when handling
1890 pointer to list elements.
1891 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
1893 2002-08-28 Roland McGrath <roland@redhat.com>
1895 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
1897 2002-08-28 Jakub Jelinek <jakub@redhat.com>
1899 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
1900 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1901 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1903 2002-08-28 Ulrich Drepper <drepper@redhat.com>
1905 * sysdeps/pthread/timer_routines.c (thread_func): Change return
1906 type to void and add casts in use to avoid warnings with all gcc
1909 2002-08-08 Jakub Jelinek <jakub@redhat.com>
1911 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
1913 * manager.c (__pthread_handles): Remove.
1914 * pthandles.c: New file.
1915 * pthread.c (__pthread_initialize_minimal): Initialize
1916 __pthread_handles[0] and __pthread_handles[1].
1917 * Makefile (libpthread-routines): Add pthandles (must be last).
1919 2002-08-26 Brian Youmans <3diff@gnu.org>
1921 * Examples/ex10.c: Corrected version number in Lesser GPL copying
1922 permission notice from 2 to 2.1.
1923 * Examples/ex11.c: Likewise.
1924 * Examples/ex13.c: Likewise.
1925 * Examples/ex8.c: Likewise.
1926 * Examples/ex9.c: Likewise.
1927 * barrier.c: Likewise.
1928 * events.c: Likewise.
1929 * lockfile.c: Likewise.
1930 * no-tsd.c: Likewise.
1931 * pt-machine.c: Likewise.
1932 * ptclock_gettime.c: Likewise.
1933 * ptclock_settime.c: Likewise.
1934 * rwlock.c: Likewise.
1935 * sysdeps/alpha/pspinlock.c: Likewise.
1936 * sysdeps/alpha/pt-machine.h: Likewise.
1937 * sysdeps/arm/pspinlock.c: Likewise.
1938 * sysdeps/arm/pt-machine.h: Likewise.
1939 * sysdeps/cris/pspinlock.c: Likewise.
1940 * sysdeps/cris/pt-machine.h: Likewise.
1941 * sysdeps/hppa/pspinlock.c: Likewise.
1942 * sysdeps/hppa/pt-machine.h: Likewise.
1943 * sysdeps/i386/i686/pt-machine.h: Likewise.
1944 * sysdeps/i386/pspinlock.c: Likewise.
1945 * sysdeps/i386/pt-machine.h: Likewise.
1946 * sysdeps/i386/useldt.h: Likewise.
1947 * sysdeps/ia64/pspinlock.c: Likewise.
1948 * sysdeps/ia64/pt-machine.h: Likewise.
1949 * sysdeps/m68k/pspinlock.c: Likewise.
1950 * sysdeps/m68k/pt-machine.h: Likewise.
1951 * sysdeps/mips/pspinlock.c: Likewise.
1952 * sysdeps/mips/pt-machine.h: Likewise.
1953 * sysdeps/powerpc/pspinlock.c: Likewise.
1954 * sysdeps/powerpc/pt-machine.h: Likewise.
1955 * sysdeps/pthread/bits/initspin.h: Likewise.
1956 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1957 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1958 * sysdeps/pthread/getcpuclockid.c: Likewise.
1959 * sysdeps/pthread/posix-timer.h: Likewise.
1960 * sysdeps/pthread/timer_create.c: Likewise.
1961 * sysdeps/pthread/timer_delete.c: Likewise.
1962 * sysdeps/pthread/timer_getoverr.c: Likewise.
1963 * sysdeps/pthread/timer_gettime.c: Likewise.
1964 * sysdeps/pthread/timer_routines.c: Likewise.
1965 * sysdeps/pthread/timer_settime.c: Likewise.
1966 * sysdeps/pthread/tst-timer.c: Likewise.
1967 * sysdeps/s390/pspinlock.c: Likewise.
1968 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1969 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1970 * sysdeps/sh/pspinlock.c: Likewise.
1971 * sysdeps/sh/pt-machine.h: Likewise.
1972 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1973 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1974 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1975 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1976 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1977 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1978 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1979 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1980 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1981 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1982 * tststack.c: Likewise.
1983 * unload.c: Likewise.
1984 * weaks.c: Likewise.
1985 * wrapsyscall.c: Likewise.
1987 * sysdeps/pthread/pt-initfini.c: Changed copying
1988 permission notice to Lesser GPL from Library GPL, including the
1989 references in the special exception.
1990 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
1991 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
1992 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
1994 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1996 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1998 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2000 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2001 overflow [PR libc/4244].
2003 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2005 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2006 compiler happy by adding a return statement which will never be
2009 * tst-context.c (main): Cast to long before casting to pointer.
2011 * Examples/ex17.c (main): Use correct format string.
2013 * Examples/ex9.c (thread): Remove incorrect return statement.
2015 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2017 * pthread.c (__linuxthreads_version): New global constant.
2019 2002-08-23 Andreas Jaeger <aj@suse.de>
2021 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2022 as thread specific register.
2023 (testandset): Fix inline asm.
2024 (THREAD_GETMEM): Fix inline asm.
2026 2002-08-22 Roland McGrath <roland@redhat.com>
2028 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2030 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2031 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2032 macro. That chooses whether to reuse %gs value or let kernel set it.
2033 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2034 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2037 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2039 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2040 also to the third definition of this macro.
2042 2002-06-17 Andreas Jaeger <aj@suse.de>
2044 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2047 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2049 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2050 loading/reading segment registers. Some old hardware doesn't
2051 handle the 32-bit instructions as expected.
2052 * sysdeps/i386/tls.h: Likewise.
2054 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2055 renamed to secondcall and use is negated.
2056 (TLS_SETUP_GS_SEGMENT): Likewise.
2057 (TLS_INIT_TP): Likewise.
2058 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2061 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2062 registers. No need to mask upper 16 bits in this case.
2063 * sysdeps/i386/useldt.h: Likewise.
2064 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2065 is the same since the GDT content changed.
2067 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2068 to TLS_SETUP_GS_SEGMENT.
2069 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2070 TLS_DO_SET_THREAD_AREA.
2071 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2072 entry number from %gs value.
2073 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2076 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2077 Pass true to _dl_deallocate_tls.
2078 (pthread_free): Likewise.
2079 * pthread.c (__pthread_initialize_manager): Likewise.
2081 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2083 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2084 computing index from %gs value.
2086 2002-08-16 Roland McGrath <roland@redhat.com>
2088 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2089 register value from entry number properly.
2091 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2092 optimally conditional on [__PIC__].
2093 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2094 without touching errno, and use latest modify_ldt-like interface.
2095 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2096 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2097 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2098 existing %gs value as the segment to set.
2099 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2100 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2101 by the first thread's early TLS setup.
2103 2002-08-15 Roland McGrath <roland@redhat.com>
2105 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2106 return a value as callers now expect.
2108 2002-08-11 Roland McGrath <roland@redhat.com>
2110 * pthread.c (__pthread_initialize_manager): Initialize
2111 p_header.data.tcb field of manager thread's descriptor.
2112 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2113 field, already done by TLS_INIT_TP.
2115 * manager.c (pthread_handle_create): Move p_header field initializers
2118 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2120 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2122 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2124 * pthread.c (__linuxthreads_initial_report_events): New variable.
2125 (__pthread_initialize_manager): Use it to initialize p_report_events
2127 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2129 2002-08-07 Roland McGrath <roland@redhat.com>
2131 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2132 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2134 2002-08-02 Roland McGrath <roland@redhat.com>
2136 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2137 Add _LIBC_TSD_KEY_LOCALE.
2138 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2139 Call __uselocale to initialize our per-thread locale pointer to
2141 * pthread.c (__pthread_initialize_minimal): Likewise.
2143 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2145 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2147 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2150 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2151 Don't use p_libc_specific element in thread descriptor.
2153 2002-07-30 Roland McGrath <roland@redhat.com>
2155 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2156 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2157 which does the right thing when __thread support is available.
2158 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2159 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2160 `p_h_errno', `p_resp', and `p_res' members.
2161 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2162 Don't initialize `p_errnop' and `p_h_errnop' members.
2163 (__pthread_reset_main_thread): Likewise.
2164 (__pthread_initialize_manager): Likewise.
2165 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2166 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2167 Don't initialize `p_resp' member.
2168 (__pthread_reset_main_thread): Likewise.
2169 * manager.c (pthread_handle_create): Likewise.
2170 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2171 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2172 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2173 * errno.c [USE_TLS && HAVE___THREAD]
2174 (__h_errno_location, __res_state): Don't define these at all.
2176 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2177 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2178 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2180 * weaks.c: Don't include <errno.h> here.
2182 2002-08-01 Roland McGrath <roland@redhat.com>
2184 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2186 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2187 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2188 (TLS_INIT_TP): Use that.
2190 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2192 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2193 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2194 (FREE_THREAD): Avoid modify_ldt if using GDT.
2195 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2197 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2199 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2200 * sysdeps/i386/pt-machine.h: Likewise.
2201 * sysdeps/i386/useldt.h: Likewise.
2203 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2205 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2206 call __libc_setup_tls first.
2207 * Makefile: Actually create tst-signal.out file when running the test.
2208 (tests): Add tststatic.
2209 * Examples/tststatic.c: New file.
2211 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2213 * errno.c (__errno_location): Don't define unless !USE_TLS
2215 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2216 * sysdeps/i386/tls.h: Likewise.
2217 * sysdeps/i386/useldt.h: Likewise.
2218 * sysdeps/i386/i686/pt-machine.h: Likewise.
2220 2002-07-02 H.J. Lu <hjl@gnu.org>
2222 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2224 * sysdeps/mips/pt-machine.h: Likewise.
2226 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2228 * manager.c (pthread_handle_create): Initialize self-reference in
2231 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2233 * Examples/ex9.c (main): Remove unused th variable.
2235 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2237 * wrapsyscall.c: Add __nanosleep alias.
2238 * Versions (GLIBC_2.2.6): Add __nanosleep.
2239 * bug-sleep.c: New file.
2240 * Makefile (tests): Add bug-sleep.
2242 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2244 * Examples/ex9.c (main): Use list of children and join them.
2245 (thread): Do not call exit.
2247 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2249 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2250 Unconditionally use the code using spinlock. Use __pthread_release
2252 (wait_node_free): Likewise.
2253 (__pthread_acquire, __pthread_release): Unconditionally define.
2255 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2257 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2259 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2261 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2263 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2265 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2267 (pthread_cancel): Likewise.
2268 * internals.h (__pthread_create_2_1): Likewise.
2269 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2271 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2273 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2274 Patch by Glen Nakamura <gen@flex.com>.
2276 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2278 * signals.c: Move sighandler functions to...
2279 * sighandler.c: ...here. New file.
2280 * signals.c: Move signal handler related type definitions to...
2281 * internals.h: ...here. Add prototypes for signal handlers.
2282 * Makefile (libpthread-routines): Add sighandler.
2283 (CFLAGS-sighandler.c): Add $(exceptions).
2285 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2287 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2289 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2291 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2292 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2293 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2294 based on previous one and not on current time. Count overruns.
2295 Patch by Eric F. Sorton <eric@cctcorp.com>.
2297 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2299 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2301 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2302 if it isn't defined yet.
2303 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2304 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2306 * sysdeps/sh/tls.h: New file.
2308 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2310 * manager.c (__pthread_manager_event): Use self instead of arg
2311 for INIT_THREAD_SELF.
2312 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2313 _pthread_descr_struct) instead of sizeof (*descr).
2315 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2317 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2318 * sysdeps/alpha/pt-machine.h: Likewise.
2319 * sysdeps/arm/pt-machine.h: Likewise.
2320 * sysdeps/cris/pt-machine.h: Likewise.
2321 * sysdeps/hppa/pt-machine.h: Likewise.
2322 * sysdeps/m68k/pt-machine.h: Likewise.
2323 * sysdeps/mips/pt-machine.h: Likewise.
2324 * sysdeps/powerpc/pt-machine.h: Likewise.
2325 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2326 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2327 * sysdeps/sh/pt-machine.h: Likewise.
2328 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2329 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2330 * sysdeps/x86_64/pt-machine.h: Likewise.
2332 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2334 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2335 instead of pthread_mutexattr_setkind_np.
2336 (pthread_mutexattr_gettype): Similarly.
2337 * man/pthread_mutexattr_setkind_np.man: New.
2338 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2340 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2342 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2344 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2346 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2348 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2350 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2352 2002-03-17 Andreas Jaeger <aj@suse.de>
2354 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2356 * sysdeps/alpha/pt-machine.h: Likewise.
2357 * sysdeps/arm/pt-machine.h: Likewise.
2358 * sysdeps/cris/pt-machine.h: Likewise.
2359 * sysdeps/hppa/pt-machine.h: Likewise.
2360 * sysdeps/i386/i686/pt-machine.h: Likewise.
2361 * sysdeps/ia64/pt-machine.h: Likewise.
2362 * sysdeps/m68k/pt-machine.h: Likewise.
2363 * sysdeps/mips/pt-machine.h: Likewise.
2364 * sysdeps/powerpc/pt-machine.h: Likewise.
2365 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2366 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2367 * sysdeps/sh/pt-machine.h: Likewise.
2368 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2369 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2370 * sysdeps/x86_64/pt-machine.h: Likewise.
2372 * internals.h: Move testandset and __compare_and_swap prototypes
2375 2002-03-03 Andreas Jaeger <aj@suse.de>
2377 * errno.c: Include resolv.h to avoid warning.
2379 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2381 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2384 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2386 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2387 into account if USE_TLS.
2388 * manager.c (pthread_handle_create): Free TLS data structures if call
2389 failed. Pass correct stack to clone if USE_TLS.
2390 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2391 * sysdeps/i386/i686/pt-machine.h: Likewise.
2392 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2394 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2395 Add p_stackaddr element #if USE_TLS.
2396 * internals.c: Include <tls.h>.
2397 * manager.c: Integrate creating and handling of thread descriptor
2399 * pthread.c: Likewise.
2400 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2401 Include <linuxthreads/descr.h> only if TLS is really used.
2402 (GET_DTV): New macro.
2403 (TLS_INIT_TP): Initialize self pointer.
2405 2002-02-17 Andreas Schwab <schwab@suse.de>
2407 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2410 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2412 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2413 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2415 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2417 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2419 2002-02-08 Richard Henderson <rth@redhat.com>
2421 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2423 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2428 2002-02-07 H.J. Lu <hjl@gnu.org>
2430 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2432 (__pthread_spin_lock): Remove ".set noreorder".
2433 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2435 2002-02-05 H.J. Lu <hjl@gnu.org>
2437 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2439 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2440 (__compare_and_swap): Likewise.
2442 2002-02-07 Ulrich Drepper <drepper@redhat.com>
2444 * internals.h: Move declarations/definitions of
2445 __pthread_initial_thread_bos, __pthread_initial_thread,
2446 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2447 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2448 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2450 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2451 Define THREAD_GETMEM accordingly.
2453 2002-02-06 Ulrich Drepper <drepper@redhat.com>
2455 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2457 * sysdeps/i386/tls.h: Define THREAD_DTV.
2459 2002-02-04 Ulrich Drepper <drepper@redhat.com>
2461 * internals.h: Move thread descriptor definition...
2462 * descr.h.: ...here. New file.
2463 * sysdeps/i386/tls.h: New file.
2465 2002-02-01 H.J. Lu <hjl@gnu.org>
2467 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2468 different register in the delayed slot. Use branch likely.
2470 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2471 (__compare_and_swap): Return 0 only when failed to compare. Use
2474 2002-02-01 Jakub Jelinek <jakub@redhat.com>
2476 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2477 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2478 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2479 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2480 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2481 * sysdeps/sparc/sparc64/Versions: New file.
2482 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2484 2002-01-31 Ulrich Drepper <drepper@redhat.com>
2486 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2487 in SHARED code, use GL(dl_cpuclock_offset).
2489 2002-01-28 Andreas Jaeger <aj@suse.de>
2491 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2492 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2494 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
2496 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2497 (CURRENT_STACK_FRAME): Remove duplicate definition.
2498 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2500 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
2502 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2505 2002-01-12 Andreas Schwab <schwab@suse.de>
2507 * Makefile (test-srcs): Add tst-signal.
2508 (tests): Run tst-signal.
2509 (distribute): Add tst-signal.sh.
2510 * tst-signal.c, tst-signal.sh: New files.
2512 2002-01-14 Andreas Jaeger <aj@suse.de>
2514 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2516 2002-01-11 Andreas Schwab <schwab@suse.de>
2518 * signals.c (sighandler): Initialize all elements to SIG_ERR.
2519 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2521 2002-01-06 Richard Henderson <rth@redhat.com>
2523 * sysdeps/alpha/elf/pt-initfini.c: New file.
2525 2001-12-29 Andreas Jaeger <aj@suse.de>
2527 * Examples/ex9.c: Add noreturn attribute for thread.
2528 * Examples/ex10.c: Likewise.
2529 * Examples/ex13.c (thread_start): Likewise.
2530 * Examples/ex15.c (worker): Likewise.
2532 * Examples/ex18.c: Include unistd.h for prototype of sleep.
2534 2001-12-14 Ulrich Drepper <drepper@redhat.com>
2536 * man/pthread_atfork.man: Adjust description of mutex handling
2537 after fork for current implementation.
2538 * linuxthreads.texi: Likewise [PR libc/2519].
2540 2001-12-13 Andreas Schwab <schwab@suse.de>
2542 * specific.c (pthread_key_delete): Don't contact the thread
2543 manager if no threads have been created yet.
2545 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
2547 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2548 qualifier to be safe.
2550 2001-11-30 Andreas Schwab <schwab@suse.de>
2552 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2553 that self is the manager thread, and initialize the thread
2555 (thread_self_stack) [THREAD_SELF]: New function to find self via
2557 * manager.c (pthread_handle_create): Don't block cancel signal any
2560 2001-11-29 Andreas Jaeger <aj@suse.de>
2562 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2564 (INIT_THREAD_SELF): New.
2565 (THREAD_GETMEM): New.
2567 (THREAD_SETMEM): New.
2568 (THREAD_SETMEM_NC): New.
2569 (FLOATING_STACKS): Define.
2570 (ARCH_STACK_MAX_SIZE): Define.
2572 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
2574 Bugfix to pthread_key_delete. It was iterating over the thread
2575 manager's linked list of threads, behind the thread manager's
2576 back causing a race. The fix is to have the manager iterate over
2577 the threads instead, using a new request type for doing so.
2578 * internals.h (struct pthread_request): New manager request type
2579 REQ_FOR_EACH_THREAD.
2580 * manager.c (pthread_for_each_thread): New function.
2581 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2582 * specific.c (struct pthread_key_delete_helper_args): New type.
2583 (pthread_key_delete_helper): New static function.
2584 (pthread_key_delete): Use the new thread manager
2585 REQ_FOR_EACH_THREAD function to iterate over the threads and set
2586 the delete key slot to a null value in each thread.
2587 * Examples/ex18.c: New test.
2588 * Makefile (tests): Add ex18.
2590 2001-11-22 Wolfram Gloger <wg@malloc.de>
2592 * pthread.c (pthread_onexit_process): Don't call free
2593 after threads have been asynchronously terminated.
2595 * manager.c (pthread_handle_exit): Surround cancellation
2596 of threads with __flockfilelist()/__funlockfilelist().
2598 2001-11-26 Andreas Schwab <schwab@suse.de>
2600 * manager.c (pthread_handle_create): Start the child thread with
2601 the cancel signal blocked, so that it does not handle it before
2602 the thread register is set up. Save errno from failed clone call.
2604 2001-11-15 Ulrich Drepper <drepper@redhat.com>
2606 * sysdeps/i386/i686/Implies: Removed.
2607 * sysdeps/i386/i686/Versions: New file.
2609 2001-10-31 Andreas Jaeger <aj@suse.de>
2611 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2613 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
2615 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
2616 to __linuxthreads_pthread_sizeof_descr to match name used by
2617 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
2618 linuxthreads_db/td_symbol_list.c.
2620 2001-09-22 Andreas Jaeger <aj@suse.de>
2622 * linuxthreads/tst-context.c: Avoid compile warning.
2624 2001-09-20 Andreas Jaeger <aj@suse.de>
2626 * shlib-versions: Add x86-64.
2628 2001-09-19 Andreas Jaeger <aj@suse.de>
2630 * sysdeps/x86_64/Makefile: New file.
2631 * sysdeps/x86_64/pspinlock.c: New file.
2632 * sysdeps/x86_64/pt-machine.h: New file.
2634 2001-09-12 Jakub Jelinek <jakub@redhat.com>
2636 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
2638 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2640 2001-09-11 Ulrich Drepper <drepper@redhat.com>
2641 Wolfram Gloger <wg@malloc.de>
2643 * join.c: Protect all communications from and to manager with
2645 * manager.c: Likewise.
2646 * pthread.c: Likewise.
2647 * smeaphore.c: Likewise.
2649 2001-08-29 Ulrich Drepper <drepper@redhat.com>
2651 * spinlock.c (__pthread_lock): Top max_count value with
2652 MAX_ADAPTIVE_SPIN_COUNT.
2653 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
2655 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
2658 2001-08-27 Jakub Jelinek <jakub@redhat.com>
2660 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
2661 non-opaque type if __USE_UNIX98.
2663 2001-08-26 Jakub Jelinek <jakub@redhat.com>
2665 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
2666 non-opaque lock types also if _IO_MTSAFE_IO is defined.
2668 2001-08-23 Roland McGrath <roland@frob.com>
2670 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
2671 new first argument, skip the cleanup handler if it's zero.
2672 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
2673 (__libc_lock_define_initialized_recursive): Use it.
2674 * sysdeps/pthread/bits/stdio-lock.h: File removed.
2675 The sysdeps/generic file from the main tree now suffices.
2677 2001-08-22 Roland McGrath <roland@frob.com>
2679 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
2680 instead of <pthread.h>.
2681 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
2682 (_IO_lock_initializer): Add braces.
2683 (_IO_lock_lock): Use __libc_lock_lock_recursive.
2684 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
2686 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
2687 (__libc_lock_define_initialized_recursive): Use it.
2688 (__libc_lock_init_recursive): Likewise.
2689 (__libc_lock_fini_recursive): Likewise.
2690 (__libc_lock_lock_recursive): Likewise.
2691 (__libc_lock_trylock_recursive): Likewise.
2692 (__libc_lock_unlock_recursive): Likewise.
2693 (__libc_lock_define_recursive): New macro.
2695 2001-08-14 Jakub Jelinek <jakub@redhat.com>
2697 * lockfile.c (__pthread_provide_lockfile): New variable.
2698 * pthread.c (__pthread_require_lockfile): New variable.
2699 * cancel.c (__pthread_require_lockfile): New variable.
2701 2001-07-31 Ulrich Drepper <drepper@redhat.com>
2703 * tst-context.c (threadfct): Initialize context before calling
2706 * Examples/ex17.c: Make sure test thread is around long enough.
2708 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
2710 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
2712 2001-07-24 Ulrich Drepper <drepper@redhat.com>
2714 * tst-context.c (main): Print explanation before bailing out
2715 because context handling is not supported.
2717 2001-07-23 Ulrich Drepper <drepper@redhat.com>
2719 * Makefile (tests): Add tst-context.
2720 * tst-context.c: New file.
2722 * sysdeps/pthread/bits/stdio-lock.h: Define
2723 _IO_cleanup_region_start_noarg.
2725 2001-07-23 Jakub Jelinek <jakub@redhat.com>
2727 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
2728 (ARCH_STACK_MAX_SIZE): Define.
2729 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2730 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2732 2001-07-19 Jakub Jelinek <jakub@redhat.com>
2734 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
2736 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
2737 (ARCH_STACK_MAX_SIZE): Define.
2738 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
2739 NEED_SEPARATE_REGISTER_STACK.
2741 2001-07-16 Andreas Schwab <schwab@suse.de>
2743 * Makefile (before-compile): Don't add $(objpfx)crti.o.
2744 (omit-deps): Add crti.
2745 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
2746 it is filtered out of the link command.
2748 2001-07-16 Ulrich Drepper <drepper@redhat.com>
2750 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
2751 to find the right value for __pthread_initial_thread_bos, it's not
2752 used. If not FLOATING_STACKS first run
2753 __pthread_init_max_stacksize.
2755 2001-06-16 H.J. Lu <hjl@gnu.org>
2757 * internals.h: Include <stackinfo.h>.
2759 * attr.c: Don't include <stackinfo.h> here.
2760 * cancel.c: Likewise.
2761 * manager.c: Likewise.
2762 * pthread.c: Likewise.
2763 * ptlongjmp.c: Likewise.
2765 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
2767 * attr.c: Make _STACK_GROWS_UP work.
2768 * internals.h: Likewise.
2769 * manager.c: Likewise.
2770 * pthread.c: Likewise.
2772 2001-06-15 H.J. Lu <hjl@gnu.org>
2774 * pthread.c (__pthread_reset_main_thread): Fix a typo.
2776 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
2778 * semaphore.h: Use struct _pthread_fastlock as an element of
2779 sem_t instead of an identical struct.
2780 * rwlock.c: Remove casts.
2781 * semaphore.c: Likewise.
2783 2001-04-30 Alan Modra <amodra@one.net.au>
2785 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
2787 2001-05-25 Bruce Mitchener <bruce@cubik.org>
2789 * linuxthreads.texi: Spelling corrections.
2791 2001-05-25 Ulrich Drepper <drepper@redhat.com>
2793 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
2794 returning successfully.
2795 Patch by Gene Cooperman <gene@ccs.neu.edu>.
2797 2001-05-24 Ulrich Drepper <drepper@redhat.com>
2799 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
2800 serious work try once whether the lock is uncontested.
2801 Remove duplicate reading of __status before loop.
2802 Change suggested by Hans Boehm <hans_boehm@hp.com>.
2804 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
2805 (__pthread_alt_trylock): Likewise.
2807 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
2809 Memory barrier overhaul following line by line inspection.
2810 * mutex.c (pthread_once): Missing memory barriers added.
2811 * pthread.c (__pthread_wait_for_restart_signal,
2812 __pthread_timedsuspend_new, __pthread_restart_new): Added
2813 memory barriers ``just in case'' and for documentary value.
2814 * spinlock.c (__pthread_release): New inline function for releasing
2815 spinlock, to complement __pthread_acquire. Includes memory
2816 barrier prior to assignment to spinlock, and __asm __volatile
2817 dance to prevent reordering or optimization of the spinlock access.
2818 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
2819 __pthread_alt_timedlock, __pthread_alt_unlock,
2820 __pthread_compare_and_swap): Updated to use new __pthread_release
2821 instead of updating spinlock directly.
2822 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
2823 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
2824 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
2825 Memory barrier overhaul. Lots of missing memory barriers added,
2826 a couple needless ones removed.
2827 * spinlock.c (__pthread_compare_and_swap): testandset optimization
2828 removed, just calls __pthread_acquire, which has the new read
2829 barrier in it before its testandset.
2831 2001-05-20 Roland McGrath <roland@frob.com>
2833 * Makeconfig: New file, variables used to be in main libc Makeconfig.
2835 2001-05-09 Geoff Keating <geoffk@redhat.com>
2837 * sysdeps/powerpc/pt-machine.h
2838 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
2839 (__compare_and_swap): Remove memory barriers.
2840 (__compare_and_swap_with_release_semantics): New function.
2842 2001-04-24 Andreas Jaeger <aj@suse.de>
2844 * wrapsyscall.c: send* and recv* return ssize_t.
2846 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
2847 mutex instead of double locking it.
2848 Reported by Pierre Artaud <partaud@sodatec.com>.
2850 2001-04-23 Ulrich Drepper <drepper@redhat.com>
2852 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
2853 using #ifdef whether the clock is available.
2854 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
2856 * sysdeps/ia64/Versions: New file.
2858 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
2859 have to call __gmon_start__ in the libpthread DSO.
2860 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
2862 * Makefile (libpthread-routines): Add ptclock_gettime and
2864 * internals.h: Don't use cpuclock-init.h definitions, use
2865 hp-timing.h definitions.
2866 * pthread.c: Likewise.
2867 * manager.c: Likewise.
2868 * ptclock_gettime.c: New file.
2869 * ptclock_settime.c: New file.
2870 * internals.h: Fix parameter type for __pthread_clock_gettime and
2871 __pthread_clock_settime.
2873 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
2874 * sysdeps/i386/i586/ptclock_settime.c: Removed.
2875 * sysdeps/i386/i586/Makefile: Removed.
2877 2001-04-22 Ulrich Drepper <drepper@redhat.com>
2879 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
2880 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2882 2001-04-21 Andreas Jaeger <aj@suse.de>
2884 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
2885 attribute, remove statements that will never be executed.
2886 (thread_func): Remove mutex_unlock call since it's never executed.
2887 (thread_func): Fix comment as suggested by Jakub Jelinek.
2889 * manager.c (__pthread_manager): Add noreturn
2891 (pthread_start_thread): Likewise, remove return statement.
2892 (pthread_start_thread_event): Likewise.
2893 Add noreturn attribute for pthread_handle_exit.
2894 * weaks.c: Add noreturn attribute for pthread_exit.
2896 * internals.h: Add __pthread_clock_gettime and
2897 __pthread_clock_settime prototypes.
2899 2001-04-21 Ulrich Drepper <drepper@redhat.com>
2901 * internals.h: Include <cpuclock-init.h>.
2902 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
2903 CPUCLOCK_VARDEF is defined.
2904 * pthread.c (__pthread_initialize_minimal): Initialize
2905 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
2906 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
2907 for new thread to current CPU clock value.
2909 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
2911 * sysdeps/i386/i586/Makefile: New file.
2912 * sysdeps/i386/i586/Versions: New file.
2913 * sysdeps/i386/i586/ptclock_gettime.c: New file.
2914 * sysdeps/i386/i586/ptclock_settime.c: New file.
2915 * sysdeps/i386/i686/Implies: New file.
2917 2001-04-18 Jakub Jelinek <jakub@redhat.com>
2919 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
2920 $generated, not $postclean-generated.
2922 2001-04-18 Andreas Jaeger <aj@suse.de>
2924 * Makefile (otherlibs): Added.
2926 2001-04-18 Jakub Jelinek <jakub@redhat.com>
2928 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2930 2001-04-16 Ulrich Drepper <drepper@redhat.com>
2932 * signals.c (sigwait): NSIG is no signal number. Block all
2933 signals while in signal handler for signals in SET.
2934 Patch by Manfred Spraul <manfred@colorfullife.com>.
2936 2001-04-12 Ulrich Drepper <drepper@redhat.com>
2938 * tst-cancel.c: Disable most tests. Add new test where all
2939 cleanup handlers must run.
2940 * Makefile (tests): Add tst-cancel again.
2942 * cancel.c (__pthread_perform_cleanup): Correct condition for
2943 leaving cleanup loop early.
2945 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
2946 all the files which use CURRENT_STACK_FRAME.
2947 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
2948 __builtin_frame_address.
2949 * sysdeps/i386/i686/pt-machine.h: Likewise.
2951 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2953 * Makefile (tests): Comment out tst-cancel for now.
2955 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
2956 temporary file in object directory.
2957 * Makefile: Don't allow inlining when compiling tst-cancel.c.
2958 Pass $(objpfx) to tst-cancel.
2960 2001-04-11 David S. Miller <davem@redhat.com>
2962 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
2963 up closer to user local variables so that new cleanup heuristics work.
2964 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
2966 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2968 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
2970 (_pthread_cleanup_push_defer): Likewise.
2972 * tst-cancel.c (main): Fix loop printing cleanup output.
2974 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
2976 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
2978 (__pthread_spin_trylock): Likewise.
2979 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2981 2001-04-10 Ulrich Drepper <drepper@redhat.com>
2983 * join.c (pthread_exit): Move code to new function __pthread_do_exit
2984 which takes an extra parameter with the current frame pointer.
2985 Call new function with CURRENT_STACK_FRAME.
2986 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
2987 with the new parameter.
2988 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
2989 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
2990 this parameter as the initial value the cleanup handler records are
2991 compared against. No active cleanup handler record must have an
2992 address lower than the previous one and the initial record must be
2993 above (below on PA) the frame address passed in.
2994 (pthread_setcancelstate): Call __pthread_do_exit instead of
2996 (pthread_setcanceltype): Likewise.
2997 (pthread_testcancel): Likewise.
2998 (_pthread_cleanup_pop_restore): Likewise.
2999 * condvar.c (pthread_cond_wait): Likewise.
3000 (pthread_cond_timedwait_relative): Likewise.
3001 * manager.c (pthread_start_thread): Likewise.
3002 * oldsemaphore.c (__old_sem_wait): Likewise.
3003 * pthread.c (pthread_handle_sigcancel): Likewise.
3004 * semaphore.c (__new_sem_wait): Likewise.
3005 (sem_timedwait): Likewise.
3006 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3007 to limit the cleanup handlers which get run.
3008 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3009 for __pthread_perform_cleanup.
3011 * Makefile (tests): Add tst-cancel.
3012 * tst-cancel.c: New file.
3014 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3016 * sysdeps/cris/pt-machine.h: New file.
3017 * sysdeps/cris/pspinlock.c: New file.
3019 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3021 * shlib-versions: Add case for Linux on CRIS.
3023 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3025 * attr.c (pthread_getattr_np): Correct computation of stack size
3026 for machiens with register stack.
3028 * Examples/ex17.c (main): Correct detection of failed mmap call.
3030 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3032 * pthread.c (__pthread_initialize_manager): Fix a typo.
3034 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3036 * attr.c (__pthread_attr_setstack): Fix alignment check.
3037 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3038 * Makefile (tests): Add ex17 test.
3039 * Examples/ex17.c: New test.
3041 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3043 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3044 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3045 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3047 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3049 * Makefile: When generating DSO link with libc_nonshared.a.
3051 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3053 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3055 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3057 * internals.h (__pthread_init_max_stacksize): New prototype.
3058 * attr.c (__pthread_attr_setstacksize): Call
3059 __pthread_init_max_stacksize if not yet initialized.
3060 * pthread.c (__pthread_init_max_stacksize): New function.
3061 (__pthread_initialize_manager): Call it.
3062 Patch by <dtc@cmucl.cons.org>.
3064 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3066 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3068 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3070 * shlib-versions: Add rule for Linux on 64 bit S/390.
3071 * sysdeps/s390/s390-64/pt-machine.h: New file.
3072 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3074 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3076 * sysdeps/s390/pt-machine.h: Move to...
3077 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3078 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3080 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3082 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3083 * attr.c: Implement pthread_getattr_np.
3084 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3085 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3086 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3088 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3090 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3093 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3095 * manager.c (manager_mask): Removed static vesion. Now always local
3096 to __pthread_manager().
3097 (manager_mask_all): Removed completely.
3098 (__pthread_manager): Remove manager_mask_all initialization.
3099 (pthread_handle_create): Remove code to set and reset signal mask
3100 around __clone2() calls.
3102 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3104 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3105 memory on every spin.
3107 2001-02-10 Andreas Jaeger <aj@suse.de>
3109 * Makefile (extra-objs): New.
3111 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3113 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3114 __pthread_initialize_minimal prototype.
3116 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3118 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3120 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3122 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3124 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3126 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3127 broken code. Patch by Jes Sorensen.
3129 2001-02-06 Andreas Jaeger <aj@suse.de>
3131 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3133 * internals.h: ...here.
3135 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3137 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3139 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3141 * Versions: Remove __pthread_initialize_minimal.
3143 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3145 * Makefile: Add rules to build crti.o and make it being used in
3146 building libpthread.so.
3147 * sysdeps/i386/Makefile: New file.
3148 * sysdeps/pthread/pt-initfini.c: New file.
3150 * pthread.c: Cleanups.
3152 2001-01-28 Andreas Jaeger <aj@suse.de>
3154 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3155 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3156 * spinlock.c: Likewise.
3158 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3160 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3161 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3162 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3163 * pthread.c: Likewise.
3164 * spinlock.h: Likewise.
3165 * sysdeps/pthread/pthread.h: Likewise.
3167 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3169 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3170 as struct __pthread_attr_s.
3172 * semaphore.h (sem_t): Cleanup namespace, rename status and
3175 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3177 * pthread.c (pthread_onexit_process): Clear
3178 __pthread_manager_thread_bos after freeing it.
3179 * Makefile (tests): Add ex16.
3180 * Examples/ex16.c: New file.
3182 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3184 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3186 * pthread.c (pthread_exit_process): Rename to...
3187 (pthread_onexit_process): ...this.
3188 (pthread_atexit_process, pthread_atexit_retcode): New.
3189 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3190 and only if HAVE_Z_NODELETE is not defined.
3191 (__pthread_initialize_manager): Register pthread_atexit_retcode
3194 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3196 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3198 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3200 * Makefile (tests): Add ex15.
3201 * Examples/ex15.c: New test.
3203 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3205 * pthread.c (pthread_exit_process): Free memory allocated for
3208 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3210 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3211 (pthread_free): Always unmap the stack. It's safe now that we don't
3212 use MAP_FIXED to allocate stacks.
3214 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3216 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3218 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3220 2000-11-15 Wolfram Gloger <wg@malloc.de>
3222 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3223 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3225 2000-12-27 Andreas Jaeger <aj@suse.de>
3227 * Examples/ex13.c: Make local functions static.
3228 * ecmutex.c: Likewise.
3229 * joinrace.c: Likewise.
3230 * Examples/ex14.c: Likewise.
3232 * Examples/ex2.c: Make local functions static; reformat.
3233 * Examples/ex1.c: Likewise.
3234 * Examples/ex4.c: Likewise.
3235 * Examples/ex5.c: Likewise.
3236 * Examples/ex7.c: Likewise.
3238 * oldsemaphore.c: Add prototypes to shut up GCC.
3239 * pt-machine.c: Likewise.
3241 * weaks.c: Add prototype for pthread_exit.
3243 * internals.h: Add some prototypes, format prototypes and add
3245 Move __libc_waitpid prototype to include/sys/wait.h.
3247 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3248 * mutex.c: Likewise.
3249 * specific.c: Likewise.
3250 * ptfork.c: Likewise.
3252 * lockfile.c: Include internals.h to get prototypes.
3253 * events.c: Likewise.
3254 * sysdeps/alpha/pspinlock.c: Likewise.
3255 * sysdeps/arm/pspinlock.c: Likewise.
3256 * sysdeps/hppa/pspinlock.c: Likewise.
3257 * sysdeps/i386/pspinlock.c: Likewise.
3258 * sysdeps/ia64/pspinlock.c: Likewise.
3259 * sysdeps/m68k/pspinlock.c: Likewise.
3260 * sysdeps/mips/pspinlock.c: Likewise.
3261 * sysdeps/powerpc/pspinlock.c: Likewise.
3262 * sysdeps/s390/pspinlock.c: Likewise.
3263 * sysdeps/sh/pspinlock.c: Likewise.
3264 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3265 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3266 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3268 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3270 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3271 (__pthread_attr_getstack): Return correct address.
3272 Add warnings for using pthread_attr_getstackaddr and
3273 pthread_attr_setstackaddr.
3275 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3277 * Examples/ex6.c (test_thread): Make static.
3278 * Examples/ex12.c (test_thread): Make static and add noreturn
3281 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3283 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3284 and compare_and_swap_with_release_semantics returns int not long.
3286 2000-12-17 Andreas Jaeger <aj@suse.de>
3288 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3290 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3291 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3292 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3293 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3294 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3295 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3297 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3299 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3300 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3302 2000-12-17 Andreas Jaeger <aj@suse.de>
3304 * internals.h: Add prototypes for testandset and
3305 __compare_and_swap to shut up gcc warnings.
3307 2000-12-06 Wolfram Gloger <wg@malloc.de>
3309 * join.c (pthread_detach): Allow case where the thread has already
3312 2000-12-05 Andreas Jaeger <aj@suse.de>
3314 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3315 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3316 (__compare_and_swap): Likewise.
3317 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3319 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3321 * Examples/ex3.c (main): Cast int to long before casting to void *.
3322 (search): Cast void * to long, not int.
3323 * Examples/ex8.c (main, thread): Similarly.
3324 * Examples/ex11.c (main): Similarly.
3325 * Examples/ex14.c (worker, do_test): Similarly.
3326 * ecmutex.c (worker, do_test): Similarly.
3327 (nlocks): Cast to int.
3329 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3331 * linuxthreads.texi: Add documentation for pthreads attributes
3332 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3333 patch. Document pthread_[sg]etconcurrency(). Mark
3334 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3336 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3338 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3340 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3341 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3343 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3345 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3346 not doing it right now.
3347 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3349 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3351 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3354 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3356 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3357 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3359 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3360 discussing mutexes. (As per the Unix98 name for the API.)
3361 Changes documentation for pthread_mutexattr_setkind_np() and
3362 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3363 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3364 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3365 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3366 Begins to introduce discussion of the ``timed'' mutex type. This
3367 discussion is currently incomplete.
3368 Patch by Bruce Mitchener <bruce@cubik.org>.
3370 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3371 Yutaka Niibe <gniibe@chroot.org>
3373 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3374 has restrictions, use register.
3376 2000-10-23 Andreas Schwab <schwab@suse.de>
3378 * Examples/ex14.c (TIMEOUT): Override default timeout.
3380 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3382 * specific.c: Protect tsd array modification in thread data
3383 structures by getting the thread lock in pthread_key_delete and
3384 __pthread_destroy_specifics.
3385 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3387 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3389 * sysdeps/pthread/bits/initspin.h: New file.
3390 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3391 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3392 (__pthread_alt_init_lock): Likewise.
3393 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3395 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3397 * oldsemaphore.c (__old_sem_init): Release lock with
3398 LT_SPINLOCK_INIT, not zero.
3399 * spinlock.c (__pthread_unlock): Likewise.
3400 (__pthread_alt_lock): Likewise.
3401 (__pthread_alt_timedlock): Likewise.
3402 (__pthread_alt_unlock): Likewise.
3403 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3404 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3405 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3406 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3408 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3410 * shlib-versions: Add version definitions for hppa-linux.
3412 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3414 * sysdeps/hppa/pspinlock.c: New file.
3415 * sysdeps/hppa/pt-machine.h: New file.
3416 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3418 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3420 * mutex.c (__pthread_mutex_destroy): Correct test of
3421 busy mutex for mutexes using alternate fastlocks.
3422 Patch by dtc@cmucl.cons.org.
3424 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3426 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3428 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3430 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3431 test for owner first.
3432 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3434 * cancel.c (pthread_cancel): Don't do anything if cancelation is
3437 2000-09-26 Ulrich Drepper <drepper@redhat.com>
3439 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3440 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3442 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3443 _POSIX_MONOTONIC_CLOCK.
3445 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3448 2000-09-20 Andreas Jaeger <aj@suse.de>
3450 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3451 "testrtsig.h" conditional.
3453 2000-09-11 Ulrich Drepper <drepper@redhat.com>
3455 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3456 pthread_attr_setstack.
3457 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3458 pthread_attr_setstack.
3459 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3461 2000-09-05 Ulrich Drepper <drepper@redhat.com>
3463 * Examples/ex14.c: New file.
3464 * Makefile (tests): Add ex14.
3466 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3467 mutex. Patch by dtc@cmucl.cons.org.
3469 * ecmutex.c: New file.
3470 * Makefile (tests): Add ecmutex.
3472 2000-09-04 H.J. Lu <hjl@gnu.org>
3474 * attr.c (__pthread_attr_setguardsize): Use page_roundup
3475 instead of roundup to round up to the page size.
3477 2000-09-03 Mark Kettenis <kettenis@gnu.org>
3479 * manager.c (pthread_exited): Correctly report event as TD_REAP
3480 instead of TD_DEATH. Fix comments.
3482 2000-09-03 Ulrich Drepper <drepper@redhat.com>
3484 * spinlock.h (testandset): Add cast to avoid warning.
3485 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3487 2000-09-02 Andreas Jaeger <aj@suse.de>
3489 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3492 2000-09-01 Ulrich Drepper <drepper@redhat.com>
3494 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3495 Fix typo in last patch (_mode -> _flags).
3497 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3498 Provide definition which respects _IO_USER_LOCK flag.
3500 2000-08-30 Ulrich Drepper <drepper@redhat.com>
3502 * manager.c (pthread_allocate_stack): Clear descriptor only if not
3505 2000-08-25 Ulrich Drepper <drepper@redhat.com>
3507 * Makefile: Add rules to build and run unload.
3508 * unload.c: New file.
3510 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3512 * sysdeps/pthread/pthread.h
3513 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3514 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3516 2000-08-24 Andreas Jaeger <aj@suse.de>
3518 * Examples/ex13.c: Include <string.h> for strerror prototype and
3519 <stdlib.h> for abort prototype.
3520 (pthr_cond_signal_mutex): Rewrite to silence GCC.
3521 (thread_start): Remove unused variable err.
3522 (main): Silence GCC warnings.
3524 2000-08-22 Andreas Jaeger <aj@suse.de>
3526 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3528 * Makefile (tests): Add ex13.
3530 2000-08-20 Ulrich Drepper <drepper@redhat.com>
3532 * semaphore.h: Add restrict where required by AGd4.
3533 * sysdeps/pthread/pthread.h: Likewise.
3534 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3536 2000-08-15 Ulrich Drepper <drepper@redhat.com>
3538 * Makefile (tests): Add ex12. Add rule to build it.
3539 * Examples/ex12.c: New file.
3541 2000-08-13 Ulrich Drepper <drepper@redhat.com>
3543 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3544 even though the implementation is not quite complete (but it reports
3545 it). Define _POSIX_MESSAGE_PASSING to -1.
3546 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3548 2000-08-12 Andreas Jaeger <aj@suse.de>
3550 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3552 (__compare_and_swap): Likewise.
3553 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3555 2000-08-10 Ulrich Drepper <drepper@redhat.com>
3557 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3558 p_h_errnop correctly and not to NULL.
3560 2000-08-05 Ulrich Drepper <drepper@redhat.com>
3562 * Banner: Bump version number to 0.9.
3564 2000-08-04 Ulrich Drepper <drepper@redhat.com>
3566 * Makefile (tests): Add tststack. Add rule to build the program.
3567 * tststack.c: New file.
3569 * internals.h: Declare __pthread_max_stacksize.
3570 * pthread.c (__pthread_max_stacksize): New variable.
3571 (__pthread_initialize_manager): Determine __pthread_initialize_manager
3573 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3574 (pthread_allocate_stack): Allow kernel to choose stack address if
3575 FLOATING_STACKS. This also handles variable-sized stacks.
3576 Always allocate stack and guardpage together. Use mprotect to
3577 change guardpage access.
3578 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3579 ARCH_STACK_MAX_SIZE.
3581 * attr.c (__pthread_attr_setstacksize): Also test value against
3584 * manager.c (__pthread_nonstandard_stacks): Define only if
3585 THREAD_SELF is not defined.
3586 (pthread_allocate_stack): Always initialize gardaddr to a correct
3588 (pthread_handle_create): Unmap thread with one call.
3589 (pthread_free): Remove test for initial thread before removing stack.
3590 Unmap stack with one call.
3592 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3593 1 to avoid removing the stack.
3595 2000-07-27 Jes Sorensen <jes@linuxcare.com>
3597 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
3598 load of spin lock to prime the cache before the atomic compare and
3599 exchange operation (cmpxchg4). This avoids the spinning on the
3600 cmpxchg4 instruction and reduces movement of the cache line back
3601 and forth between the processors (explanation by Asis K. Mallick
3602 from Intel). This basically makes the implementation operate the
3603 same as the Linux kernel implementation.
3605 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3606 * sysdeps/ia64/pspinlock.c: New file.
3608 2000-08-03 Ulrich Drepper <drepper@redhat.com>
3610 * pthread.c: Move definition of __pthread_set_own_extricate_if...
3611 * spinlock.h: ...here. Remove locking.
3612 * internals.h: Remove __pthread_set_own_extricate_if prototype.
3614 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
3615 (rwlock_rd_extricate_func): Don't determine self, let
3616 __pthread_lock do it.
3617 (rwlock_wr_extricate_func): Likewise.
3618 (rwlock_have_already): Optimize *pself handling a bit.
3620 * mutex.c: Use __builtin_expect.
3621 * pthread.c: Likewise.
3623 2000-08-02 Andreas Jaeger <aj@suse.de>
3625 * sysdeps/s390/pspinlock.c: New file.
3626 * sysdeps/s390/pt-machine.h: New file.
3627 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
3629 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3631 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
3633 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3635 2000-07-26 Andreas Jaeger <aj@suse.de>
3637 * pthread.c: Initialize p_sem_avail.
3639 2000-07-25 Ulrich Drepper <drepper@redhat.com>
3641 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
3642 * semaphore.c: Handle spurious wakeups.
3644 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
3645 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
3647 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
3648 (__pthread_wait_for_restart): Likewise.
3650 * condvar.c (pthread_cond_wait): Also check whether thread is
3651 cancelable before aborting loop.
3652 (pthread_cond_timedwait): Likewise.
3654 * signals.c (pthread_sighandler): Remove special code to restrore
3656 (pthread_sighandler_t): Likewise.
3658 2000-07-25 Mark Kettenis <kettenis@gnu.org>
3660 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
3661 * pthread.c: Include <resolv.h>.
3662 (_res): Undefine. Add extern declaration.
3664 2000-07-24 Ulrich Drepper <drepper@redhat.com>
3666 * pthread.c (__pthread_initial_thread): Update initializer.
3667 (__pthread_manager_thread): Likewise.
3668 (pthread_initialize): Move setrlimit call to...
3669 (__pthread_initialize_manager): ...here.
3670 (__pthread_reset_main_thread): Reset also soft limit on stack size.
3672 * condvar.c: Handle spurious wakeups. [PR libc/1749].
3673 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
3675 2000-07-21 Ulrich Drepper <drepper@redhat.com>
3677 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
3678 __compare_and_swap to define testandset.
3679 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
3680 Define IMPLEMENT_TAS_WITH_CAS.
3682 2000-07-20 Ulrich Drepper <drepper@redhat.com>
3684 * Makefile: Pass -z nodelete to linker for libpthread.so
3685 generation if it understand this option.
3687 2000-07-18 Mark Kettenis <kettenis@gnu.org>
3689 * manager.c (pthread_handle_create): Remove initialization of
3690 new_thread->p_res._sock.
3692 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
3694 Bugfixes to the variant of the code for machines with no compare
3697 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
3698 node was not being properly enqueued, due to failing to update
3699 the lock->__status field.
3701 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
3702 being set inappropriately, causing the suspend function to be called
3703 with a null self pointer and crash.
3705 2000-07-18 Ulrich Drepper <drepper@redhat.com>
3707 * spinlock.h (__pthread_alt_trylock): Fix code used if no
3708 compare&swap is available.
3710 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
3713 * pthread.c (pthread_initialize): Don't use sysconf to determine
3714 whether the machine has more than one processor.
3716 * spinlock.c (__pthread_alt_timedlock): Add back one of the
3717 removed thread_self calls.
3719 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
3721 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
3722 __compare_and_swap to compare_and_swap in code which assumes
3723 compare swap is available.
3725 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
3727 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
3728 bug whereby thr field of waitnode structure would not be correctly
3729 set unless a null self pointer is passed to the functions.
3730 Eliminated redundant calls to thread_self().
3732 2000-07-18 Jakub Jelinek <jakub@redhat.com>
3734 * pthread.c (__pthread_initialize_manager): Lock
3735 __pthread_manager_thread.p_lock before calling clone.
3737 2000-05-05 H.J. Lu <hjl@gnu.org>
3739 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
3740 have acquire semantics.
3741 (__compare_and_swap_with_release_semantics): New inline
3743 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
3745 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
3747 * manager.c: Fix the problem with signals at startup.
3748 Change the way that thread stacks are allocated on IA64.
3749 Clean up some of the guard page allocation stuff.
3751 1999-12-19 H.J. Lu <hjl@gnu.org>
3753 * internals.h (page_roundup): New.
3754 * attr.c (__pthread_attr_setguardsize); Use page_roundup
3756 * manager.c (pthread_allocate_stack): Make sure guardaddr is
3757 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
3760 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
3762 * manager.c (pthread_allocate_stack): Unmap the stack top
3763 if failed to map the stack bottom.
3765 (pthread_free): Fix the guard page.
3767 * pthread.c (pthread_initialize): Set rlimit correctly for
3768 NEED_SEPARATE_REGISTER_STACK.
3770 1999-12-16 H.J. Lu <hjl@gnu.org>
3772 * pthread.c (__pthread_initialize_manager): Pass
3773 __pthread_manager_thread_bos instead of
3774 __pthread_manager_thread_tos to __clone2.
3776 1999-12-16 H.J. Lu <hjl@gnu.org>
3778 * manager.c (pthread_allocate_stack): Correct the calculation
3779 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
3782 1999-12-13 H.J. Lu <hjl@gnu.org>
3784 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
3785 bit after setting ar.ccv.
3787 1999-12-12 H.J. Lu <hjl@gnu.org>
3789 * manager.c (pthread_allocate_stack): Make the starting
3790 address of the stack bottom page aligned. FIXME: it may
3791 need changes in other places.
3792 (pthread_handle_create): Likewise.
3794 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
3796 * manager.c (pthread_allocate_stack): Handle
3797 NEED_SEPARATE_REGISTER_STACK.
3798 (pthread_handle_create): Likewise.
3799 * pthread.c (__pthread_initialize_manager): Likewise.
3801 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
3803 1999-12-02 H.J. Lu <hjl@gnu.org>
3805 * sysdeps/ia64/pt-machine.h: New.
3807 2000-07-13 Ulrich Drepper <drepper@redhat.com>
3809 * wrapsyscall.c: Mark non-__ protected names as weak.
3812 2000-07-12 Bruno Haible <haible@clisp.cons.org>
3814 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
3816 2000-07-12 Ulrich Drepper <drepper@redhat.com>
3818 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
3819 Add tests also to new alternative spinlock implementation.
3820 * spinlock.h: Likewise.
3821 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3823 2000-07-06 Ulrich Drepper <drepper@redhat.com>
3825 * Version: Export __sigaction.
3826 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
3828 * pthread.c: Use __libc_sigaction instead of __sigaction.
3830 * condvar.c: Implement pthread_condattr_getpshared and
3831 pthread_condattr_setpshared.
3832 * mutex.c: Implement pthread_mutexattr_getpshared and
3833 pthread_mutexattr_setpshared.
3834 * Versions: Export new functions.
3835 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3837 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
3838 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
3841 2000-07-04 Greg McGary <greg@mcgary.org>
3843 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
3844 pragmas. Include bp-sym.h only if _LIBC.
3846 2000-07-04 Ulrich Drepper <drepper@redhat.com>
3848 * spinlock.c (__pthread_unlock): Properly place write barrier.
3849 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3851 2000-07-03 Ulrich Drepper <drepper@redhat.com>
3853 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
3854 faster on SMP systems. No more emulation of compare&swap for adaptive
3856 * spinlock.h: Likewise.
3857 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
3858 Replace fast with adaptive mutex.
3859 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
3860 * condvar.c: Likewise.
3861 * pthread.c: Define and initialize __pthread_smp_kernel variable.
3862 * internals.h: Declare __pthread_smp_kernel.
3863 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
3864 _pthread_fastlock structure.
3865 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3867 * pthread.c: Remove initialization to zero from global variables.
3869 2000-06-29 Jakub Jelinek <jakub@redhat.com>
3871 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
3873 2000-06-28 Greg McGary <greg@mcgary.org>
3875 * weaks.c: Wrap BP_SYM () around weak extern declarations of
3876 pthread functions that have pointers in their return+arg signatures.
3878 2000-06-27 Greg McGary <greg@mcgary.org>
3880 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
3881 extern declarations of pthread functions that have pointers in
3882 their return+arg signatures.
3884 2000-06-26 Ulrich Drepper <drepper@redhat.com>
3886 * Makefile (tests): Add ex11. Add rules to build it.
3887 * Examples/ex11.c: New file.
3888 * rwlock.c: Fix complete braindamaged previous try to implement
3891 * spinlock.c: Pretty print.
3893 2000-06-25 Ulrich Drepper <drepper@redhat.com>
3895 * Makefile (tests): Add ex10. Add rules to build it.
3896 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
3897 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
3898 * condvar.c (pthread_cond_wait): Allow mutex of kind
3899 PTHREAD_MUTEX_TIMED_NP.
3900 (pthread_cond_timedwait_relative): Likewise.
3901 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
3902 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
3903 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
3904 (__pthread_mutex_lock): Use __pthread_alt_lock for
3905 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
3906 (__pthread_mutex_timedlock): New function.
3907 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
3908 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
3909 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
3910 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
3911 * spinlock.c: Implement alternate fastlocks.
3912 * spinlock.h: Add prototypes.
3913 * Examples/ex10.c: New file.
3914 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3915 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3917 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
3918 (__pthread_rwlock_timedrdlock): New function.
3919 (__pthread_rwlock_timedwrlock): New function.
3920 Use laternate fastlock function everywhere.
3922 2000-06-21 Andreas Jaeger <aj@suse.de>
3924 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
3927 * join.c: Include <stdlib.h> for exit prototype.
3929 2000-06-20 Ulrich Drepper <drepper@redhat.com>
3931 * sysdeps/i386/useldt.h: Include <stdlib.h>.
3933 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
3934 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3936 * Makefile (libpthread-routines): Add barrier.
3937 (tests): Add ex9. Add rule to build ex9.
3938 * Versions: Export barrier functions.
3939 * barrier.c: New file.
3940 * Examples/ex9.c: New file.
3941 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
3942 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
3943 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3945 2000-06-19 H.J. Lu <hjl@gnu.org>
3947 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
3948 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
3949 (compare_and_swap_with_release_semantics): New. Default to
3950 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
3953 * spinlock.c (__pthread_unlock): Call
3954 compare_and_swap_with_release_semantics () instead of
3955 compare_and_swap ().
3957 2000-06-19 Ulrich Drepper <drepper@redhat.com>
3959 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
3961 * sysdeps/pthread/timer_delete.c: Likewise.
3962 * sysdeps/pthread/timer_getoverr.c: Likewise.
3963 * sysdeps/pthread/timer_gettime.c: Likewise.
3964 * sysdeps/pthread/timer_settime.c: Likewise.
3966 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3968 Timer nodes are now reference counted, and can be marked
3969 as deleted. This allows for the safe release of the global mutex
3970 in the middle without losing the timer being operated on.
3972 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
3973 member is now an enum with three values, so that an intermediate
3974 state can be represented (deleted but not free for reuse yet).
3975 New refcount member added.
3976 * sysdeps/pthread/timer_routines.c: Likewise.
3978 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
3979 timer_valid): New inline functions added.
3981 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
3982 restructured, recursive deadlock bug fixed.
3984 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
3985 timer_addref to ensure that timer won't be deleted while mutex is not
3986 held. Also uses timer_invalid to perform validation of timer handle.
3987 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3988 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
3990 2000-06-14 Ulrich Drepper <drepper@redhat.com>
3992 * shlib-versions: Add entry for SH.
3993 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
3995 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3997 A few optimizations. Got rid of unnecessary wakeups of timer threads,
3998 tightened up some critical regions and micro-optimized some list
4001 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4002 Returns int value now to indicate whether timer was queued at head.
4003 * sysdeps/pthread/posix-timer.h: Likewise.
4004 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4005 new return value from __timer_thread_queue_timer to avoid waking
4006 up timer thread unnecessarily.
4008 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4009 inuse flag, because this requires mutex to be held. Callers updated
4010 to do the check when they have the mutex.
4011 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4013 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4014 regions: avoids making system calls while holding timer mutex, and
4015 a few computations were moved outside of the mutex as well.
4016 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4018 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4019 to list_unlink_ip, meaning idempotent. Pointer manipulation
4020 changed to get better better code out of gcc.
4021 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4022 version of list_unlink added here.
4023 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4024 function in all places: idempotent one for timers, non-idempotent
4025 one for thread nodes.
4026 * sysdeps/pthread/timer_settime: Likewise.
4027 * sysdeps/pthread/timer_routines.c: Likewise.
4029 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4031 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4032 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4034 * sysdeps/pthread/Makefile: Remove tests definition.
4036 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4037 Yutaka Niibe <gniibe@chroot.org>
4039 * sysdeps/sh/pspinlock.c: New file.
4040 * sysdeps/sh/pt-machine.h: New file.
4042 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4044 * Makefile (tests): Add joinrace.
4046 * Examples/ex6.c: Test return value of pthread_join.
4048 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4050 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4051 (__pthread_spin_trylock): Implement.
4052 (__pthread_spin_unlock): Implement.
4053 (__pthread_spin_init): Implement.
4054 (__pthread_spin_destroy): Implement.
4056 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4058 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4059 really append the entry.
4061 2000-06-10 Andreas Jaeger <aj@suse.de>
4063 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4065 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4067 * sysdeps/pthread/timer_create.c: Thread matching now done on
4068 clock type as well as thread attributes.
4069 There are individual global signal-delivering threads for
4070 different clock types.
4071 * sysdeps/pthread/posix-timer.h: Likewise.
4072 * sysdeps/pthread/timer_routines.c: Likewise.
4074 * sysdeps/pthread/timer_routines.c: Thread allocation and
4075 deallocation function now remembers to put thread on active
4076 list and remove from active list.
4077 Thus now the feature of binding multiple timers
4078 to a single thread actually works.
4080 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4082 * pthread.c (__pthread_create_2_1): Optimize a bit.
4084 * internals.h (invalid_handle): Also test for p_terminated != 0.
4085 (nonexisting_handle): New function. Same as old invalid_handle.
4086 * join.c (pthread_join): Use nonexisting_handle instead of
4087 invalid_handle to test for acceptable thread handle.
4088 * manager.c (pthread_handle_free): Likewise.
4089 * joinrace.c: New file.
4090 Reported by Permaine Cheung <pcheung@cygnus.com>.
4092 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4094 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4095 Correct handling of matching variable.
4097 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4100 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4101 Be prepared for empty timer list.
4103 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4104 CPUTIME clock ID. Add support for thread clocks.
4106 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4107 subtraction were switched.
4109 * sysdeps/pthread/timer_routines.c (init_module): Use
4110 THREAD_MAXNODES threads.
4112 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4113 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4114 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4115 with sigqueueinfo is this system call is available.
4117 * sysdeps/pthread/timer_create.c (timer_create): Allow
4118 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4120 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4122 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4124 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4126 * sysdeps/pthread/posix-timer.h: New file.
4127 * sysdeps/pthread/timer_create.c: New file.
4128 * sysdeps/pthread/timer_delete.c: New file.
4129 * sysdeps/pthread/timer_getoverr.c: New file.
4130 * sysdeps/pthread/timer_gettime.c: New file.
4131 * sysdeps/pthread/timer_routines.c: New file.
4132 * sysdeps/pthread/timer_settime.c: New file.
4133 * sysdeps/pthread/tst-timer.c: New file.
4135 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4137 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4138 LINK_MAX definitions if necessary.
4140 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4142 Added missing fork time handling of global libio lock.
4144 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4145 not just the individual stream locks. Rewritten to use new
4146 iterator interface provided by libio rather than accessing
4149 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4150 which lock and unlock the stream list using the new interface
4152 * internals.h: Likewise.
4154 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4155 and __funlockfilelist in the parent after the fork.
4156 Child still calls __fresetlockfiles as before.
4158 * linuxthreads.texi: Now explains what happens to streams at
4159 fork time. Also whole new section on forking and thread added.
4160 Definition of pthread_atfork moved out of Miscellaneous Functions
4161 to this new section.
4163 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4165 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4166 Add missing register.
4167 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4169 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4171 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4172 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4173 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4175 2000-05-31 Andreas Jaeger <aj@suse.de>
4177 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4179 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4181 * spinlock.c (__pthread_lock): Remove ASSERT.
4183 * Makefile (tests): Add ex8.
4184 * Examples/ex8.c: New file.
4186 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4188 Bugfix: The pthread_atfork mechanism now takes care of its
4189 own internal mutex at fork time.
4191 * ptfork.c (__fork): Revised so that the mutex is held across
4192 the fork operation and while the handlers are called, and so that
4193 the child resets the mutex.
4195 * linuxthreads.texi: Updated pthread_atfork documentation to make
4196 it clear that fork and pthread_atfork can't be reentered from
4197 atfork handlers, that pthread_atfork and fork are mutually atomic,
4198 and that the handlers are inherited by the child process.
4200 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4202 * Makefile (libpthread-routines): Add pspinlock.
4203 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4204 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4205 * condvar.c: Likewise.
4206 * internals.h: Likewise.
4208 * manager.c: Likewise.
4209 * mutex.c: Likewise.
4210 * pthread.c: Likewise.
4211 * rwlock.c: Likewise.
4212 * semaphore.c: Likewise.
4213 * signals.c: Likewise.
4214 * spinlock.h: Likewise.
4215 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4216 * sysdeps/alpha/pspinlock.c: New file.
4217 * sysdeps/arm/pspinlock.c: New file.
4218 * sysdeps/i386/pspinlock.c: New file.
4219 * sysdeps/m68k/pspinlock.c: New file.
4220 * sysdeps/mips/pspinlock.c: New file.
4221 * sysdeps/powerpc/pspinlock.c: New file.
4222 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4223 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4224 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4225 back to _pthread_fastlock. Define new pthread_spinlock_t.
4227 2000-05-24 Andreas Jaeger <aj@suse.de>
4229 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4231 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4233 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4235 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4237 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4239 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4241 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4242 object state is represented with additional bits which distinguish
4243 whether that state was set up in the current process, or
4244 in an ancestor process. If that state was set in an ancestor,
4245 it means that a fork happened while thread was executing the init
4246 function. In that case, the state is reset to NEVER.
4247 * mutex.c (__pthread_once_fork_prepare): New function.
4248 (__pthread_once_fork_child): Likewise
4249 (__pthread_once_fork_parent): Likewise
4250 (__pthread_reset_pthread_once): Removed.
4251 * ptfork.c (__fork): Call new handlers in mutex.c.
4252 * internals.h: Declarations of new mutex.c functions added.
4253 Declaration of removed function deleted.
4254 * linuxthreads.texi: Updated documentation about pthread_once
4255 to clarify what happens under cancellation and forking.
4257 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4259 * internals.h: New thread manager request type, REQ_KICK.
4260 * join.c (pthread_exit): main thread now calls exit() instead
4261 of _exit() in order to proper process cleanup.
4262 * manager.c (__pthread_manager): Do not terminate manager
4263 after unblocking main thread; wait for main thread's
4264 REQ_PROCESS_EXIT request instead.
4265 Also, added REQ_KICK case to handle new request; this just does
4267 * manager.c (pthread_exited): Do not terminate manager after
4268 unblocking main thread.
4269 * manager.c (__pthread_manager_sighandler): If the main thread
4270 is waiting for all other threads to die, send a REQ_KICK into
4271 the thread manager request pipe to get it to clean out the threads
4272 and unblock the main thread as soon as possible. This fixes
4273 the 2000 millisecond hang on shutdown bug.
4274 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4275 including the main one call pthread_exit(), or implicitly do so.
4276 * Makefile (tests): Add ex7.
4278 2000-05-05 Andreas Jaeger <aj@suse.de>
4280 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4281 (pthread_getcpuclockid): Correct test for ourselves.
4283 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4285 * internals.h (struct _pthread_descr_struct): Reorganization.
4286 Allocate room for 16 pointers at head of the structure for future
4287 thread-local data handling. Move p_self member in this area.
4288 * manager.c (pthread_handle_create): Adjust use of p_self.
4289 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4290 * pthread.c (__pthread_initial_thread): Adjust initialization.
4291 (__pthread_manager_thread): Likewise.
4293 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4295 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4296 for eventmask larger than 1 word.
4298 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4300 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4301 * pthread.c (__pthread_initialize_minimal): New function. Perform
4302 minimal initialization.
4303 (pthread_initialize): Remove this code here.
4304 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4305 are working around the problem in glibc.
4307 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4309 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4310 now. First gcc must be fixed (more concrete: libgcc).
4312 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4314 * pthread.c: Remove special treatement for interrupt handlers on x86.
4315 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4316 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4318 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4320 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4322 * join.c (pthread_exit): Set p_terminated after reporting the
4323 termination event instead of before.
4325 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4327 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4330 2000-04-18 Andreas Jaeger <aj@suse.de>
4332 * Versions: Use ld instead of ld.so.
4334 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4336 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4337 Remove the typedef keyword.
4339 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4341 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4343 (READ_MEMORY_BARRIER): Define.
4344 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4346 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4349 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4351 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4352 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4353 use thread_handle().
4355 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4357 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4358 if fast mutex is used. Don't initialize `already_canceled' twice.
4359 Correctly test for return value of timedsuspend.
4361 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4362 therefore don't need the _rt versions of the signal handlers.
4364 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4366 * pthread.c (pthread_yield): New function.
4367 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4368 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4369 * internals.h: Declare __pthread_yield.
4371 * pthread.c (pthread_initialize): Avoid a bit more code if
4372 realtime signals are known to exist.
4374 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4375 to dynamically detect RT signals and avoid generating compatibility
4376 functions with old kernel.
4377 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4378 __pthread_restart_new directly.
4379 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4380 __pthread_wait_for_restart_signal directly.
4381 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4382 __pthread_timedsuspend_new directly.
4384 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4386 * condvar.c: Remove all the special code to handle cond_timedwait.
4387 Use timedsuspend instead.
4388 * internals.h: Declare __pthread_timedsuspend_old,
4389 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4390 Remove declaration of __pthread_init_condvar.
4391 * pthread.c: Define __pthread_timedsuspend variable.
4392 (__pthread_timedsuspend_old): New function. Timed suspension
4393 implementation for old Linux kernels.
4394 (__pthread_timedsuspend_new): New function. Timed suspension
4395 implementation for new Linux kernels.
4396 * restart.h (timedsuspend): New function. Call appropriate
4397 suspension function through __pthread_timedsuspend.
4398 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4400 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4402 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4404 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4406 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4407 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4409 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4410 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4412 2000-04-14 Andreas Jaeger <aj@suse.de>
4414 * weaks.c: Fix typo.
4416 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4417 2.2 for linuxthreads.
4419 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4421 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4422 (pthread_getcpuclockid): Fix typo.
4424 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4426 * Makefile (libpthread-routines): Add getcpuclockid.
4427 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4428 * sysdeps/pthread/getcpuclockid.c: New file.
4429 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4430 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4432 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4434 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4436 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4437 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4438 and pthread_spin_unlock.
4439 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4440 into pthread_spinlock_t. Change all uses.
4441 * spinlock.c: Implement pthread_spin_lock.
4442 Rename __pthread_unlock to __pthread_spin_unlock and define weak
4443 alias for real name.
4444 Define pthread_spin_trylock, pthread_spin_init, and
4445 pthread_spin_destroy.
4446 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4447 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4448 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4449 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4450 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4451 and pthread_spin_unlock.
4452 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4453 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4454 * condvar.c: Likewise.
4455 * internals.h: Likewise.
4457 * manager.c: Likewise.
4458 * mutex.c: Likewise.
4459 * pthread.c: Likewise.
4460 * rwlock.c: Likewise.
4461 * semaphore.c: Likewise.
4462 * signals.c: Likewise.
4464 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4466 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4468 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4470 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4471 _POSIX_SHARED_MEMORY_OBJECTS.
4473 2000-04-11 Andreas Jaeger <aj@suse.de>
4475 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4476 (__compare_and_swap): Mark as modifying memory.
4478 2000-04-11 Geoff Keating <geoffk@cygnus.com>
4480 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4482 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4483 Don't have the 'asm' __volatile__.
4485 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4487 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4488 * spinlock.c (__pthread_lock): Add memory barriers.
4489 (__pthread_unlock): Likewise.
4490 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4492 (RELEASE): Not needed anymore.
4493 (__compare_and_swap): Mark asm as modifying memory.
4494 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
4496 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4497 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4498 (MEMORY_BARRIER): Define using stbar.
4499 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4501 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4502 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4503 Mike Burrows <m3b@pa.dec.com>.
4505 2000-04-09 Ulrich Drepper <drepper@redhat.com>
4507 * signals.c (sigaction): Fix return value for the case SIG is one
4508 of the signals the implementation uses.
4509 Patch by Xavier.Leroy@inria.fr.
4511 2000-04-01 Andreas Jaeger <aj@suse.de>
4513 * attr.c: Use shlib-compat macros.
4514 * oldsemaphore.c: Likewise.
4515 * pthread.c: Likewise.
4516 * weaks.c: Likewise.
4518 2000-03-26 Ulrich Drepper <drepper@redhat.com>
4520 * semaphore.c (sem_timedwait): New function.
4521 Patch by Carl Mailloux <carlm@oricom.ca>.
4522 * semaphore.h: Declare sem_timedwait.
4523 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4525 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
4527 * sysdeps/pthread/Makefile: File removed.
4529 2000-03-23 Ulrich Drepper <drepper@redhat.com>
4531 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4532 * internals.h (__pthread_reset_pthread_once): Add prototype.
4533 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4535 * manager.c (pthread_handle_create): Store ID of new thread before
4538 2000-03-21 Ulrich Drepper <drepper@redhat.com>
4540 * attr.c: Use new macros from shlib-compat.h to define versions.
4541 * oldsemaphore.c: Likewise.
4542 * semaphore.c: Likewise.
4543 * weaks.c: Likewise.
4545 * pthread.c: Update for new SHLIB_COMPAT definition.
4547 * manager.c (__pthread_manager): Unmask debug signal.
4549 * pthread.c (pthread_initialize): Test for address of __dso_handle
4550 being NULL, not value. Use __on_exit, not on_exit.
4551 Patch by Andreas Jaeger <aj@suse.de>.
4553 * pthread.c: Use new macros from shlib-compat.h to define versions.
4555 2000-03-19 Ulrich Drepper <drepper@redhat.com>
4557 * pthread.c (pthread_initialize): Instead of on_exit use
4558 __cxa_atexit if __dso_label is available to allow unloading the
4559 libpthread shared library.
4561 2000-03-16 Ulrich Drepper <drepper@redhat.com>
4563 * condvar.c: Make tests for ownership of mutex less strict.
4565 2000-03-14 Ulrich Drepper <drepper@redhat.com>
4567 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
4568 current thread and return error if not.
4569 (pthread_cond_timedwait_relative_old): Likewise.
4570 (pthread_cond_timedwait_relative_new): Likewise.
4572 * mutex.c (__pthread_once): Handle cancelled init function correctly.
4573 (pthread_once_cancelhandler): New function.
4574 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4576 2000-03-14 Andreas Jaeger <aj@suse.de>
4578 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4580 (pthread_handle_sigrestart_rt): Likewise.
4581 * signals.c (pthread_sighandler_rt): Likewise.
4583 2000-03-02 Andreas Jaeger <aj@suse.de>
4585 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
4586 Reported by Sean Chen <sean.chen@turbolinux.com>.
4588 2000-02-28 Andreas Jaeger <aj@suse.de>
4590 * rwlock.c: Fix typo.
4592 2000-02-27 Ulrich Drepper <drepper@redhat.com>
4594 * rwlock.c: Define __* variants of the functions and make old names
4596 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
4597 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
4599 2000-02-25 Andreas Jaeger <aj@suse.de>
4601 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4602 pwrite64, lseek64, open64, and __open64 with version 2.2.
4604 2000-02-22 Ulrich Drepper <drepper@redhat.com>
4606 * semaphore.h (SEM_FAILED): Use 0 not NULL.
4608 2000-02-14 Ulrich Drepper <drepper@redhat.com>
4610 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
4611 nanosleep does not work either. Get absolute time inside the
4613 (pthread_cond_timedwait_relative_new): Likewise.
4614 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4616 2000-02-13 Andreas Jaeger <aj@suse.de>
4618 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
4619 (pthread_cond_timedwait_relative_old): Likewise.
4621 2000-02-13 Ulrich Drepper <drepper@redhat.com>
4623 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
4624 but keep the code around. A bug in the kernel prevent us from
4626 (pthread_cond_timedwait_relative_new): Likewise.
4627 (PR libc/1597 and libc/1598).
4629 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
4631 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
4632 loop around nanosleep calls instead of around most of the function
4633 (pthread_cond_timedwait_relative_new): Likewise.
4634 body. Got rid of backwards goto and one local.
4636 2000-01-31 Ulrich Drepper <drepper@redhat.com>
4638 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
4639 before every nanosleep call to account for time spent in the rest
4641 (pthread_cond_timedwait_relative_new): Likewise.
4642 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
4644 2000-01-29 Ulrich Drepper <drepper@redhat.com>
4646 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
4647 from nanosleep call so that in case we restart we only wait for the
4649 (pthread_cond_timedwait_relative_new): Likewise.
4650 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
4652 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
4654 * manager.c (pthread_allocate_stack): Compute guard page address
4655 correctly. Patch by HJ Lu.
4657 * sysdeps/pthread/pthread.h: Define
4658 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
4660 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
4662 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
4663 preference handling.
4664 (pthread_rwlockattr_setkind_np): Allow
4665 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
4666 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
4668 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
4670 * internals.h (pthread_readlock_info): New structure.
4671 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
4672 p_untracked_readlock_count.
4673 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
4674 Add initializers for new fields.
4675 * manager.c (pthread_free): Free read/write lock lists.
4676 * queue.h (queue_is_empty): New function.
4677 * rwlock.c: Implement requirements about when readers should get
4679 * sysdeps/pthread/pthread.h
4680 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
4681 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
4682 Define this name as well.
4683 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
4685 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
4687 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
4688 Adjust initializers for struct _pthread_descr_struct change.
4689 * internals.h (struct _pthread_descr_struct): Move new elements to
4692 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
4694 Redesigned how cancellation unblocks a thread from internal
4695 cancellation points (sem_wait, pthread_join,
4696 pthread_cond_{wait,timedwait}).
4697 Cancellation won't eat a signal in any of these functions
4698 (*required* by POSIX and Single Unix Spec!).
4699 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
4700 simultaneous condition variable signal (not required by POSIX
4701 or Single Unix Spec, but nice).
4702 * spinlock.c: __pthread_lock queues back any received restarts
4703 that don't belong to it instead of assuming ownership of lock
4704 upon any restart; fastlock can no longer be acquired by two threads
4706 * restart.h: Restarts queue even on kernels that don't have
4707 queued real time signals (2.0, early 2.1), thanks to atomic counter,
4708 avoiding a rare race condition in pthread_cond_timedwait.
4710 1999-12-31 Andreas Jaeger <aj@suse.de>
4712 * internals.h: Remove duplicate prototype declarations.
4714 * weaks.c: Remove __THROW from prototypes since the file is not
4715 compiled by a C++ compiler.
4716 * internals.h: Likewise.
4718 1999-12-30 Andreas Jaeger <aj@suse.de>
4720 * sysdeps/pthread/pthread.h: Move internal functions to...
4721 * sysdeps/pthread/bits/libc-lock.h: ...here.
4723 1999-12-29 Andreas Jaeger <aj@suse.de>
4725 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
4727 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
4729 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
4732 * manager.c (__pthread_start): Add one more cast to prevent
4733 warning on 64bit machines.
4735 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
4737 * manager.c (pthread_handle_create): Set p_pid of new thread
4738 before calling the callback function to report a new thread.
4740 1999-12-20 Andreas Jaeger <aj@suse.de>
4742 * pthread.c (pthread_initialize): Move getrlimit call after
4745 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
4747 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4748 pwrite64, lseek64, open64, and __open64.
4749 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
4750 pwrite64, lseek64, open64, and __open64.
4752 * manager.c (pthread_allocate_stack): Correct computation of
4753 new_thread_bottom. Correct handling of stack size and when the
4754 rlimit method to guard for stack growth is used.
4755 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
4756 minus one pagesize (not two).
4758 1999-12-03 Andreas Jaeger <aj@suse.de>
4760 * Versions: Add __res_state with version GLIBC_2.2.
4762 * errno.c (__res_state): New function to return thread specific
4765 * pthread.c (pthread_initialize): Initialize p_resp.
4766 (__pthread_reset_main_thread): Also set p_resp.
4768 * manager.c (pthread_handle_create): Initialize p_resp.
4770 * internals.h: Add thread specific resolver state.
4771 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
4773 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
4775 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
4777 * sysdeps/i386/i686/pt-machine.h: Likewise.
4778 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
4780 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
4782 * manager.c (pthread_start_thread_event): Initialize p_pid already
4785 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
4787 * internals.h: Add prototype for __pthread_manager_event.
4788 * manager.c (__pthread_manager_event): New function.
4789 (pthread_start_thread_event): Correct computation of self.
4790 Use INIT_THREAD_SELF.
4791 * pthread.c (__pthread_manager_thread): Initialize p_lock.
4792 (__pthread_initialize_manager): Respect event flags also for creation
4793 of the manager thread.
4795 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
4797 * pthread.c (__pthread_initialize_manager): Initialize
4798 __pthread_manager_thread.p_tid.
4800 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
4802 * internals.h: Declare __pthread_last_event.
4803 * manager.c: Define __pthread_last_event.
4804 (pthread_handle_create): Set __pthread_last_event.
4805 (pthread_exited): Likewise.
4806 * join.c (pthread_exit): Likewise.
4808 * Makefile (libpthread-routines): Add events.
4809 * events.c: New file.
4810 * internals.h: Protect against multiple inclusion.
4811 Include thread_dbP.h header.
4812 (struct _pthread_descr_struct): Add new fields p_report_events and
4814 Declare event reporting functions.
4815 * join.c (pthread_exit): Signal event if this is wanted.
4816 * manager.c (__pthread_threads_events): New variable.
4817 (pthread_handle_create): Take new parameters with event information.
4818 Signal TD_CREATE event if wanted.
4819 (__pthread_manager): Adjust pthread_handle_create call.
4820 (pthread_start_thread_event): New function. Block until manager is
4821 finished and then call pthread_start_thread.
4822 (pthread_exited): Signal TD_REAP event if wanted.
4824 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
4826 * restart.h (suspend_with_cancellation): Rewrite as a macro.
4828 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
4830 1999-10-25 Andreas Jaeger <aj@suse.de>
4832 * internals.h: Remove K&R compatibility.
4833 * no-tsd.c: Likewise.
4834 * semaphore.h: Likewise.
4835 * signals.c: Likewise.
4836 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
4837 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
4838 * weaks.c: Likewise.
4840 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
4842 * pthread.c: For i386, wrap pthread_handle_sigrestart and
4843 pthread_handle_sigcancel with functions that restore %gs from the
4844 signal context. For each signal handling function, two wrappers
4845 are required, one for a non-RT signal and one for a RT signal.
4846 * signal.c: For i386, add code to restore %gs from the signal
4847 context in pthread_sighandler and pthread_sighandler_rt.
4849 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
4851 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
4853 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
4855 * pthread.c (__pthread_initial_thread): Pass argument to
4856 PTHREAD_START_ARGS_INITIALIZER.
4857 (__pthread_manager_thread): Likewise.
4859 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
4860 initialize function.
4862 * manager.c (pthread_handle_create): Remove p_startfct initialization.
4864 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
4866 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
4868 * internals.h: Correct return types for __libc_read and __libc_write.
4870 1999-10-09 Andreas Jaeger <aj@suse.de>
4872 * internals.h: Add __new_sem_post to get prototype in
4873 manager.c; include semaphore.h for needed types.
4875 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
4877 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
4878 directly instead of calling sem_post which should not be necessary
4879 but is faster and might help in some case to work around problems.
4880 Patch by khendricks@ivey.uwo.ca [libc/1382].
4882 1999-10-08 Andreas Schwab <schwab@suse.de>
4884 * sysdeps/pthread/Subdirs: New file.
4887 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
4889 * Implies: New file.
4890 * internals.h (struct _pthread_descr_struct): Add p_startfct.
4891 * manager.c (pthread_handle_create): Initialize p_startfct.
4892 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
4894 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
4896 * manager.c (__linuxthreads_pthread_threads_max): New variable.
4897 * specific.c (__linuxthreads_pthread_keys_max): New variable.
4898 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
4900 * condvar.c (pthread_cond_timedwait_relative): Never return with
4901 EINTR. Patch by Andreas Schwab.
4903 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
4905 * signals.c (sigaction): Correct last patch. Don't select
4906 pthread_sighandler_rt based on the signal number but instead of
4907 the SA_SIGINFO flag.
4909 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
4911 * specific.c: Move definitions of struct pthread_key_struct and
4912 destr_function to ...
4913 * internals.h: ...here.
4915 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
4917 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
4918 this instead of pthread_handle_sigrestart if the signal is an RT
4921 * signals.c: Handle passing through of sighandler arguments also
4922 for real-time signals.
4924 1999-09-03 Andreas Schwab <schwab@suse.de>
4926 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
4928 (__vfork): New function, alias vfork.
4929 * Versions: Export __fork, vfork, and __vfork in libpthread.
4931 1999-08-23 Andreas Schwab <schwab@suse.de>
4933 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
4934 call to signal handler.
4936 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
4938 * pthread.c (__pthread_reset_main_thread): Undo last change.
4939 (__pthread_kill_other_threads_np): Reset signal handlers for the
4940 signals we used in the thread implementation here.
4942 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
4944 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
4945 for the signals we used in the thread implementation [PR libc/1234].
4947 * Versions: Export __pthread_kill_other_threads_np from libpthread
4950 * signals.c: Pass sigcontext through wrapper to the user function.
4952 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
4954 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
4955 __libc_internal_tsd_set.
4957 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4959 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
4962 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4964 * internals.h: Align _pthread_descr_struct to 32 bytes.
4965 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
4968 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
4970 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
4973 1999-07-09 Cristian Gafton <gafton@redhat.com>
4975 * Makefile (libpthread-routines): Add oldsemaphore routine.
4976 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
4977 sem_trywait, and sem_wait to GLIBC_2.1.
4978 * oldsemaphore.c: New file.
4979 * semaphore.c: Add default_symbol_versions for the changed functions.
4980 (__new_sem_init): Rename from sem_init.
4981 (__new_sem_post): Rename from sem_post.
4982 (__new_sem_wait): Rename from sem_wait.
4983 (__new_sem_trywait): Rename from sem_trywait.
4984 (__new_sem_getvalue): Rename from sem_getvalue.
4985 (__new_sem_destroy): Rename from sem_destroy.
4987 1999-06-23 Robey Pointer <robey@netscape.com>
4989 * internals.h: Added p_nextlock entry to separate queueing for a
4990 lock from queueing for a CV (sometimes a thread queues on a lock
4991 to serialize removing itself from a CV queue).
4992 * pthread.c: Added p_nextlock to initializers.
4993 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
4995 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
4997 * manager.c (pthread_handle_create): Free mmap region after stack
4998 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5000 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5002 * man/pthread_cond_init.man: Correct example.
5003 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5005 * linuxthreads.texi (Condition Variables): Likewise.
5007 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5009 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5010 casx not cas, also successful casx returns the old value in rd
5011 and not the new value.
5013 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5015 * manager.c: If pthread_create() is given a NULL attribute
5016 and the thread manager runs with a realtime policy, set the
5017 scheduling policy of the newly created thread back to SCHED_OTHER.
5018 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5019 initialize the schedpolicy field of new_thread->p_start_args
5020 to that of the calling thread.
5022 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5024 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5025 instruction does not allow memory element to use offset.
5027 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5029 * manager.c (pthread_allocate_stack): Optimize initialization of new
5032 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5033 Don't use initializer since it is all zeroes.
5034 (__libc_once_define): Likewise.
5036 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5038 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5039 doesn't exist anymore.
5040 * sysdeps/i386/Implies: Likewise.
5041 * sysdeps/m68k/Implies: Likewise.
5042 * sysdeps/mips/Implies: Likewise.
5043 * sysdeps/powerpc/Implies: Likewise.
5044 * sysdeps/sparc/sparc32/Implies: Likewise.
5045 * sysdeps/sparc/sparc64/Implies: Likewise.
5047 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5049 * sysdeps/alpha/bits/semaphore.h: Removed.
5050 * sysdeps/powerpc/bits/semaphore.h: Removed.
5051 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5052 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5053 * Makefile (headers): Remove bits/semaphore.h.
5055 * semaphore.h: Define _pthread_descr if necessary.
5056 Don't include limits.h. Define SEM_VALUE_MAX directly.
5058 (sem_t): Protect element names with leading __.
5059 Add declarations for sem_close, sem_open, and sem_unlink.
5060 * semaphore.c: Adjust all functions for new element names.
5061 Define sem_close, sem_open, and sem_unlink.
5062 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5064 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5067 1999-03-16 H.J. Lu <hjl@gnu.org>
5069 * specific.c (pthread_key_delete): Check th->p_terminated to see
5070 if the thread is running.
5072 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5073 Added to GLIBC_2.0 for libc.so.
5075 1999-02-12 H.J. Lu <hjl@gnu.org>
5077 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5078 __libc_allocate_rtsig): Added to GLIBC_2.1.
5080 * internals.h (DEFAULT_SIG_RESTART): Removed.
5081 (DEFAULT_SIG_CANCEL): Removed.
5083 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5084 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5085 (__pthread_sig_restart, __pthread_sig_cancel,
5086 __pthread_sig_debug): Initialized.
5087 (pthread_initialize): Call init_rtsigs () to initialize
5090 1999-02-03 H.J. Lu <hjl@gnu.org>
5092 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5093 Don't restart the thread which sent REQ_DEBUG.
5094 (pthread_start_thread): Check if __pthread_sig_debug > 0
5097 * pthread.c (__pthread_initialize_manager): Suspend ourself
5098 after sending __pthread_sig_debug to gdb instead of
5099 __pthread_sig_cancel.
5101 1999-01-24 H.J. Lu <hjl@gnu.org>
5103 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5104 from mask if __pthread_sig_debug > 0.
5105 (pthread_handle_create): Increment __pthread_handles_num.
5107 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5108 * pthread.c (__pthread_initialize_manager): Likewise.
5110 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5111 instead of __libc_allocate_rtsig (2).
5112 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5113 instead of __pthread_sig_cancel.
5114 (pthread_handle_sigdebug): Fix comments.
5116 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5118 * manager.c (pthread_allocate_stack): Set
5119 __pthread_nonstandard_stacks if user-specified stack is used.
5121 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5123 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5124 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5126 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5128 * pthread.c: Use a third signal __pthread_sig_debug distinct
5129 from __pthread_sig_cancel to notify gdb when a thread is
5131 * manager.c: Likewise.
5132 * internals.h: Likewise.
5133 * signals.c: The implementation of sigwait(s) assumed that
5134 all signals in s have signal handlers already attached.
5135 This is not required by the standard, so make it work
5136 also if some of the signals have no handlers.
5138 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5140 * linuxthreads.texi: Remove pointers from first @node. Move old
5141 @node spec inside comment.
5143 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5145 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5148 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5150 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5151 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5153 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5155 * manager.c: Threads now send __pthread_sig_cancel on termination.
5156 Change clone call and signal masks.
5157 * thread.c (pthread_handle_sigrestart): Remove special code for
5159 (pthread_handle_sigcancel): In manager thread call
5160 __pthread_manager_sighandler.
5161 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5162 * sysdeps/i386/i686/pt-machine.h: Likewise.
5163 Patches by Xavier Leroy.
5165 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5167 * spinlock.c (__pthread_unlock): Don't crash if called for an
5168 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5170 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5173 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5175 * Examples/ex3.c: Wait until all threads are started before
5176 searching for the number to avoid race condition on very fast
5179 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5181 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5182 declaration since it's not needed.
5184 * sysdeps/pthread/pthread.h: Move internal functions to ...
5185 * internals.h: ...here.
5187 1998-12-02 H.J. Lu <hjl@gnu.org>
5189 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5190 SIGRTMIN is defined.
5191 (__pthread_sig_cancel): Likewise.
5193 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5195 * wrapsyscall.c: Include <sys/mman.h> for msync,
5196 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5197 Correct msync declaration.
5199 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5201 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5202 __libc_tsd_set): New macros for new interface.
5203 * no-tsd.c: New file, provide uninitialized defns of
5204 __libc_internal_tsd_get and __libc_internal_tsd_set.
5205 * Makefile (routines): Add no-tsd.
5207 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5209 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5210 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5211 __libc_internal_tsd_set): Move decls to ...
5212 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5215 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5216 __libc_internal_tsd_set): Make these pointers to functions, not
5217 functions; remove #pragma weak decls for them.
5218 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5219 Define static functions and initialized pointers to them.
5221 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5223 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5224 (CFLAGS-specific.c): Likewise.
5225 (CFLAGS-pthread.c): Likewise.
5226 (CFLAGS-ptfork.c): Likewise.
5227 (CFLAGS-cancel.c): Likewise.
5228 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5229 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5231 * mutex.c (pthread_mutex_init): Define as strong symbol.
5232 (pthread_mutex_destroy): Likewise.
5233 (pthread_mutex_trylock): Likewise.
5234 (pthread_mutex_lock): Likewise.
5235 (pthread_mutex_unlock): Likewise.
5236 (pthread_mutexattr_init): Likewise.
5237 (pthread_mutexattr_destroy): Likewise.
5238 (pthread_once): Likewise.
5239 * ptfork.c (pthread_atfork): Likewise.
5240 * specific.c (pthread_key_create): Likewise.
5241 (pthread_setspecific): Likewise.
5242 (pthread_getspecific): Likewise.
5244 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5246 * linuxthreads.texi: Fix punctuation after xref.
5248 1998-11-10 H.J. Lu <hjl@gnu.org>
5250 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5251 if it is defined in <linux/limits.h>.
5253 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5255 * spinlock.h (__pthread_trylock): Define inline.
5256 (__pthread_lock): Add extra parameter to declaration. Declare
5257 using internal_function.
5258 (__pthread_unlock): Declare using internal_function.
5259 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5260 of local variable self. Avoid recomputing self. Define using
5262 (__pthread_trylock): Remove.
5263 (__pthread_unlock): Define using internal_function.
5264 * cancel.c: Adjust for __pthread_lock interface change. Use already
5265 computed self value is possible.
5266 * condvar.c: Likewise.
5268 * manager.c: Likewise.
5269 * mutex.c: Likewise.
5270 * pthread.c: Likewise.
5271 * rwlock.c: Likewise.
5272 * semaphore.c: Likewise.
5273 * signals.c: Likewise.
5275 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5277 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5278 __ to field names of the struct.
5279 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5281 (pthread_attr_t): Likewise.
5282 (pthread_cond_t): Likewise.
5283 (pthread_condattr_t): Likewise.
5284 (pthread_mutex_t): Likewise.
5285 (pthread_mutexattr_t): Likewise.
5286 (pthread_rwlock_t): Likewise.
5287 (pthread_rwlockattr_t): Likewise.
5288 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5289 * cancel.c: Likewise.
5290 * condvar.c: Likewise.
5291 * manager.c: Likewise.
5292 * mutex.c: Likewise.
5293 * pthread.c: Likewise.
5294 * ptlongjmp.c: Likewise.
5295 * rwlock.c: Likewise.
5296 * spinlock.c: Likewise.
5298 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5300 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5303 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5306 * Makefile (libpthread-routines): Add pt-machine.
5307 * pt-machine.c: New file.
5308 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5309 yet defined. Use PT_EI in extern inline definitions.
5310 * sysdeps/arm/pt-machine.h: Likewise.
5311 * sysdeps/i386/pt-machine.h: Likewise.
5312 * sysdeps/i386/i686/pt-machine.h: Likewise.
5313 * sysdeps/m68k/pt-machine.h: Likewise.
5314 * sysdeps/mips/pt-machine.h: Likewise.
5315 * sysdeps/powerpc/pt-machine.h: Likewise.
5316 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5317 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5319 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5321 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5324 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5326 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5328 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5330 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5332 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5335 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5337 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5338 array index overflow.
5340 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5342 * sysdeps/pthread/semaphore.h: New file.
5344 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5346 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5347 _LIBC_TSD_KEY_DL_ERROR.
5349 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5351 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5352 * sysdeps/i386/pt-machine.h: Likewise.
5353 Suggested by Roland McGrath.
5355 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5357 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5358 access thread data with non-constant offsets.
5359 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5362 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5363 THREAD_SETMEM_NC definitions.
5365 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5367 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5369 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5371 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5372 not already defined.
5373 (struct _pthread_descr_struct): Add p_self and p_nr field.
5374 * manager.c (__pthread_handles): Define second element to point
5376 (__pthread_handles_num): Initialize to 2.
5377 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5378 (pthread_start_thread): Likewise.
5379 (pthread_handle_create): Start search for free slot at entry 2.
5380 Initialize new fields p_self and p_nr.
5381 Call __clone with CLONE_PTRACE if available.
5382 (pthread_free): Call FREE_THREAD_SELF if available.
5383 * pthread.c (__pthread_initial_thread): Initialize new fields.
5384 (__pthread_manager_thread): Likewise.
5385 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5387 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5388 elements of the thread descriptor.
5389 * condvar.c: Likewise.
5390 * errno.c: Likewise.
5392 * manager.c: Likewise.
5393 * pthread.c: Likewise.
5394 * ptlongjmp.c: Likewise.
5395 * semaphore.c: Likewise.
5396 * signals.c: Likewise.
5397 * specific.c: Likewise.
5398 * spinlock.c: Likewise.
5400 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5402 * sysdeps/i386/useldt.h: New file.
5403 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5405 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5406 THREAD_SETMEM using __thread_self.
5407 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5409 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5411 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5412 turned out that we didn't need to queue after all.
5414 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5416 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5417 and wastes space; correct types.
5419 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5421 * signals.c (sigaction): Handle NULL argument.
5423 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5425 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5428 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5430 * Makefile (linuxthreads-version): Extract correct number from
5433 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
5435 * Banner: Bump version number to 0.8
5436 * FAQ.html: Many updates, in particular w.r.t. debugging.
5437 * manager.c: Support for non-default stacksize for
5438 LinuxThreads-allocated stacks;
5439 don't use guard pages for stacks with default size, rely on
5440 rlimit(RLIMIT_STACK) instead (it's cheaper).
5442 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5443 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5444 * condvar.c: Likewise.
5445 * internals.h: Likewise.
5446 * restart.h: Likewise.
5447 * signals.c: Likewise.
5448 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5450 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5452 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5453 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
5454 * Versions: Put __pthread_mutexattr_settype under version
5455 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
5456 __pthread_mutexattr_gettype.
5458 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5460 * sysdeps/pthread/bits/libc-lock.h: Make
5461 __pthread_mutexattr_settype weak. Don't make
5462 __pthread_mutexattr_setkind_np weak.
5464 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
5466 * manager.c (pthread_handle_create): Check whether sched_setscheduler
5467 call can succeed here.
5469 * mutex.c: Define __pthread_mutexattr_settype and make
5470 __pthread_mutexattr_setkind_np an alias.
5471 Likewise for __pthread_mutexattr_gettype.
5473 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5475 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5478 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
5480 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5482 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5484 * Examples/ex6.c: Include <unistd.h> for usleep.
5486 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5488 * Examples/ex4.c (main): Use exit, not pthread_exit.
5490 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
5492 * Versions: Add __pthread_mutexattr_gettype and
5493 __pthread_mutexattr_settype.
5494 * lockfile.c: Use __pthread_mutexattr_settype instead of
5495 __pthread_mutexattr_setkind_np.
5496 * mutex.c: Define __pthread_mutexattr_gettype and
5497 __pthread_mutexattr_settype.
5499 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5500 __pthread_mutexattr_settype.
5501 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5502 Use __pthread_mutexattr_settype.
5504 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
5506 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5507 * mutex.c: Define weak alias pthread_mutexattr_gettype and
5508 pthread_mutexattr_settype.
5509 * sysdeps/pthread/pthread.h: Declare these functions.
5510 Move pthread_sigmask and pthread_kill declaration in separate header.
5511 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5513 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
5515 * Makefile: Add rules to compile and run tests.
5516 * Examples/ex1.c: Little changes to fix warnings.
5517 * Examples/ex2.c: Likewise.
5518 * Examples/ex3.c: Likewise.
5519 * Examples/ex4.c: Likewise.
5520 * Examples/ex5.c: Likewise.
5521 * Examples/ex6.c: New file.
5523 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
5525 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5527 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5529 * attr.c: Include <string.h>.
5531 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
5533 * attr.c: Include errno.h. Use memcpy to copy sched_param.
5534 * internals.h: Include limits.h.
5535 * manager.c: Use memcpy to copy sched_param.
5536 * ptfork.c: Include errno.h.
5537 * pthread.c: Likewise.
5538 * semaphore.c: Likewise.
5539 * specific.c: Likewise.
5540 * spinlock.h: Likewise.
5541 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
5542 type definition to ...
5543 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
5545 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
5547 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5549 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5550 as macros as demanded in POSIX.1, Annex C.
5552 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
5554 * internals.h (struct pthread_request): For free use pthread_t
5555 instead of pthread_descr.
5556 * join.c (pthread_join): Pass thread_id, not th to manager.
5557 (pthread_detach): Likewise.
5558 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
5559 (pthread_exited): Remove detached queue code.
5560 (pthread_handle_free): Expect thread ID parameter and use it to
5561 validate the thread decsriptor. Don't use detached queue.
5562 Patches by Xavier Leroy.
5564 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5566 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
5567 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
5568 __pthread_atfork, __pthread_key_create, __pthread_once.
5569 * internals.h: Doc fix.
5570 * pthread.c (__pthread_initialize): Define again.
5572 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
5574 * manager.c (pthread_exited): If thread is not detached put it on
5576 (pthread_handle_free): If thread is not on list with living threads
5577 search on list with detached threads.
5579 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5580 for new definition of pthread_rwlock_t.
5582 * spinlock.c: Correct test whether to compile
5583 __pthread_compare_and_swap or not.
5585 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
5587 * attr.c: Finish user stack support. Change locking code to be safe
5588 in situations with different priorities.
5589 * cancel.c: Likewise.
5590 * condvar.c: Likewise.
5591 * internals.h: Likewise.
5593 * manager.c: Likewise.
5594 * mutex.c: Likewise.
5595 * pthread.c: Likewise.
5596 * ptlongjmp.c: Likewise.
5597 * queue.h: Likewise.
5598 * rwlock.c: Likewise.
5599 * semaphore.c: Likewise.
5600 * semaphore.h: Likewise.
5601 * signals.c: Likewise.
5602 * spinlock.c: Likewise.
5603 * spinlock.h: Likewise.
5604 * sysdeps/pthread/pthread.h: Likewise.
5605 Patches by Xavier Leroy.
5607 * sysdeps/i386/i686/pt-machine.h: New file.
5609 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
5611 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
5612 [sg]et_stackaddr prototypes always available.
5614 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5615 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
5617 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
5619 * manager.c (pthread_free): Undo patch from 980430.
5620 Reported by David Wragg <dpw@doc.ic.ac.uk>.
5622 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
5624 * manager.c: Define __pthread_manager_adjust_prio and use it to
5625 increase priority when needed.
5626 * internals.h: Add prototype for __pthread_manager_adjust_prio.
5627 * mutex.c: Optimize mutexes to wake up only one thread.
5628 * pthread.c: Move PID of manager for global variable in structure
5630 Patches by Xavier Leroy.
5632 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
5634 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
5636 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5638 * attr.c: Correct typo.
5640 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
5642 * manager.c (pthread_free): Unmap guard before the stack.
5643 Patch by Matthias Urlichs.
5645 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
5647 * manager.c (pthread_free): Detect already free child.
5648 Patch by Xavier Leroy, reported by Matthias Urlichs.
5650 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5652 * Makefile (linuxthreads-version): Renamed back from
5655 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
5657 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
5660 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
5662 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
5663 * internals.h: Add definitions for new spinlock implementation.
5664 * ptlongjmp.c: New file.
5665 * spinlock.c: New file.
5666 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
5667 new function __pthread_acquire to prevent deadlocks with thread
5668 with different priorities.
5669 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
5671 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5673 * manager.c (__pthread_manager): Reduce first argument to select
5674 to include just the needed file descriptor.
5676 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
5678 * manager.c: Fix last patch which caused core dumps.
5680 * pthread.c: Correctly handle missing SIGRTMIN.
5682 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5684 * libpthread.map: Add __libc_internal_tsd_get and
5685 __libc_internal_tsd_set. Add missing cancelable functions. Export
5686 libc internal versions of the cancelable functions.
5688 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
5690 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
5692 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
5694 * attr.c: Implement pthread_attr_[gs]etguardsize,
5695 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
5696 Change pthread_attr_init to have two interfaces.
5697 * internals.h (struct _pthread_descr_struct): Add new fields for
5699 * libpthread.map: Add names in GLIBC_2.1 section.
5700 * manager.c (pthread_handle_create): Implement guardsize and
5702 (pthread_free): Likewise.
5703 * pthread.c (pthread_create): Add new interface for changed
5705 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
5706 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
5709 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
5711 * manager.c: Enable resetting of the thread scheduling policy
5712 to SCHED_OTHER when the parent thread has a different one.
5714 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
5716 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5717 _POSIX_ASYNCHRONOUS_IO.
5719 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
5721 * mutex.c: Implement new mutex types.
5723 * internals.h: Include <signal.h>.
5725 * libpthread.map: Add __erno_location and __h_errno_location.
5727 * errno.c: Return pointer to variable actually in use. This might
5728 not be the one in the thread structure.
5729 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
5731 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
5732 of manager thread structure.
5733 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
5735 * pthread.c: Adapt initializer for thread structures.
5736 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
5737 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
5738 current thread to global variables.
5740 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
5742 * rwlock.c: New file.
5743 * Makefile (libpthread-routines): Add rwlock.
5744 * sysdeps/pthread/pthread.h: Define data structures and declare
5746 * libpthread.map: Add new functions.
5748 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
5750 * sysdeps/arm/pt-machine.h: New file; add ARM support.
5751 * sysdeps/arm/Implies: likewise.
5752 * README: Document it.
5754 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5756 * signals.c: Remove unneeded initializer for sigwaited, saving a
5759 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5761 * semaphore.c (sem_init): Set sem_spinlock only if available.
5763 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
5765 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
5766 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
5768 * Makefile: Update from LinuxThreads 0.7.
5769 * internals.h. Likewise.
5770 * manager.c: Likewise.
5771 * mutex.c: Likewise.
5772 * pthread.c: Likewise.
5773 * signals.c: Likewise.
5774 * specific.c: Likewise.
5775 * Examples/ex3.c: Likewise.
5777 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
5779 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
5782 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
5784 * wrapsyscall.c: Add socket functions which are also cancelation
5787 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
5789 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
5790 New functions for fast thread specific data within libc.
5792 * internals.h: Add new array p_libc_specific to struct
5793 _pthread_descr_struct.
5795 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
5797 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
5799 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
5800 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
5802 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
5804 * internals.h (struct _pthread_descr_struct): Add definitions for
5805 two-level specific key handling.
5806 * manager.c (pthread_handle_create): Initialize specific memory array.
5807 * specific.c: Implement two-level key handling.
5808 * weaks.c: Don't provide dummy key handling.
5809 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
5810 Add definition of __libc_key_t.
5811 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
5813 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
5814 PTHREAD_DESTRUCTOR_ITERATIONS.
5816 * manager.c (pthread_handle_create): Compare mmap result with
5819 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
5820 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
5822 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
5824 sysdeps/sparc -> sysdeps/sparc/sparc32
5825 sysdeps/sparc64 -> sysdeps/sparc/sparc64
5827 * internals.h: Change definition of THREAD_SELF to be an expression,
5828 not a statement that did a return.
5829 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
5830 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
5831 Follow Solaris and use a "system reserved" register (%g6) to hold
5832 the thread descriptor.
5833 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5835 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
5837 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
5838 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
5839 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
5841 * semaphore.c: Include spinlock.h only when needed.
5843 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
5844 keys for entries not in use.
5846 * weaks.c: Implement key handling functions for real.
5848 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
5850 Initial sparc64-linux support:
5851 * sysdeps/sparc64/Implies: New file.
5852 * sysdeps/sparc64/pt-machine.h: Likewise.
5854 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
5856 * semaphore.c: Include spinlock.h at correct place.
5859 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
5861 The Great Bit File Move:
5862 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
5863 * sysdeps/powerpc/semaphorebits.h: Likewise.
5864 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
5865 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
5866 * sysdeps/pthread/libc-lock.h: -> bits/
5867 * sysdeps/pthread/stdio-lock.h: Likewise.
5868 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
5869 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
5870 * semaphore.h: Likewise.
5871 * sysdeps/pthread/pthread.h: Likewise.
5873 * lockfile.c: <foo.h> -> <bits/foo.h>.
5874 * semaphore.h: Likewise.
5876 * Makefile: (headers): foo.h -> bits/foo.h.
5877 * sysdeps/pthread/Makefile: Likewise.
5879 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5881 * semaphore.c (sem_init): Set sem_spinlock only if available.
5883 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
5886 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
5888 Update from LinuxThreads 0.6.
5890 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
5891 and __sched_get_priority_min instead of names without `__'.
5893 * manager.c: Rewrite large parts to implement opaque pthread_t.
5895 * cancel.c: Adapt for opaque pthread_t type.
5896 * condvar.c: Likewise.
5897 * errno.c: Likewise.
5899 * mutex.c: Likewise.
5900 * pthread.c: Likewise.
5901 * signals.c: Likewise.
5902 * specific.c: Likewise.
5903 * restart.h: Likewise.
5904 * queue.h: Likewise.
5905 * Examples/ex3.c: Likewise.
5906 * Examples/ex4.c: Likewise.
5907 * sysdeps/pthread/pthread.h: Likewise.
5909 * pthread.c: Accumulate time for all threads in thread manager.
5911 * semaphore.c: Implement fallback implementation for architectures
5912 sometimes missing compare-exchange operations.
5914 * cancel.c (pthread_cancel): Validate handle argument.
5915 * join.c (pthread_join): Likewise.
5916 (pthread_detach): Likewise.
5917 * signals.c (pthread_kill): Likewise.
5919 * spinlock.h (acquire): Use __sched_yield not sched_yield.
5921 * queue.h (enqueue): Enqueue thread according to priority.
5923 * internals.c (struct pthread_start_args): New struct for passing
5924 args to cloning function.
5925 (struct _pthread): Rename to _pthread_descr_struct and adapt for
5928 * Examples/Makefile (clean): Pass -f option to rm.
5930 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
5931 and define TEST_FOR_COMPARE_AND_SWAP.
5932 * sysdeps/i386/i486/pt-machine.h: Removed.
5934 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
5937 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
5939 * restart.h (suspend): Clear p_signal before suspending.
5940 (suspend_with_cancellation): Likewise.
5941 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
5943 * weaks.c: Make __pthread_key_create return 1.
5944 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
5945 __libc_getspecific, __libc_setspecific, and __libc_key_t.
5946 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
5949 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
5951 * sysdeps/sparc/pt-machine (RELEASE): Fix.
5953 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
5955 * sysdeps/powerpc/Implies: Added.
5956 * sysdeps/powerpc/pt-machine.h: Added.
5957 * sysdeps/powerpc/semaphorebits.h: Added.
5959 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
5961 * pthread.c (__pthread_initial_thread): Correct
5963 (__pthread_manager_thread): Likewise.
5964 Reported by Andreas Jaeger.
5966 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
5968 Since sigset_t no longer fits in a register, we can't pass in the
5969 thread's initial mask so easily. Take this opportunity to simplify
5970 the clone implementation by only accepting a single void* argument.
5972 * manager.c (__pthread_manager): Put thread vitals in the thread
5973 struct instead of as arguments through clone.
5974 (pthread_start_thread): Look for them there.
5975 * internals.h (struct _pthread): Add p_initial_fn,
5976 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
5977 * pthread.c (pthread_initialize_manager): Revise clone invocation.