1 2002-11-28 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
4 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
5 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7 2002-11-19 Ulrich Drepper <drepper@redhat.com>
9 * Versions (libc:GLIBC_2.0): Remove names of functions which are
11 * Makefile (shared-only-routines): Add weaks.
12 * weaks.c: Remove functions which are not exported from libc.so.
14 2002-11-14 Roland McGrath <roland@redhat.com>
16 * libc-tsd.c: New file.
17 * Makefile (distribute): Add it.
18 (libc-link.so): New variable.
19 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
20 (libc-ok-for-link): New variable.
21 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
22 libc-ok-for-link to $(use-thread).
23 [$(libc-ok-for-link) = no]
24 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
25 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
27 (generated): Append them.
28 (extra-objs): Append libc-tsd.os.
30 * libc-tls-loc.c: New file.
31 * Makefile (libpthread-routines): Add it.
33 2002-11-14 Andreas Schwab <schwab@suse.de>
35 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
38 2002-11-13 Roland McGrath <roland@redhat.com>
40 * Examples/ex6.c (main): Improve error reporting.
42 2002-11-04 Ulrich Drepper <drepper@redhat.com>
44 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
45 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
47 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
49 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
51 2002-10-22 Jakub Jelinek <jakub@redhat.com>
53 * manager.c (pthread_start_thread): Call __uselocale even
54 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
56 2002-10-17 Roland McGrath <roland@redhat.com>
58 * Makefile (unload): Don't link in libpthread.so.
59 ($(objpfx)unload.out): Do depend on it.
60 * unload.c (main): Improve error reporting.
62 2002-10-09 Roland McGrath <roland@redhat.com>
64 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
65 Under [__PIC__], call the function via the pointer fetched for
66 comparison rather than a call by name that uses the PLT.
67 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
68 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
69 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
70 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
71 (__libc_key_create, __libc_getspecific, __libc_setspecific)
72 (__libc_atfork): Use it.
74 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
75 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
76 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
77 (ld: GLIBC_PRIVATE): Set removed.
79 2002-10-11 Ulrich Drepper <drepper@redhat.com>
81 * sysdeps/unix/sysv/linux/execve.c: New file.
83 2002-10-09 Jakub Jelinek <jakub@redhat.com>
85 * no-tsd.c: Include stdlib.h.
87 2002-10-07 Jakub Jelinek <jakub@redhat.com>
89 * sysdeps/unix/sysv/linux/allocalim.h: New file.
90 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
92 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
93 Pass stack size to caller.
94 (pthread_handle_create): Set p_alloca_cutoff.
95 * pthread.c (__pthread_initial_thread): Use C99 designated
96 initializers. Set p_alloca_cutoff.
97 (__pthread_manager_thread): Likewise.
98 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
100 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
102 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
104 * specific.c (__libc_alloca_cutoff): New function.
105 * no-tsd.c (__libc_alloca_cutoff): New function.
106 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
109 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
111 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
112 * sysdeps/sh/tls.h: Likewise.
113 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
115 2002-09-29 Jakub Jelinek <jakub@redhat.com>
117 * sysdeps/pthread/tst-timer.c (main): Clear
118 SIGEV2.sigev_notify_attributes.
120 2002-09-29 Ulrich Drepper <drepper@redhat.com>
122 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
123 INLINE_SYSCALL for set_thread_area syscall.
125 2002-09-28 Roland McGrath <roland@redhat.com>
127 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
128 Don't call setrlimit, since we did no prior bogon we need to undo.
130 2002-09-27 Roland McGrath <roland@redhat.com>
132 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
134 2002-09-24 Roland McGrath <roland@redhat.com>
136 * sysdeps/x86_64/tls.h: New file.
138 2002-09-23 Roland McGrath <roland@redhat.com>
140 * Examples/ex13.c (dump_mut): int -> size_t for counter.
142 2002-09-18 Bruno Haible <bruno@clisp.org>
144 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
145 an unexpected error code.
147 * internals.h (__pthread_message): Add const to first parameter type.
148 * pthread.c (__pthread_message): Likewise.
150 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
152 2002-09-17 Roland McGrath <roland@redhat.com>
154 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
155 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
156 offset (positive or negative) relative to the thread struct.
157 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
159 2002-09-12 Jakub Jelinek <jakub@redhat.com>
161 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
162 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
163 Replace /usr/lib/crt[in].o with crt[in].o too.
165 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
167 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
169 2002-09-04 Bruno Haible <bruno@clisp.org>
171 * pthread.c: Include <sys/time.h>.
172 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
173 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
174 * Makefile (distribute): Add smp.h to the list.
176 2002-09-04 Bruno Haible <bruno@clisp.org>
178 * sysdeps/alpha/pt-machine.h: Choose different include file location
179 on non-Linux platforms.
181 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
182 (open, open64): Change va_arg argument type to the integral type to
183 which mode_t promotes.
185 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
186 the structure of 'struct sigevent'.
188 * errno.c (__errno_location, __h_errno_location, __res_state):
189 Use prototype function definitions.
191 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
193 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
194 * sysdeps/powerpc/pt-machine.h: moved to...
195 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
196 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
198 2002-09-02 Roland McGrath <roland@redhat.com>
200 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
202 2002-09-01 Roland McGrath <roland@redhat.com>
204 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
205 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
207 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
208 (__libc_internal_tsd_address): Declare it.
209 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
210 __libc_internal_tsd_address.
211 * specific.c (libc_internal_tsd_address): New function.
212 (__libc_internal_tsd_address): New variable.
213 * no-tsd.c (__libc_internal_tsd_address): New variable.
215 2002-08-31 Ulrich Drepper <drepper@redhat.com>
217 * Makefile: Don't use rule for crt%.o, spell it out as rules for
220 2002-08-30 Roland McGrath <roland@redhat.com>
222 * Makefile (extra-objs, omit-deps): Add crtn.
223 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
224 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
225 ($(objpfx)crtn.S): New target.
226 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
227 (generated): Add crtn.S.
229 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
232 2002-08-30 Jakub Jelinek <jakub@redhat.com>
234 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
237 2002-08-30 Roland McGrath <roland@redhat.com>
239 * tst-static-locale.c: New file.
240 * Makefile (tests, tests-static): Add it.
242 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
244 * spinlock.c (__pthread_lock): Fix spurious wakeup
245 handling. Don't clear lowest bit of list pointer as sign the thread
246 is still on the wait list. Don't restart after spurious wakeup
247 with spinning to get the lock.
248 (__pthread_unlock): Take set lowest bit into account when handling
249 pointer to list elements.
250 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
252 2002-08-28 Roland McGrath <roland@redhat.com>
254 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
256 2002-08-28 Jakub Jelinek <jakub@redhat.com>
258 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
259 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
260 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
262 2002-08-28 Ulrich Drepper <drepper@redhat.com>
264 * sysdeps/pthread/timer_routines.c (thread_func): Change return
265 type to void and add casts in use to avoid warnings with all gcc
268 2002-08-08 Jakub Jelinek <jakub@redhat.com>
270 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
272 * manager.c (__pthread_handles): Remove.
273 * pthandles.c: New file.
274 * pthread.c (__pthread_initialize_minimal): Initialize
275 __pthread_handles[0] and __pthread_handles[1].
276 * Makefile (libpthread-routines): Add pthandles (must be last).
278 2002-08-26 Brian Youmans <3diff@gnu.org>
280 * Examples/ex10.c: Corrected version number in Lesser GPL copying
281 permission notice from 2 to 2.1.
282 * Examples/ex11.c: Likewise.
283 * Examples/ex13.c: Likewise.
284 * Examples/ex8.c: Likewise.
285 * Examples/ex9.c: Likewise.
286 * barrier.c: Likewise.
287 * events.c: Likewise.
288 * lockfile.c: Likewise.
289 * no-tsd.c: Likewise.
290 * pt-machine.c: Likewise.
291 * ptclock_gettime.c: Likewise.
292 * ptclock_settime.c: Likewise.
293 * rwlock.c: Likewise.
294 * sysdeps/alpha/pspinlock.c: Likewise.
295 * sysdeps/alpha/pt-machine.h: Likewise.
296 * sysdeps/arm/pspinlock.c: Likewise.
297 * sysdeps/arm/pt-machine.h: Likewise.
298 * sysdeps/cris/pspinlock.c: Likewise.
299 * sysdeps/cris/pt-machine.h: Likewise.
300 * sysdeps/hppa/pspinlock.c: Likewise.
301 * sysdeps/hppa/pt-machine.h: Likewise.
302 * sysdeps/i386/i686/pt-machine.h: Likewise.
303 * sysdeps/i386/pspinlock.c: Likewise.
304 * sysdeps/i386/pt-machine.h: Likewise.
305 * sysdeps/i386/useldt.h: Likewise.
306 * sysdeps/ia64/pspinlock.c: Likewise.
307 * sysdeps/ia64/pt-machine.h: Likewise.
308 * sysdeps/m68k/pspinlock.c: Likewise.
309 * sysdeps/m68k/pt-machine.h: Likewise.
310 * sysdeps/mips/pspinlock.c: Likewise.
311 * sysdeps/mips/pt-machine.h: Likewise.
312 * sysdeps/powerpc/pspinlock.c: Likewise.
313 * sysdeps/powerpc/pt-machine.h: Likewise.
314 * sysdeps/pthread/bits/initspin.h: Likewise.
315 * sysdeps/pthread/bits/libc-lock.h: Likewise.
316 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
317 * sysdeps/pthread/getcpuclockid.c: Likewise.
318 * sysdeps/pthread/posix-timer.h: Likewise.
319 * sysdeps/pthread/timer_create.c: Likewise.
320 * sysdeps/pthread/timer_delete.c: Likewise.
321 * sysdeps/pthread/timer_getoverr.c: Likewise.
322 * sysdeps/pthread/timer_gettime.c: Likewise.
323 * sysdeps/pthread/timer_routines.c: Likewise.
324 * sysdeps/pthread/timer_settime.c: Likewise.
325 * sysdeps/pthread/tst-timer.c: Likewise.
326 * sysdeps/s390/pspinlock.c: Likewise.
327 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
328 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
329 * sysdeps/sh/pspinlock.c: Likewise.
330 * sysdeps/sh/pt-machine.h: Likewise.
331 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
332 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
333 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
334 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
335 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
336 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
337 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
338 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
339 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
340 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
341 * tststack.c: Likewise.
342 * unload.c: Likewise.
344 * wrapsyscall.c: Likewise.
346 * sysdeps/pthread/pt-initfini.c: Changed copying
347 permission notice to Lesser GPL from Library GPL, including the
348 references in the special exception.
349 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
350 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
351 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
353 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
355 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
357 2002-08-26 Ulrich Drepper <drepper@redhat.com>
359 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
360 overflow [PR libc/4244].
362 2002-08-25 Ulrich Drepper <drepper@redhat.com>
364 * sysdeps/pthread/timer_routines.c (thread_func): Make the
365 compiler happy by adding a return statement which will never be
368 * tst-context.c (main): Cast to long before casting to pointer.
370 * Examples/ex17.c (main): Use correct format string.
372 * Examples/ex9.c (thread): Remove incorrect return statement.
374 2002-08-23 Ulrich Drepper <drepper@redhat.com>
376 * pthread.c (__linuxthreads_version): New global constant.
378 2002-08-23 Andreas Jaeger <aj@suse.de>
380 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
381 as thread specific register.
382 (testandset): Fix inline asm.
383 (THREAD_GETMEM): Fix inline asm.
385 2002-08-22 Roland McGrath <roland@redhat.com>
387 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
389 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
390 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
391 macro. That chooses whether to reuse %gs value or let kernel set it.
392 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
393 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
396 2002-08-21 Ulrich Drepper <drepper@redhat.com>
398 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
399 also to the third definition of this macro.
401 2002-06-17 Andreas Jaeger <aj@suse.de>
403 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
406 2002-08-20 Ulrich Drepper <drepper@redhat.com>
408 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
409 loading/reading segment registers. Some old hardware doesn't
410 handle the 32-bit instructions as expected.
411 * sysdeps/i386/tls.h: Likewise.
413 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
414 renamed to secondcall and use is negated.
415 (TLS_SETUP_GS_SEGMENT): Likewise.
416 (TLS_INIT_TP): Likewise.
417 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
420 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
421 registers. No need to mask upper 16 bits in this case.
422 * sysdeps/i386/useldt.h: Likewise.
423 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
424 is the same since the GDT content changed.
426 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
427 to TLS_SETUP_GS_SEGMENT.
428 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
429 TLS_DO_SET_THREAD_AREA.
430 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
431 entry number from %gs value.
432 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
435 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
436 Pass true to _dl_deallocate_tls.
437 (pthread_free): Likewise.
438 * pthread.c (__pthread_initialize_manager): Likewise.
440 2002-08-19 Ulrich Drepper <drepper@redhat.com>
442 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
443 computing index from %gs value.
445 2002-08-16 Roland McGrath <roland@redhat.com>
447 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
448 register value from entry number properly.
450 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
451 optimally conditional on [__PIC__].
452 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
453 without touching errno, and use latest modify_ldt-like interface.
454 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
455 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
456 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
457 existing %gs value as the segment to set.
458 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
459 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
460 by the first thread's early TLS setup.
462 2002-08-15 Roland McGrath <roland@redhat.com>
464 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
465 return a value as callers now expect.
467 2002-08-11 Roland McGrath <roland@redhat.com>
469 * pthread.c (__pthread_initialize_manager): Initialize
470 p_header.data.tcb field of manager thread's descriptor.
471 (__pthread_initialize_minimal): Don't initialize p_header.data.self
472 field, already done by TLS_INIT_TP.
474 * manager.c (pthread_handle_create): Move p_header field initializers
477 2002-08-08 Ulrich Drepper <drepper@redhat.com>
479 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
481 2002-08-07 Ulrich Drepper <drepper@redhat.com>
483 * pthread.c (__linuxthreads_initial_report_events): New variable.
484 (__pthread_initialize_manager): Use it to initialize p_report_events
486 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
488 2002-08-07 Roland McGrath <roland@redhat.com>
490 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
491 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
493 2002-08-02 Roland McGrath <roland@redhat.com>
495 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
496 Add _LIBC_TSD_KEY_LOCALE.
497 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
498 Call __uselocale to initialize our per-thread locale pointer to
500 * pthread.c (__pthread_initialize_minimal): Likewise.
502 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
504 2002-08-02 Ulrich Drepper <drepper@redhat.com>
506 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
509 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
510 Don't use p_libc_specific element in thread descriptor.
512 2002-07-30 Roland McGrath <roland@redhat.com>
514 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
515 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
516 which does the right thing when __thread support is available.
517 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
518 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
519 `p_h_errno', `p_resp', and `p_res' members.
520 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
521 Don't initialize `p_errnop' and `p_h_errnop' members.
522 (__pthread_reset_main_thread): Likewise.
523 (__pthread_initialize_manager): Likewise.
524 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
525 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
526 Don't initialize `p_resp' member.
527 (__pthread_reset_main_thread): Likewise.
528 * manager.c (pthread_handle_create): Likewise.
529 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
530 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
531 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
532 * errno.c [USE_TLS && HAVE___THREAD]
533 (__h_errno_location, __res_state): Don't define these at all.
535 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
536 (INSTALL_NEW_DTV, GET_DTV): Likewise.
537 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
539 * weaks.c: Don't include <errno.h> here.
541 2002-08-01 Roland McGrath <roland@redhat.com>
543 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
545 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
546 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
547 (TLS_INIT_TP): Use that.
549 2002-08-02 Jakub Jelinek <jakub@redhat.com>
551 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
552 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
553 (FREE_THREAD): Avoid modify_ldt if using GDT.
554 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
556 2002-07-25 Jakub Jelinek <jakub@redhat.com>
558 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
559 * sysdeps/i386/pt-machine.h: Likewise.
560 * sysdeps/i386/useldt.h: Likewise.
562 2002-07-22 Ulrich Drepper <drepper@redhat.com>
564 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
565 call __libc_setup_tls first.
566 * Makefile: Actually create tst-signal.out file when running the test.
567 (tests): Add tststatic.
568 * Examples/tststatic.c: New file.
570 2002-07-19 Ulrich Drepper <drepper@redhat.com>
572 * errno.c (__errno_location): Don't define unless !USE_TLS
574 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
575 * sysdeps/i386/tls.h: Likewise.
576 * sysdeps/i386/useldt.h: Likewise.
577 * sysdeps/i386/i686/pt-machine.h: Likewise.
579 2002-07-02 H.J. Lu <hjl@gnu.org>
581 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
583 * sysdeps/mips/pt-machine.h: Likewise.
585 2002-07-14 Ulrich Drepper <drepper@redhat.com>
587 * manager.c (pthread_handle_create): Initialize self-reference in
590 2002-07-01 Jakub Jelinek <jakub@redhat.com>
592 * Examples/ex9.c (main): Remove unused th variable.
594 2002-07-10 Ulrich Drepper <drepper@redhat.com>
596 * wrapsyscall.c: Add __nanosleep alias.
597 * Versions (GLIBC_2.2.6): Add __nanosleep.
598 * bug-sleep.c: New file.
599 * Makefile (tests): Add bug-sleep.
601 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
603 * Examples/ex9.c (main): Use list of children and join them.
604 (thread): Do not call exit.
606 2002-06-20 Ulrich Drepper <drepper@redhat.com>
608 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
609 Unconditionally use the code using spinlock. Use __pthread_release
611 (wait_node_free): Likewise.
612 (__pthread_acquire, __pthread_release): Unconditionally define.
614 2002-06-07 Jakub Jelinek <jakub@redhat.com>
616 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
618 2002-05-24 Ulrich Drepper <drepper@redhat.com>
620 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
622 2002-05-21 Ulrich Drepper <drepper@redhat.com>
624 * sysdeps/pthread/pthread.h (pthread_create): Rename first
626 (pthread_cancel): Likewise.
627 * internals.h (__pthread_create_2_1): Likewise.
628 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
630 2002-05-20 Ulrich Drepper <drepper@redhat.com>
632 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
633 Patch by Glen Nakamura <gen@flex.com>.
635 2002-05-03 Ulrich Drepper <drepper@redhat.com>
637 * signals.c: Move sighandler functions to...
638 * sighandler.c: ...here. New file.
639 * signals.c: Move signal handler related type definitions to...
640 * internals.h: ...here. Add prototypes for signal handlers.
641 * Makefile (libpthread-routines): Add sighandler.
642 (CFLAGS-sighandler.c): Add $(exceptions).
644 2002-04-30 Jakub Jelinek <jakub@redhat.com>
646 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
648 2002-04-08 Ulrich Drepper <drepper@redhat.com>
650 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
651 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
652 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
653 based on previous one and not on current time. Count overruns.
654 Patch by Eric F. Sorton <eric@cctcorp.com>.
656 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
658 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
660 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
661 if it isn't defined yet.
662 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
663 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
665 * sysdeps/sh/tls.h: New file.
667 2002-04-08 Jakub Jelinek <jakub@redhat.com>
669 * manager.c (__pthread_manager_event): Use self instead of arg
670 for INIT_THREAD_SELF.
671 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
672 _pthread_descr_struct) instead of sizeof (*descr).
674 2002-04-05 Ulrich Drepper <drepper@redhat.com>
676 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
677 * sysdeps/alpha/pt-machine.h: Likewise.
678 * sysdeps/arm/pt-machine.h: Likewise.
679 * sysdeps/cris/pt-machine.h: Likewise.
680 * sysdeps/hppa/pt-machine.h: Likewise.
681 * sysdeps/m68k/pt-machine.h: Likewise.
682 * sysdeps/mips/pt-machine.h: Likewise.
683 * sysdeps/powerpc/pt-machine.h: Likewise.
684 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
685 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
686 * sysdeps/sh/pt-machine.h: Likewise.
687 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
688 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
689 * sysdeps/x86_64/pt-machine.h: Likewise.
691 2002-04-05 Jakub Jelinek <jakub@redhat.com>
693 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
694 instead of pthread_mutexattr_setkind_np.
695 (pthread_mutexattr_gettype): Similarly.
696 * man/pthread_mutexattr_setkind_np.man: New.
697 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
699 2002-04-02 Ulrich Drepper <drepper@redhat.com>
701 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
703 2002-03-22 Jakub Jelinek <jakub@redhat.com>
705 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
707 2002-03-22 Ulrich Drepper <drepper@redhat.com>
709 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
711 2002-03-17 Andreas Jaeger <aj@suse.de>
713 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
715 * sysdeps/alpha/pt-machine.h: Likewise.
716 * sysdeps/arm/pt-machine.h: Likewise.
717 * sysdeps/cris/pt-machine.h: Likewise.
718 * sysdeps/hppa/pt-machine.h: Likewise.
719 * sysdeps/i386/i686/pt-machine.h: Likewise.
720 * sysdeps/ia64/pt-machine.h: Likewise.
721 * sysdeps/m68k/pt-machine.h: Likewise.
722 * sysdeps/mips/pt-machine.h: Likewise.
723 * sysdeps/powerpc/pt-machine.h: Likewise.
724 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
725 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
726 * sysdeps/sh/pt-machine.h: Likewise.
727 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
728 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
729 * sysdeps/x86_64/pt-machine.h: Likewise.
731 * internals.h: Move testandset and __compare_and_swap prototypes
734 2002-03-03 Andreas Jaeger <aj@suse.de>
736 * errno.c: Include resolv.h to avoid warning.
738 2002-02-27 Ulrich Drepper <drepper@redhat.com>
740 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
743 2002-02-23 Ulrich Drepper <drepper@redhat.com>
745 * attr.c (pthread_getattr_np): Don't take thread descriptor size
746 into account if USE_TLS.
747 * manager.c (pthread_handle_create): Free TLS data structures if call
748 failed. Pass correct stack to clone if USE_TLS.
749 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
750 * sysdeps/i386/i686/pt-machine.h: Likewise.
751 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
753 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
754 Add p_stackaddr element #if USE_TLS.
755 * internals.c: Include <tls.h>.
756 * manager.c: Integrate creating and handling of thread descriptor
758 * pthread.c: Likewise.
759 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
760 Include <linuxthreads/descr.h> only if TLS is really used.
761 (GET_DTV): New macro.
762 (TLS_INIT_TP): Initialize self pointer.
764 2002-02-17 Andreas Schwab <schwab@suse.de>
766 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
769 2002-02-12 Ulrich Drepper <drepper@redhat.com>
771 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
772 (INSTALL_DTV): Adjust for being passed pointer to element with length.
774 2002-02-08 Ulrich Drepper <drepper@redhat.com>
776 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
778 2002-02-08 Richard Henderson <rth@redhat.com>
780 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
782 2002-02-08 Ulrich Drepper <drepper@redhat.com>
784 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
787 2002-02-07 H.J. Lu <hjl@gnu.org>
789 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
791 (__pthread_spin_lock): Remove ".set noreorder".
792 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
794 2002-02-05 H.J. Lu <hjl@gnu.org>
796 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
798 * sysdeps/mips/pt-machine.h (testandset): Likewise.
799 (__compare_and_swap): Likewise.
801 2002-02-07 Ulrich Drepper <drepper@redhat.com>
803 * internals.h: Move declarations/definitions of
804 __pthread_initial_thread_bos, __pthread_initial_thread,
805 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
806 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
807 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
809 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
810 Define THREAD_GETMEM accordingly.
812 2002-02-06 Ulrich Drepper <drepper@redhat.com>
814 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
816 * sysdeps/i386/tls.h: Define THREAD_DTV.
818 2002-02-04 Ulrich Drepper <drepper@redhat.com>
820 * internals.h: Move thread descriptor definition...
821 * descr.h.: ...here. New file.
822 * sysdeps/i386/tls.h: New file.
824 2002-02-01 H.J. Lu <hjl@gnu.org>
826 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
827 different register in the delayed slot. Use branch likely.
829 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
830 (__compare_and_swap): Return 0 only when failed to compare. Use
833 2002-02-01 Jakub Jelinek <jakub@redhat.com>
835 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
836 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
837 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
838 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
839 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
840 * sysdeps/sparc/sparc64/Versions: New file.
841 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
843 2002-01-31 Ulrich Drepper <drepper@redhat.com>
845 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
846 in SHARED code, use GL(dl_cpuclock_offset).
848 2002-01-28 Andreas Jaeger <aj@suse.de>
850 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
851 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
853 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
855 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
856 (CURRENT_STACK_FRAME): Remove duplicate definition.
857 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
859 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
861 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
864 2002-01-12 Andreas Schwab <schwab@suse.de>
866 * Makefile (test-srcs): Add tst-signal.
867 (tests): Run tst-signal.
868 (distribute): Add tst-signal.sh.
869 * tst-signal.c, tst-signal.sh: New files.
871 2002-01-14 Andreas Jaeger <aj@suse.de>
873 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
875 2002-01-11 Andreas Schwab <schwab@suse.de>
877 * signals.c (sighandler): Initialize all elements to SIG_ERR.
878 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
880 2002-01-06 Richard Henderson <rth@redhat.com>
882 * sysdeps/alpha/elf/pt-initfini.c: New file.
884 2001-12-29 Andreas Jaeger <aj@suse.de>
886 * Examples/ex9.c: Add noreturn attribute for thread.
887 * Examples/ex10.c: Likewise.
888 * Examples/ex13.c (thread_start): Likewise.
889 * Examples/ex15.c (worker): Likewise.
891 * Examples/ex18.c: Include unistd.h for prototype of sleep.
893 2001-12-14 Ulrich Drepper <drepper@redhat.com>
895 * man/pthread_atfork.man: Adjust description of mutex handling
896 after fork for current implementation.
897 * linuxthreads.texi: Likewise [PR libc/2519].
899 2001-12-13 Andreas Schwab <schwab@suse.de>
901 * specific.c (pthread_key_delete): Don't contact the thread
902 manager if no threads have been created yet.
904 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
906 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
907 qualifier to be safe.
909 2001-11-30 Andreas Schwab <schwab@suse.de>
911 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
912 that self is the manager thread, and initialize the thread
914 (thread_self_stack) [THREAD_SELF]: New function to find self via
916 * manager.c (pthread_handle_create): Don't block cancel signal any
919 2001-11-29 Andreas Jaeger <aj@suse.de>
921 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
923 (INIT_THREAD_SELF): New.
924 (THREAD_GETMEM): New.
926 (THREAD_SETMEM): New.
927 (THREAD_SETMEM_NC): New.
928 (FLOATING_STACKS): Define.
929 (ARCH_STACK_MAX_SIZE): Define.
931 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
933 Bugfix to pthread_key_delete. It was iterating over the thread
934 manager's linked list of threads, behind the thread manager's
935 back causing a race. The fix is to have the manager iterate over
936 the threads instead, using a new request type for doing so.
937 * internals.h (struct pthread_request): New manager request type
939 * manager.c (pthread_for_each_thread): New function.
940 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
941 * specific.c (struct pthread_key_delete_helper_args): New type.
942 (pthread_key_delete_helper): New static function.
943 (pthread_key_delete): Use the new thread manager
944 REQ_FOR_EACH_THREAD function to iterate over the threads and set
945 the delete key slot to a null value in each thread.
946 * Examples/ex18.c: New test.
947 * Makefile (tests): Add ex18.
949 2001-11-22 Wolfram Gloger <wg@malloc.de>
951 * pthread.c (pthread_onexit_process): Don't call free
952 after threads have been asynchronously terminated.
954 * manager.c (pthread_handle_exit): Surround cancellation
955 of threads with __flockfilelist()/__funlockfilelist().
957 2001-11-26 Andreas Schwab <schwab@suse.de>
959 * manager.c (pthread_handle_create): Start the child thread with
960 the cancel signal blocked, so that it does not handle it before
961 the thread register is set up. Save errno from failed clone call.
963 2001-11-15 Ulrich Drepper <drepper@redhat.com>
965 * sysdeps/i386/i686/Implies: Removed.
966 * sysdeps/i386/i686/Versions: New file.
968 2001-10-31 Andreas Jaeger <aj@suse.de>
970 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
972 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
974 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
975 to __linuxthreads_pthread_sizeof_descr to match name used by
976 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
977 linuxthreads_db/td_symbol_list.c.
979 2001-09-22 Andreas Jaeger <aj@suse.de>
981 * linuxthreads/tst-context.c: Avoid compile warning.
983 2001-09-20 Andreas Jaeger <aj@suse.de>
985 * shlib-versions: Add x86-64.
987 2001-09-19 Andreas Jaeger <aj@suse.de>
989 * sysdeps/x86_64/Makefile: New file.
990 * sysdeps/x86_64/pspinlock.c: New file.
991 * sysdeps/x86_64/pt-machine.h: New file.
993 2001-09-12 Jakub Jelinek <jakub@redhat.com>
995 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
997 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
999 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1000 Wolfram Gloger <wg@malloc.de>
1002 * join.c: Protect all communications from and to manager with
1004 * manager.c: Likewise.
1005 * pthread.c: Likewise.
1006 * smeaphore.c: Likewise.
1008 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1010 * spinlock.c (__pthread_lock): Top max_count value with
1011 MAX_ADAPTIVE_SPIN_COUNT.
1012 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1014 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1017 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1019 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1020 non-opaque type if __USE_UNIX98.
1022 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1024 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1025 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1027 2001-08-23 Roland McGrath <roland@frob.com>
1029 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1030 new first argument, skip the cleanup handler if it's zero.
1031 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1032 (__libc_lock_define_initialized_recursive): Use it.
1033 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1034 The sysdeps/generic file from the main tree now suffices.
1036 2001-08-22 Roland McGrath <roland@frob.com>
1038 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1039 instead of <pthread.h>.
1040 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1041 (_IO_lock_initializer): Add braces.
1042 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1043 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1045 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1046 (__libc_lock_define_initialized_recursive): Use it.
1047 (__libc_lock_init_recursive): Likewise.
1048 (__libc_lock_fini_recursive): Likewise.
1049 (__libc_lock_lock_recursive): Likewise.
1050 (__libc_lock_trylock_recursive): Likewise.
1051 (__libc_lock_unlock_recursive): Likewise.
1052 (__libc_lock_define_recursive): New macro.
1054 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1056 * lockfile.c (__pthread_provide_lockfile): New variable.
1057 * pthread.c (__pthread_require_lockfile): New variable.
1058 * cancel.c (__pthread_require_lockfile): New variable.
1060 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1062 * tst-context.c (threadfct): Initialize context before calling
1065 * Examples/ex17.c: Make sure test thread is around long enough.
1067 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1069 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1071 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1073 * tst-context.c (main): Print explanation before bailing out
1074 because context handling is not supported.
1076 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1078 * Makefile (tests): Add tst-context.
1079 * tst-context.c: New file.
1081 * sysdeps/pthread/bits/stdio-lock.h: Define
1082 _IO_cleanup_region_start_noarg.
1084 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1086 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1087 (ARCH_STACK_MAX_SIZE): Define.
1088 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1089 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1091 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1093 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1095 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1096 (ARCH_STACK_MAX_SIZE): Define.
1097 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1098 NEED_SEPARATE_REGISTER_STACK.
1100 2001-07-16 Andreas Schwab <schwab@suse.de>
1102 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1103 (omit-deps): Add crti.
1104 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1105 it is filtered out of the link command.
1107 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1109 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1110 to find the right value for __pthread_initial_thread_bos, it's not
1111 used. If not FLOATING_STACKS first run
1112 __pthread_init_max_stacksize.
1114 2001-06-16 H.J. Lu <hjl@gnu.org>
1116 * internals.h: Include <stackinfo.h>.
1118 * attr.c: Don't include <stackinfo.h> here.
1119 * cancel.c: Likewise.
1120 * manager.c: Likewise.
1121 * pthread.c: Likewise.
1122 * ptlongjmp.c: Likewise.
1124 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1126 * attr.c: Make _STACK_GROWS_UP work.
1127 * internals.h: Likewise.
1128 * manager.c: Likewise.
1129 * pthread.c: Likewise.
1131 2001-06-15 H.J. Lu <hjl@gnu.org>
1133 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1135 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1137 * semaphore.h: Use struct _pthread_fastlock as an element of
1138 sem_t instead of an identical struct.
1139 * rwlock.c: Remove casts.
1140 * semaphore.c: Likewise.
1142 2001-04-30 Alan Modra <amodra@one.net.au>
1144 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1146 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1148 * linuxthreads.texi: Spelling corrections.
1150 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1152 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1153 returning successfully.
1154 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1156 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1158 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1159 serious work try once whether the lock is uncontested.
1160 Remove duplicate reading of __status before loop.
1161 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1163 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1164 (__pthread_alt_trylock): Likewise.
1166 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1168 Memory barrier overhaul following line by line inspection.
1169 * mutex.c (pthread_once): Missing memory barriers added.
1170 * pthread.c (__pthread_wait_for_restart_signal,
1171 __pthread_timedsuspend_new, __pthread_restart_new): Added
1172 memory barriers ``just in case'' and for documentary value.
1173 * spinlock.c (__pthread_release): New inline function for releasing
1174 spinlock, to complement __pthread_acquire. Includes memory
1175 barrier prior to assignment to spinlock, and __asm __volatile
1176 dance to prevent reordering or optimization of the spinlock access.
1177 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1178 __pthread_alt_timedlock, __pthread_alt_unlock,
1179 __pthread_compare_and_swap): Updated to use new __pthread_release
1180 instead of updating spinlock directly.
1181 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1182 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1183 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1184 Memory barrier overhaul. Lots of missing memory barriers added,
1185 a couple needless ones removed.
1186 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1187 removed, just calls __pthread_acquire, which has the new read
1188 barrier in it before its testandset.
1190 2001-05-20 Roland McGrath <roland@frob.com>
1192 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1194 2001-05-09 Geoff Keating <geoffk@redhat.com>
1196 * sysdeps/powerpc/pt-machine.h
1197 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1198 (__compare_and_swap): Remove memory barriers.
1199 (__compare_and_swap_with_release_semantics): New function.
1201 2001-04-24 Andreas Jaeger <aj@suse.de>
1203 * wrapsyscall.c: send* and recv* return ssize_t.
1205 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1206 mutex instead of double locking it.
1207 Reported by Pierre Artaud <partaud@sodatec.com>.
1209 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1211 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1212 using #ifdef whether the clock is available.
1213 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1215 * sysdeps/ia64/Versions: New file.
1217 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1218 have to call __gmon_start__ in the libpthread DSO.
1219 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1221 * Makefile (libpthread-routines): Add ptclock_gettime and
1223 * internals.h: Don't use cpuclock-init.h definitions, use
1224 hp-timing.h definitions.
1225 * pthread.c: Likewise.
1226 * manager.c: Likewise.
1227 * ptclock_gettime.c: New file.
1228 * ptclock_settime.c: New file.
1229 * internals.h: Fix parameter type for __pthread_clock_gettime and
1230 __pthread_clock_settime.
1232 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1233 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1234 * sysdeps/i386/i586/Makefile: Removed.
1236 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1238 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1239 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1241 2001-04-21 Andreas Jaeger <aj@suse.de>
1243 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1244 attribute, remove statements that will never be executed.
1245 (thread_func): Remove mutex_unlock call since it's never executed.
1246 (thread_func): Fix comment as suggested by Jakub Jelinek.
1248 * manager.c (__pthread_manager): Add noreturn
1250 (pthread_start_thread): Likewise, remove return statement.
1251 (pthread_start_thread_event): Likewise.
1252 Add noreturn attribute for pthread_handle_exit.
1253 * weaks.c: Add noreturn attribute for pthread_exit.
1255 * internals.h: Add __pthread_clock_gettime and
1256 __pthread_clock_settime prototypes.
1258 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1260 * internals.h: Include <cpuclock-init.h>.
1261 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1262 CPUCLOCK_VARDEF is defined.
1263 * pthread.c (__pthread_initialize_minimal): Initialize
1264 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1265 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1266 for new thread to current CPU clock value.
1268 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1270 * sysdeps/i386/i586/Makefile: New file.
1271 * sysdeps/i386/i586/Versions: New file.
1272 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1273 * sysdeps/i386/i586/ptclock_settime.c: New file.
1274 * sysdeps/i386/i686/Implies: New file.
1276 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1278 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1279 $generated, not $postclean-generated.
1281 2001-04-18 Andreas Jaeger <aj@suse.de>
1283 * Makefile (otherlibs): Added.
1285 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1287 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1289 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1291 * signals.c (sigwait): NSIG is no signal number. Block all
1292 signals while in signal handler for signals in SET.
1293 Patch by Manfred Spraul <manfred@colorfullife.com>.
1295 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1297 * tst-cancel.c: Disable most tests. Add new test where all
1298 cleanup handlers must run.
1299 * Makefile (tests): Add tst-cancel again.
1301 * cancel.c (__pthread_perform_cleanup): Correct condition for
1302 leaving cleanup loop early.
1304 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1305 all the files which use CURRENT_STACK_FRAME.
1306 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1307 __builtin_frame_address.
1308 * sysdeps/i386/i686/pt-machine.h: Likewise.
1310 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1312 * Makefile (tests): Comment out tst-cancel for now.
1314 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1315 temporary file in object directory.
1316 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1317 Pass $(objpfx) to tst-cancel.
1319 2001-04-11 David S. Miller <davem@redhat.com>
1321 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1322 up closer to user local variables so that new cleanup heuristics work.
1323 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1325 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1327 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1329 (_pthread_cleanup_push_defer): Likewise.
1331 * tst-cancel.c (main): Fix loop printing cleanup output.
1333 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1335 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1337 (__pthread_spin_trylock): Likewise.
1338 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1340 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1342 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1343 which takes an extra parameter with the current frame pointer.
1344 Call new function with CURRENT_STACK_FRAME.
1345 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1346 with the new parameter.
1347 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1348 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1349 this parameter as the initial value the cleanup handler records are
1350 compared against. No active cleanup handler record must have an
1351 address lower than the previous one and the initial record must be
1352 above (below on PA) the frame address passed in.
1353 (pthread_setcancelstate): Call __pthread_do_exit instead of
1355 (pthread_setcanceltype): Likewise.
1356 (pthread_testcancel): Likewise.
1357 (_pthread_cleanup_pop_restore): Likewise.
1358 * condvar.c (pthread_cond_wait): Likewise.
1359 (pthread_cond_timedwait_relative): Likewise.
1360 * manager.c (pthread_start_thread): Likewise.
1361 * oldsemaphore.c (__old_sem_wait): Likewise.
1362 * pthread.c (pthread_handle_sigcancel): Likewise.
1363 * semaphore.c (__new_sem_wait): Likewise.
1364 (sem_timedwait): Likewise.
1365 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1366 to limit the cleanup handlers which get run.
1367 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1368 for __pthread_perform_cleanup.
1370 * Makefile (tests): Add tst-cancel.
1371 * tst-cancel.c: New file.
1373 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1375 * sysdeps/cris/pt-machine.h: New file.
1376 * sysdeps/cris/pspinlock.c: New file.
1378 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1380 * shlib-versions: Add case for Linux on CRIS.
1382 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1384 * attr.c (pthread_getattr_np): Correct computation of stack size
1385 for machiens with register stack.
1387 * Examples/ex17.c (main): Correct detection of failed mmap call.
1389 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1391 * pthread.c (__pthread_initialize_manager): Fix a typo.
1393 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1395 * attr.c (__pthread_attr_setstack): Fix alignment check.
1396 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1397 * Makefile (tests): Add ex17 test.
1398 * Examples/ex17.c: New test.
1400 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1402 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1403 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1404 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1406 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1408 * Makefile: When generating DSO link with libc_nonshared.a.
1410 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1412 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1414 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1416 * internals.h (__pthread_init_max_stacksize): New prototype.
1417 * attr.c (__pthread_attr_setstacksize): Call
1418 __pthread_init_max_stacksize if not yet initialized.
1419 * pthread.c (__pthread_init_max_stacksize): New function.
1420 (__pthread_initialize_manager): Call it.
1421 Patch by <dtc@cmucl.cons.org>.
1423 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1425 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1427 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1429 * shlib-versions: Add rule for Linux on 64 bit S/390.
1430 * sysdeps/s390/s390-64/pt-machine.h: New file.
1431 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1433 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1435 * sysdeps/s390/pt-machine.h: Move to...
1436 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1437 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1439 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1441 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1442 * attr.c: Implement pthread_getattr_np.
1443 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1444 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1445 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1447 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1449 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1452 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1454 * manager.c (manager_mask): Removed static vesion. Now always local
1455 to __pthread_manager().
1456 (manager_mask_all): Removed completely.
1457 (__pthread_manager): Remove manager_mask_all initialization.
1458 (pthread_handle_create): Remove code to set and reset signal mask
1459 around __clone2() calls.
1461 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1463 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1464 memory on every spin.
1466 2001-02-10 Andreas Jaeger <aj@suse.de>
1468 * Makefile (extra-objs): New.
1470 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1472 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1473 __pthread_initialize_minimal prototype.
1475 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1477 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1479 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1481 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1483 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1485 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1486 broken code. Patch by Jes Sorensen.
1488 2001-02-06 Andreas Jaeger <aj@suse.de>
1490 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1492 * internals.h: ...here.
1494 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1496 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1498 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1500 * Versions: Remove __pthread_initialize_minimal.
1502 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1504 * Makefile: Add rules to build crti.o and make it being used in
1505 building libpthread.so.
1506 * sysdeps/i386/Makefile: New file.
1507 * sysdeps/pthread/pt-initfini.c: New file.
1509 * pthread.c: Cleanups.
1511 2001-01-28 Andreas Jaeger <aj@suse.de>
1513 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1514 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1515 * spinlock.c: Likewise.
1517 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1519 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1520 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1521 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1522 * pthread.c: Likewise.
1523 * spinlock.h: Likewise.
1524 * sysdeps/pthread/pthread.h: Likewise.
1526 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1528 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1529 as struct __pthread_attr_s.
1531 * semaphore.h (sem_t): Cleanup namespace, rename status and
1534 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1536 * pthread.c (pthread_onexit_process): Clear
1537 __pthread_manager_thread_bos after freeing it.
1538 * Makefile (tests): Add ex16.
1539 * Examples/ex16.c: New file.
1541 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1543 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1545 * pthread.c (pthread_exit_process): Rename to...
1546 (pthread_onexit_process): ...this.
1547 (pthread_atexit_process, pthread_atexit_retcode): New.
1548 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1549 and only if HAVE_Z_NODELETE is not defined.
1550 (__pthread_initialize_manager): Register pthread_atexit_retcode
1553 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1555 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1557 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1559 * Makefile (tests): Add ex15.
1560 * Examples/ex15.c: New test.
1562 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1564 * pthread.c (pthread_exit_process): Free memory allocated for
1567 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1569 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1570 (pthread_free): Always unmap the stack. It's safe now that we don't
1571 use MAP_FIXED to allocate stacks.
1573 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1575 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1577 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1579 2000-11-15 Wolfram Gloger <wg@malloc.de>
1581 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1582 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1584 2000-12-27 Andreas Jaeger <aj@suse.de>
1586 * Examples/ex13.c: Make local functions static.
1587 * ecmutex.c: Likewise.
1588 * joinrace.c: Likewise.
1589 * Examples/ex14.c: Likewise.
1591 * Examples/ex2.c: Make local functions static; reformat.
1592 * Examples/ex1.c: Likewise.
1593 * Examples/ex4.c: Likewise.
1594 * Examples/ex5.c: Likewise.
1595 * Examples/ex7.c: Likewise.
1597 * oldsemaphore.c: Add prototypes to shut up GCC.
1598 * pt-machine.c: Likewise.
1600 * weaks.c: Add prototype for pthread_exit.
1602 * internals.h: Add some prototypes, format prototypes and add
1604 Move __libc_waitpid prototype to include/sys/wait.h.
1606 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1607 * mutex.c: Likewise.
1608 * specific.c: Likewise.
1609 * ptfork.c: Likewise.
1611 * lockfile.c: Include internals.h to get prototypes.
1612 * events.c: Likewise.
1613 * sysdeps/alpha/pspinlock.c: Likewise.
1614 * sysdeps/arm/pspinlock.c: Likewise.
1615 * sysdeps/hppa/pspinlock.c: Likewise.
1616 * sysdeps/i386/pspinlock.c: Likewise.
1617 * sysdeps/ia64/pspinlock.c: Likewise.
1618 * sysdeps/m68k/pspinlock.c: Likewise.
1619 * sysdeps/mips/pspinlock.c: Likewise.
1620 * sysdeps/powerpc/pspinlock.c: Likewise.
1621 * sysdeps/s390/pspinlock.c: Likewise.
1622 * sysdeps/sh/pspinlock.c: Likewise.
1623 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1624 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1625 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1627 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1629 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1630 (__pthread_attr_getstack): Return correct address.
1631 Add warnings for using pthread_attr_getstackaddr and
1632 pthread_attr_setstackaddr.
1634 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1636 * Examples/ex6.c (test_thread): Make static.
1637 * Examples/ex12.c (test_thread): Make static and add noreturn
1640 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1642 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1643 and compare_and_swap_with_release_semantics returns int not long.
1645 2000-12-17 Andreas Jaeger <aj@suse.de>
1647 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1649 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1650 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1651 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1652 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1653 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1654 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1656 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1658 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1659 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1661 2000-12-17 Andreas Jaeger <aj@suse.de>
1663 * internals.h: Add prototypes for testandset and
1664 __compare_and_swap to shut up gcc warnings.
1666 2000-12-06 Wolfram Gloger <wg@malloc.de>
1668 * join.c (pthread_detach): Allow case where the thread has already
1671 2000-12-05 Andreas Jaeger <aj@suse.de>
1673 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1674 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1675 (__compare_and_swap): Likewise.
1676 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1678 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1680 * Examples/ex3.c (main): Cast int to long before casting to void *.
1681 (search): Cast void * to long, not int.
1682 * Examples/ex8.c (main, thread): Similarly.
1683 * Examples/ex11.c (main): Similarly.
1684 * Examples/ex14.c (worker, do_test): Similarly.
1685 * ecmutex.c (worker, do_test): Similarly.
1686 (nlocks): Cast to int.
1688 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1690 * linuxthreads.texi: Add documentation for pthreads attributes
1691 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1692 patch. Document pthread_[sg]etconcurrency(). Mark
1693 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1695 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1697 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1699 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1700 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1702 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1704 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1705 not doing it right now.
1706 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1708 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1710 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1713 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1715 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1716 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1718 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1719 discussing mutexes. (As per the Unix98 name for the API.)
1720 Changes documentation for pthread_mutexattr_setkind_np() and
1721 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1722 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1723 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1724 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1725 Begins to introduce discussion of the ``timed'' mutex type. This
1726 discussion is currently incomplete.
1727 Patch by Bruce Mitchener <bruce@cubik.org>.
1729 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1730 Yutaka Niibe <gniibe@chroot.org>
1732 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1733 has restrictions, use register.
1735 2000-10-23 Andreas Schwab <schwab@suse.de>
1737 * Examples/ex14.c (TIMEOUT): Override default timeout.
1739 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1741 * specific.c: Protect tsd array modification in thread data
1742 structures by getting the thread lock in pthread_key_delete and
1743 __pthread_destroy_specifics.
1744 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1746 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1748 * sysdeps/pthread/bits/initspin.h: New file.
1749 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1750 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1751 (__pthread_alt_init_lock): Likewise.
1752 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1754 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1756 * oldsemaphore.c (__old_sem_init): Release lock with
1757 LT_SPINLOCK_INIT, not zero.
1758 * spinlock.c (__pthread_unlock): Likewise.
1759 (__pthread_alt_lock): Likewise.
1760 (__pthread_alt_timedlock): Likewise.
1761 (__pthread_alt_unlock): Likewise.
1762 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1763 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1764 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1765 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1767 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1769 * shlib-versions: Add version definitions for hppa-linux.
1771 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1773 * sysdeps/hppa/pspinlock.c: New file.
1774 * sysdeps/hppa/pt-machine.h: New file.
1775 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1777 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1779 * mutex.c (__pthread_mutex_destroy): Correct test of
1780 busy mutex for mutexes using alternate fastlocks.
1781 Patch by dtc@cmucl.cons.org.
1783 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1785 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1787 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1789 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1790 test for owner first.
1791 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1793 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1796 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1798 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1799 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1801 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1802 _POSIX_MONOTONIC_CLOCK.
1804 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1807 2000-09-20 Andreas Jaeger <aj@suse.de>
1809 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1810 "testrtsig.h" conditional.
1812 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1814 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1815 pthread_attr_setstack.
1816 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1817 pthread_attr_setstack.
1818 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1820 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1822 * Examples/ex14.c: New file.
1823 * Makefile (tests): Add ex14.
1825 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1826 mutex. Patch by dtc@cmucl.cons.org.
1828 * ecmutex.c: New file.
1829 * Makefile (tests): Add ecmutex.
1831 2000-09-04 H.J. Lu <hjl@gnu.org>
1833 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1834 instead of roundup to round up to the page size.
1836 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1838 * manager.c (pthread_exited): Correctly report event as TD_REAP
1839 instead of TD_DEATH. Fix comments.
1841 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1843 * spinlock.h (testandset): Add cast to avoid warning.
1844 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1846 2000-09-02 Andreas Jaeger <aj@suse.de>
1848 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1851 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1853 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1854 Fix typo in last patch (_mode -> _flags).
1856 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1857 Provide definition which respects _IO_USER_LOCK flag.
1859 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1861 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1864 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1866 * Makefile: Add rules to build and run unload.
1867 * unload.c: New file.
1869 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1871 * sysdeps/pthread/pthread.h
1872 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1873 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1875 2000-08-24 Andreas Jaeger <aj@suse.de>
1877 * Examples/ex13.c: Include <string.h> for strerror prototype and
1878 <stdlib.h> for abort prototype.
1879 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1880 (thread_start): Remove unused variable err.
1881 (main): Silence GCC warnings.
1883 2000-08-22 Andreas Jaeger <aj@suse.de>
1885 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1887 * Makefile (tests): Add ex13.
1889 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1891 * semaphore.h: Add restrict where required by AGd4.
1892 * sysdeps/pthread/pthread.h: Likewise.
1893 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1895 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1897 * Makefile (tests): Add ex12. Add rule to build it.
1898 * Examples/ex12.c: New file.
1900 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1902 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1903 even though the implementation is not quite complete (but it reports
1904 it). Define _POSIX_MESSAGE_PASSING to -1.
1905 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1907 2000-08-12 Andreas Jaeger <aj@suse.de>
1909 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1911 (__compare_and_swap): Likewise.
1912 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1914 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1916 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1917 p_h_errnop correctly and not to NULL.
1919 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1921 * Banner: Bump version number to 0.9.
1923 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1925 * Makefile (tests): Add tststack. Add rule to build the program.
1926 * tststack.c: New file.
1928 * internals.h: Declare __pthread_max_stacksize.
1929 * pthread.c (__pthread_max_stacksize): New variable.
1930 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1932 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1933 (pthread_allocate_stack): Allow kernel to choose stack address if
1934 FLOATING_STACKS. This also handles variable-sized stacks.
1935 Always allocate stack and guardpage together. Use mprotect to
1936 change guardpage access.
1937 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1938 ARCH_STACK_MAX_SIZE.
1940 * attr.c (__pthread_attr_setstacksize): Also test value against
1943 * manager.c (__pthread_nonstandard_stacks): Define only if
1944 THREAD_SELF is not defined.
1945 (pthread_allocate_stack): Always initialize gardaddr to a correct
1947 (pthread_handle_create): Unmap thread with one call.
1948 (pthread_free): Remove test for initial thread before removing stack.
1949 Unmap stack with one call.
1951 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1952 1 to avoid removing the stack.
1954 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1956 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1957 load of spin lock to prime the cache before the atomic compare and
1958 exchange operation (cmpxchg4). This avoids the spinning on the
1959 cmpxchg4 instruction and reduces movement of the cache line back
1960 and forth between the processors (explanation by Asis K. Mallick
1961 from Intel). This basically makes the implementation operate the
1962 same as the Linux kernel implementation.
1964 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1965 * sysdeps/ia64/pspinlock.c: New file.
1967 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1969 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1970 * spinlock.h: ...here. Remove locking.
1971 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1973 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1974 (rwlock_rd_extricate_func): Don't determine self, let
1975 __pthread_lock do it.
1976 (rwlock_wr_extricate_func): Likewise.
1977 (rwlock_have_already): Optimize *pself handling a bit.
1979 * mutex.c: Use __builtin_expect.
1980 * pthread.c: Likewise.
1982 2000-08-02 Andreas Jaeger <aj@suse.de>
1984 * sysdeps/s390/pspinlock.c: New file.
1985 * sysdeps/s390/pt-machine.h: New file.
1986 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1988 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1990 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1992 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1994 2000-07-26 Andreas Jaeger <aj@suse.de>
1996 * pthread.c: Initialize p_sem_avail.
1998 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2000 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2001 * semaphore.c: Handle spurious wakeups.
2003 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2004 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2006 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2007 (__pthread_wait_for_restart): Likewise.
2009 * condvar.c (pthread_cond_wait): Also check whether thread is
2010 cancelable before aborting loop.
2011 (pthread_cond_timedwait): Likewise.
2013 * signals.c (pthread_sighandler): Remove special code to restrore
2015 (pthread_sighandler_t): Likewise.
2017 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2019 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2020 * pthread.c: Include <resolv.h>.
2021 (_res): Undefine. Add extern declaration.
2023 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2025 * pthread.c (__pthread_initial_thread): Update initializer.
2026 (__pthread_manager_thread): Likewise.
2027 (pthread_initialize): Move setrlimit call to...
2028 (__pthread_initialize_manager): ...here.
2029 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2031 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2032 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2034 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2036 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2037 __compare_and_swap to define testandset.
2038 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2039 Define IMPLEMENT_TAS_WITH_CAS.
2041 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2043 * Makefile: Pass -z nodelete to linker for libpthread.so
2044 generation if it understand this option.
2046 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2048 * manager.c (pthread_handle_create): Remove initialization of
2049 new_thread->p_res._sock.
2051 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2053 Bugfixes to the variant of the code for machines with no compare
2056 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2057 node was not being properly enqueued, due to failing to update
2058 the lock->__status field.
2060 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2061 being set inappropriately, causing the suspend function to be called
2062 with a null self pointer and crash.
2064 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2066 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2067 compare&swap is available.
2069 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2072 * pthread.c (pthread_initialize): Don't use sysconf to determine
2073 whether the machine has more than one processor.
2075 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2076 removed thread_self calls.
2078 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2080 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2081 __compare_and_swap to compare_and_swap in code which assumes
2082 compare swap is available.
2084 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2086 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2087 bug whereby thr field of waitnode structure would not be correctly
2088 set unless a null self pointer is passed to the functions.
2089 Eliminated redundant calls to thread_self().
2091 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2093 * pthread.c (__pthread_initialize_manager): Lock
2094 __pthread_manager_thread.p_lock before calling clone.
2096 2000-05-05 H.J. Lu <hjl@gnu.org>
2098 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2099 have acquire semantics.
2100 (__compare_and_swap_with_release_semantics): New inline
2102 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2104 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2106 * manager.c: Fix the problem with signals at startup.
2107 Change the way that thread stacks are allocated on IA64.
2108 Clean up some of the guard page allocation stuff.
2110 1999-12-19 H.J. Lu <hjl@gnu.org>
2112 * internals.h (page_roundup): New.
2113 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2115 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2116 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2119 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2121 * manager.c (pthread_allocate_stack): Unmap the stack top
2122 if failed to map the stack bottom.
2124 (pthread_free): Fix the guard page.
2126 * pthread.c (pthread_initialize): Set rlimit correctly for
2127 NEED_SEPARATE_REGISTER_STACK.
2129 1999-12-16 H.J. Lu <hjl@gnu.org>
2131 * pthread.c (__pthread_initialize_manager): Pass
2132 __pthread_manager_thread_bos instead of
2133 __pthread_manager_thread_tos to __clone2.
2135 1999-12-16 H.J. Lu <hjl@gnu.org>
2137 * manager.c (pthread_allocate_stack): Correct the calculation
2138 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2141 1999-12-13 H.J. Lu <hjl@gnu.org>
2143 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2144 bit after setting ar.ccv.
2146 1999-12-12 H.J. Lu <hjl@gnu.org>
2148 * manager.c (pthread_allocate_stack): Make the starting
2149 address of the stack bottom page aligned. FIXME: it may
2150 need changes in other places.
2151 (pthread_handle_create): Likewise.
2153 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2155 * manager.c (pthread_allocate_stack): Handle
2156 NEED_SEPARATE_REGISTER_STACK.
2157 (pthread_handle_create): Likewise.
2158 * pthread.c (__pthread_initialize_manager): Likewise.
2160 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2162 1999-12-02 H.J. Lu <hjl@gnu.org>
2164 * sysdeps/ia64/pt-machine.h: New.
2166 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2168 * wrapsyscall.c: Mark non-__ protected names as weak.
2171 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2173 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2175 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2177 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2178 Add tests also to new alternative spinlock implementation.
2179 * spinlock.h: Likewise.
2180 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2182 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2184 * Version: Export __sigaction.
2185 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2187 * pthread.c: Use __libc_sigaction instead of __sigaction.
2189 * condvar.c: Implement pthread_condattr_getpshared and
2190 pthread_condattr_setpshared.
2191 * mutex.c: Implement pthread_mutexattr_getpshared and
2192 pthread_mutexattr_setpshared.
2193 * Versions: Export new functions.
2194 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2196 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2197 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2200 2000-07-04 Greg McGary <greg@mcgary.org>
2202 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2203 pragmas. Include bp-sym.h only if _LIBC.
2205 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2207 * spinlock.c (__pthread_unlock): Properly place write barrier.
2208 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2210 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2212 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2213 faster on SMP systems. No more emulation of compare&swap for adaptive
2215 * spinlock.h: Likewise.
2216 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2217 Replace fast with adaptive mutex.
2218 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2219 * condvar.c: Likewise.
2220 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2221 * internals.h: Declare __pthread_smp_kernel.
2222 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2223 _pthread_fastlock structure.
2224 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2226 * pthread.c: Remove initialization to zero from global variables.
2228 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2230 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2232 2000-06-28 Greg McGary <greg@mcgary.org>
2234 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2235 pthread functions that have pointers in their return+arg signatures.
2237 2000-06-27 Greg McGary <greg@mcgary.org>
2239 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2240 extern declarations of pthread functions that have pointers in
2241 their return+arg signatures.
2243 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2245 * Makefile (tests): Add ex11. Add rules to build it.
2246 * Examples/ex11.c: New file.
2247 * rwlock.c: Fix complete braindamaged previous try to implement
2250 * spinlock.c: Pretty print.
2252 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2254 * Makefile (tests): Add ex10. Add rules to build it.
2255 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2256 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2257 * condvar.c (pthread_cond_wait): Allow mutex of kind
2258 PTHREAD_MUTEX_TIMED_NP.
2259 (pthread_cond_timedwait_relative): Likewise.
2260 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2261 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2262 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2263 (__pthread_mutex_lock): Use __pthread_alt_lock for
2264 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2265 (__pthread_mutex_timedlock): New function.
2266 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2267 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2268 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2269 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2270 * spinlock.c: Implement alternate fastlocks.
2271 * spinlock.h: Add prototypes.
2272 * Examples/ex10.c: New file.
2273 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2274 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2276 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2277 (__pthread_rwlock_timedrdlock): New function.
2278 (__pthread_rwlock_timedwrlock): New function.
2279 Use laternate fastlock function everywhere.
2281 2000-06-21 Andreas Jaeger <aj@suse.de>
2283 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2286 * join.c: Include <stdlib.h> for exit prototype.
2288 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2290 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2292 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2293 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2295 * Makefile (libpthread-routines): Add barrier.
2296 (tests): Add ex9. Add rule to build ex9.
2297 * Versions: Export barrier functions.
2298 * barrier.c: New file.
2299 * Examples/ex9.c: New file.
2300 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2301 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2302 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2304 2000-06-19 H.J. Lu <hjl@gnu.org>
2306 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2307 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2308 (compare_and_swap_with_release_semantics): New. Default to
2309 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2312 * spinlock.c (__pthread_unlock): Call
2313 compare_and_swap_with_release_semantics () instead of
2314 compare_and_swap ().
2316 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2318 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2320 * sysdeps/pthread/timer_delete.c: Likewise.
2321 * sysdeps/pthread/timer_getoverr.c: Likewise.
2322 * sysdeps/pthread/timer_gettime.c: Likewise.
2323 * sysdeps/pthread/timer_settime.c: Likewise.
2325 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2327 Timer nodes are now reference counted, and can be marked
2328 as deleted. This allows for the safe release of the global mutex
2329 in the middle without losing the timer being operated on.
2331 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2332 member is now an enum with three values, so that an intermediate
2333 state can be represented (deleted but not free for reuse yet).
2334 New refcount member added.
2335 * sysdeps/pthread/timer_routines.c: Likewise.
2337 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2338 timer_valid): New inline functions added.
2340 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2341 restructured, recursive deadlock bug fixed.
2343 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2344 timer_addref to ensure that timer won't be deleted while mutex is not
2345 held. Also uses timer_invalid to perform validation of timer handle.
2346 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2347 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2349 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2351 * shlib-versions: Add entry for SH.
2352 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2354 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2356 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2357 tightened up some critical regions and micro-optimized some list
2360 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2361 Returns int value now to indicate whether timer was queued at head.
2362 * sysdeps/pthread/posix-timer.h: Likewise.
2363 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2364 new return value from __timer_thread_queue_timer to avoid waking
2365 up timer thread unnecessarily.
2367 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2368 inuse flag, because this requires mutex to be held. Callers updated
2369 to do the check when they have the mutex.
2370 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2372 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2373 regions: avoids making system calls while holding timer mutex, and
2374 a few computations were moved outside of the mutex as well.
2375 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2377 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2378 to list_unlink_ip, meaning idempotent. Pointer manipulation
2379 changed to get better better code out of gcc.
2380 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2381 version of list_unlink added here.
2382 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2383 function in all places: idempotent one for timers, non-idempotent
2384 one for thread nodes.
2385 * sysdeps/pthread/timer_settime: Likewise.
2386 * sysdeps/pthread/timer_routines.c: Likewise.
2388 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2390 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2391 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2393 * sysdeps/pthread/Makefile: Remove tests definition.
2395 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2396 Yutaka Niibe <gniibe@chroot.org>
2398 * sysdeps/sh/pspinlock.c: New file.
2399 * sysdeps/sh/pt-machine.h: New file.
2401 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2403 * Makefile (tests): Add joinrace.
2405 * Examples/ex6.c: Test return value of pthread_join.
2407 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2409 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2410 (__pthread_spin_trylock): Implement.
2411 (__pthread_spin_unlock): Implement.
2412 (__pthread_spin_init): Implement.
2413 (__pthread_spin_destroy): Implement.
2415 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2417 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2418 really append the entry.
2420 2000-06-10 Andreas Jaeger <aj@suse.de>
2422 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2424 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2426 * sysdeps/pthread/timer_create.c: Thread matching now done on
2427 clock type as well as thread attributes.
2428 There are individual global signal-delivering threads for
2429 different clock types.
2430 * sysdeps/pthread/posix-timer.h: Likewise.
2431 * sysdeps/pthread/timer_routines.c: Likewise.
2433 * sysdeps/pthread/timer_routines.c: Thread allocation and
2434 deallocation function now remembers to put thread on active
2435 list and remove from active list.
2436 Thus now the feature of binding multiple timers
2437 to a single thread actually works.
2439 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2441 * pthread.c (__pthread_create_2_1): Optimize a bit.
2443 * internals.h (invalid_handle): Also test for p_terminated != 0.
2444 (nonexisting_handle): New function. Same as old invalid_handle.
2445 * join.c (pthread_join): Use nonexisting_handle instead of
2446 invalid_handle to test for acceptable thread handle.
2447 * manager.c (pthread_handle_free): Likewise.
2448 * joinrace.c: New file.
2449 Reported by Permaine Cheung <pcheung@cygnus.com>.
2451 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2453 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2454 Correct handling of matching variable.
2456 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2459 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2460 Be prepared for empty timer list.
2462 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2463 CPUTIME clock ID. Add support for thread clocks.
2465 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2466 subtraction were switched.
2468 * sysdeps/pthread/timer_routines.c (init_module): Use
2469 THREAD_MAXNODES threads.
2471 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2472 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2473 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2474 with sigqueueinfo is this system call is available.
2476 * sysdeps/pthread/timer_create.c (timer_create): Allow
2477 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2479 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2481 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2483 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2485 * sysdeps/pthread/posix-timer.h: New file.
2486 * sysdeps/pthread/timer_create.c: New file.
2487 * sysdeps/pthread/timer_delete.c: New file.
2488 * sysdeps/pthread/timer_getoverr.c: New file.
2489 * sysdeps/pthread/timer_gettime.c: New file.
2490 * sysdeps/pthread/timer_routines.c: New file.
2491 * sysdeps/pthread/timer_settime.c: New file.
2492 * sysdeps/pthread/tst-timer.c: New file.
2494 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2496 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2497 LINK_MAX definitions if necessary.
2499 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2501 Added missing fork time handling of global libio lock.
2503 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2504 not just the individual stream locks. Rewritten to use new
2505 iterator interface provided by libio rather than accessing
2508 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2509 which lock and unlock the stream list using the new interface
2511 * internals.h: Likewise.
2513 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2514 and __funlockfilelist in the parent after the fork.
2515 Child still calls __fresetlockfiles as before.
2517 * linuxthreads.texi: Now explains what happens to streams at
2518 fork time. Also whole new section on forking and thread added.
2519 Definition of pthread_atfork moved out of Miscellaneous Functions
2520 to this new section.
2522 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2524 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2525 Add missing register.
2526 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2528 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2530 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2531 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2532 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2534 2000-05-31 Andreas Jaeger <aj@suse.de>
2536 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2538 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2540 * spinlock.c (__pthread_lock): Remove ASSERT.
2542 * Makefile (tests): Add ex8.
2543 * Examples/ex8.c: New file.
2545 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2547 Bugfix: The pthread_atfork mechanism now takes care of its
2548 own internal mutex at fork time.
2550 * ptfork.c (__fork): Revised so that the mutex is held across
2551 the fork operation and while the handlers are called, and so that
2552 the child resets the mutex.
2554 * linuxthreads.texi: Updated pthread_atfork documentation to make
2555 it clear that fork and pthread_atfork can't be reentered from
2556 atfork handlers, that pthread_atfork and fork are mutually atomic,
2557 and that the handlers are inherited by the child process.
2559 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2561 * Makefile (libpthread-routines): Add pspinlock.
2562 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2563 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2564 * condvar.c: Likewise.
2565 * internals.h: Likewise.
2567 * manager.c: Likewise.
2568 * mutex.c: Likewise.
2569 * pthread.c: Likewise.
2570 * rwlock.c: Likewise.
2571 * semaphore.c: Likewise.
2572 * signals.c: Likewise.
2573 * spinlock.h: Likewise.
2574 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2575 * sysdeps/alpha/pspinlock.c: New file.
2576 * sysdeps/arm/pspinlock.c: New file.
2577 * sysdeps/i386/pspinlock.c: New file.
2578 * sysdeps/m68k/pspinlock.c: New file.
2579 * sysdeps/mips/pspinlock.c: New file.
2580 * sysdeps/powerpc/pspinlock.c: New file.
2581 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2582 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2583 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2584 back to _pthread_fastlock. Define new pthread_spinlock_t.
2586 2000-05-24 Andreas Jaeger <aj@suse.de>
2588 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2590 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2592 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2594 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2596 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2598 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2600 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2601 object state is represented with additional bits which distinguish
2602 whether that state was set up in the current process, or
2603 in an ancestor process. If that state was set in an ancestor,
2604 it means that a fork happened while thread was executing the init
2605 function. In that case, the state is reset to NEVER.
2606 * mutex.c (__pthread_once_fork_prepare): New function.
2607 (__pthread_once_fork_child): Likewise
2608 (__pthread_once_fork_parent): Likewise
2609 (__pthread_reset_pthread_once): Removed.
2610 * ptfork.c (__fork): Call new handlers in mutex.c.
2611 * internals.h: Declarations of new mutex.c functions added.
2612 Declaration of removed function deleted.
2613 * linuxthreads.texi: Updated documentation about pthread_once
2614 to clarify what happens under cancellation and forking.
2616 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2618 * internals.h: New thread manager request type, REQ_KICK.
2619 * join.c (pthread_exit): main thread now calls exit() instead
2620 of _exit() in order to proper process cleanup.
2621 * manager.c (__pthread_manager): Do not terminate manager
2622 after unblocking main thread; wait for main thread's
2623 REQ_PROCESS_EXIT request instead.
2624 Also, added REQ_KICK case to handle new request; this just does
2626 * manager.c (pthread_exited): Do not terminate manager after
2627 unblocking main thread.
2628 * manager.c (__pthread_manager_sighandler): If the main thread
2629 is waiting for all other threads to die, send a REQ_KICK into
2630 the thread manager request pipe to get it to clean out the threads
2631 and unblock the main thread as soon as possible. This fixes
2632 the 2000 millisecond hang on shutdown bug.
2633 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2634 including the main one call pthread_exit(), or implicitly do so.
2635 * Makefile (tests): Add ex7.
2637 2000-05-05 Andreas Jaeger <aj@suse.de>
2639 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2640 (pthread_getcpuclockid): Correct test for ourselves.
2642 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2644 * internals.h (struct _pthread_descr_struct): Reorganization.
2645 Allocate room for 16 pointers at head of the structure for future
2646 thread-local data handling. Move p_self member in this area.
2647 * manager.c (pthread_handle_create): Adjust use of p_self.
2648 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2649 * pthread.c (__pthread_initial_thread): Adjust initialization.
2650 (__pthread_manager_thread): Likewise.
2652 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2654 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2655 for eventmask larger than 1 word.
2657 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2659 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2660 * pthread.c (__pthread_initialize_minimal): New function. Perform
2661 minimal initialization.
2662 (pthread_initialize): Remove this code here.
2663 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2664 are working around the problem in glibc.
2666 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2668 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2669 now. First gcc must be fixed (more concrete: libgcc).
2671 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2673 * pthread.c: Remove special treatement for interrupt handlers on x86.
2674 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2675 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2677 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2679 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2681 * join.c (pthread_exit): Set p_terminated after reporting the
2682 termination event instead of before.
2684 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2686 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2689 2000-04-18 Andreas Jaeger <aj@suse.de>
2691 * Versions: Use ld instead of ld.so.
2693 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2695 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2696 Remove the typedef keyword.
2698 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2700 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2702 (READ_MEMORY_BARRIER): Define.
2703 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2705 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2708 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2710 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2711 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2712 use thread_handle().
2714 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2716 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2717 if fast mutex is used. Don't initialize `already_canceled' twice.
2718 Correctly test for return value of timedsuspend.
2720 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2721 therefore don't need the _rt versions of the signal handlers.
2723 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2725 * pthread.c (pthread_yield): New function.
2726 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2727 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2728 * internals.h: Declare __pthread_yield.
2730 * pthread.c (pthread_initialize): Avoid a bit more code if
2731 realtime signals are known to exist.
2733 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2734 to dynamically detect RT signals and avoid generating compatibility
2735 functions with old kernel.
2736 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2737 __pthread_restart_new directly.
2738 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2739 __pthread_wait_for_restart_signal directly.
2740 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2741 __pthread_timedsuspend_new directly.
2743 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2745 * condvar.c: Remove all the special code to handle cond_timedwait.
2746 Use timedsuspend instead.
2747 * internals.h: Declare __pthread_timedsuspend_old,
2748 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2749 Remove declaration of __pthread_init_condvar.
2750 * pthread.c: Define __pthread_timedsuspend variable.
2751 (__pthread_timedsuspend_old): New function. Timed suspension
2752 implementation for old Linux kernels.
2753 (__pthread_timedsuspend_new): New function. Timed suspension
2754 implementation for new Linux kernels.
2755 * restart.h (timedsuspend): New function. Call appropriate
2756 suspension function through __pthread_timedsuspend.
2757 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2759 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2761 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2763 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2765 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2766 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2768 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2769 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2771 2000-04-14 Andreas Jaeger <aj@suse.de>
2773 * weaks.c: Fix typo.
2775 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2776 2.2 for linuxthreads.
2778 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2780 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2781 (pthread_getcpuclockid): Fix typo.
2783 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2785 * Makefile (libpthread-routines): Add getcpuclockid.
2786 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2787 * sysdeps/pthread/getcpuclockid.c: New file.
2788 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2789 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2791 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2793 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2795 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2796 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2797 and pthread_spin_unlock.
2798 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2799 into pthread_spinlock_t. Change all uses.
2800 * spinlock.c: Implement pthread_spin_lock.
2801 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2802 alias for real name.
2803 Define pthread_spin_trylock, pthread_spin_init, and
2804 pthread_spin_destroy.
2805 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2806 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2807 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2808 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2809 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2810 and pthread_spin_unlock.
2811 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2812 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2813 * condvar.c: Likewise.
2814 * internals.h: Likewise.
2816 * manager.c: Likewise.
2817 * mutex.c: Likewise.
2818 * pthread.c: Likewise.
2819 * rwlock.c: Likewise.
2820 * semaphore.c: Likewise.
2821 * signals.c: Likewise.
2823 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2825 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2827 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2829 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2830 _POSIX_SHARED_MEMORY_OBJECTS.
2832 2000-04-11 Andreas Jaeger <aj@suse.de>
2834 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2835 (__compare_and_swap): Mark as modifying memory.
2837 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2839 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2841 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2842 Don't have the 'asm' __volatile__.
2844 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2846 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2847 * spinlock.c (__pthread_lock): Add memory barriers.
2848 (__pthread_unlock): Likewise.
2849 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2851 (RELEASE): Not needed anymore.
2852 (__compare_and_swap): Mark asm as modifying memory.
2853 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2855 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2856 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2857 (MEMORY_BARRIER): Define using stbar.
2858 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2860 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2861 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2862 Mike Burrows <m3b@pa.dec.com>.
2864 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2866 * signals.c (sigaction): Fix return value for the case SIG is one
2867 of the signals the implementation uses.
2868 Patch by Xavier.Leroy@inria.fr.
2870 2000-04-01 Andreas Jaeger <aj@suse.de>
2872 * attr.c: Use shlib-compat macros.
2873 * oldsemaphore.c: Likewise.
2874 * pthread.c: Likewise.
2875 * weaks.c: Likewise.
2877 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2879 * semaphore.c (sem_timedwait): New function.
2880 Patch by Carl Mailloux <carlm@oricom.ca>.
2881 * semaphore.h: Declare sem_timedwait.
2882 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2884 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2886 * sysdeps/pthread/Makefile: File removed.
2888 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2890 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2891 * internals.h (__pthread_reset_pthread_once): Add prototype.
2892 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2894 * manager.c (pthread_handle_create): Store ID of new thread before
2897 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2899 * attr.c: Use new macros from shlib-compat.h to define versions.
2900 * oldsemaphore.c: Likewise.
2901 * semaphore.c: Likewise.
2902 * weaks.c: Likewise.
2904 * pthread.c: Update for new SHLIB_COMPAT definition.
2906 * manager.c (__pthread_manager): Unmask debug signal.
2908 * pthread.c (pthread_initialize): Test for address of __dso_handle
2909 being NULL, not value. Use __on_exit, not on_exit.
2910 Patch by Andreas Jaeger <aj@suse.de>.
2912 * pthread.c: Use new macros from shlib-compat.h to define versions.
2914 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2916 * pthread.c (pthread_initialize): Instead of on_exit use
2917 __cxa_atexit if __dso_label is available to allow unloading the
2918 libpthread shared library.
2920 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2922 * condvar.c: Make tests for ownership of mutex less strict.
2924 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2926 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2927 current thread and return error if not.
2928 (pthread_cond_timedwait_relative_old): Likewise.
2929 (pthread_cond_timedwait_relative_new): Likewise.
2931 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2932 (pthread_once_cancelhandler): New function.
2933 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2935 2000-03-14 Andreas Jaeger <aj@suse.de>
2937 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2939 (pthread_handle_sigrestart_rt): Likewise.
2940 * signals.c (pthread_sighandler_rt): Likewise.
2942 2000-03-02 Andreas Jaeger <aj@suse.de>
2944 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2945 Reported by Sean Chen <sean.chen@turbolinux.com>.
2947 2000-02-28 Andreas Jaeger <aj@suse.de>
2949 * rwlock.c: Fix typo.
2951 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2953 * rwlock.c: Define __* variants of the functions and make old names
2955 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2956 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2958 2000-02-25 Andreas Jaeger <aj@suse.de>
2960 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2961 pwrite64, lseek64, open64, and __open64 with version 2.2.
2963 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2965 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2967 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2969 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2970 nanosleep does not work either. Get absolute time inside the
2972 (pthread_cond_timedwait_relative_new): Likewise.
2973 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2975 2000-02-13 Andreas Jaeger <aj@suse.de>
2977 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2978 (pthread_cond_timedwait_relative_old): Likewise.
2980 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2982 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2983 but keep the code around. A bug in the kernel prevent us from
2985 (pthread_cond_timedwait_relative_new): Likewise.
2986 (PR libc/1597 and libc/1598).
2988 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2990 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2991 loop around nanosleep calls instead of around most of the function
2992 (pthread_cond_timedwait_relative_new): Likewise.
2993 body. Got rid of backwards goto and one local.
2995 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2997 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2998 before every nanosleep call to account for time spent in the rest
3000 (pthread_cond_timedwait_relative_new): Likewise.
3001 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
3003 2000-01-29 Ulrich Drepper <drepper@redhat.com>
3005 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
3006 from nanosleep call so that in case we restart we only wait for the
3008 (pthread_cond_timedwait_relative_new): Likewise.
3009 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
3011 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
3013 * manager.c (pthread_allocate_stack): Compute guard page address
3014 correctly. Patch by HJ Lu.
3016 * sysdeps/pthread/pthread.h: Define
3017 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
3019 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
3021 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
3022 preference handling.
3023 (pthread_rwlockattr_setkind_np): Allow
3024 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
3025 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3027 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
3029 * internals.h (pthread_readlock_info): New structure.
3030 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
3031 p_untracked_readlock_count.
3032 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3033 Add initializers for new fields.
3034 * manager.c (pthread_free): Free read/write lock lists.
3035 * queue.h (queue_is_empty): New function.
3036 * rwlock.c: Implement requirements about when readers should get
3038 * sysdeps/pthread/pthread.h
3039 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
3040 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3041 Define this name as well.
3042 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3044 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3046 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3047 Adjust initializers for struct _pthread_descr_struct change.
3048 * internals.h (struct _pthread_descr_struct): Move new elements to
3051 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3053 Redesigned how cancellation unblocks a thread from internal
3054 cancellation points (sem_wait, pthread_join,
3055 pthread_cond_{wait,timedwait}).
3056 Cancellation won't eat a signal in any of these functions
3057 (*required* by POSIX and Single Unix Spec!).
3058 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3059 simultaneous condition variable signal (not required by POSIX
3060 or Single Unix Spec, but nice).
3061 * spinlock.c: __pthread_lock queues back any received restarts
3062 that don't belong to it instead of assuming ownership of lock
3063 upon any restart; fastlock can no longer be acquired by two threads
3065 * restart.h: Restarts queue even on kernels that don't have
3066 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3067 avoiding a rare race condition in pthread_cond_timedwait.
3069 1999-12-31 Andreas Jaeger <aj@suse.de>
3071 * internals.h: Remove duplicate prototype declarations.
3073 * weaks.c: Remove __THROW from prototypes since the file is not
3074 compiled by a C++ compiler.
3075 * internals.h: Likewise.
3077 1999-12-30 Andreas Jaeger <aj@suse.de>
3079 * sysdeps/pthread/pthread.h: Move internal functions to...
3080 * sysdeps/pthread/bits/libc-lock.h: ...here.
3082 1999-12-29 Andreas Jaeger <aj@suse.de>
3084 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3086 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3088 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3091 * manager.c (__pthread_start): Add one more cast to prevent
3092 warning on 64bit machines.
3094 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3096 * manager.c (pthread_handle_create): Set p_pid of new thread
3097 before calling the callback function to report a new thread.
3099 1999-12-20 Andreas Jaeger <aj@suse.de>
3101 * pthread.c (pthread_initialize): Move getrlimit call after
3104 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3106 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3107 pwrite64, lseek64, open64, and __open64.
3108 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3109 pwrite64, lseek64, open64, and __open64.
3111 * manager.c (pthread_allocate_stack): Correct computation of
3112 new_thread_bottom. Correct handling of stack size and when the
3113 rlimit method to guard for stack growth is used.
3114 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3115 minus one pagesize (not two).
3117 1999-12-03 Andreas Jaeger <aj@suse.de>
3119 * Versions: Add __res_state with version GLIBC_2.2.
3121 * errno.c (__res_state): New function to return thread specific
3124 * pthread.c (pthread_initialize): Initialize p_resp.
3125 (__pthread_reset_main_thread): Also set p_resp.
3127 * manager.c (pthread_handle_create): Initialize p_resp.
3129 * internals.h: Add thread specific resolver state.
3130 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3132 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3134 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3136 * sysdeps/i386/i686/pt-machine.h: Likewise.
3137 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3139 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3141 * manager.c (pthread_start_thread_event): Initialize p_pid already
3144 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3146 * internals.h: Add prototype for __pthread_manager_event.
3147 * manager.c (__pthread_manager_event): New function.
3148 (pthread_start_thread_event): Correct computation of self.
3149 Use INIT_THREAD_SELF.
3150 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3151 (__pthread_initialize_manager): Respect event flags also for creation
3152 of the manager thread.
3154 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3156 * pthread.c (__pthread_initialize_manager): Initialize
3157 __pthread_manager_thread.p_tid.
3159 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3161 * internals.h: Declare __pthread_last_event.
3162 * manager.c: Define __pthread_last_event.
3163 (pthread_handle_create): Set __pthread_last_event.
3164 (pthread_exited): Likewise.
3165 * join.c (pthread_exit): Likewise.
3167 * Makefile (libpthread-routines): Add events.
3168 * events.c: New file.
3169 * internals.h: Protect against multiple inclusion.
3170 Include thread_dbP.h header.
3171 (struct _pthread_descr_struct): Add new fields p_report_events and
3173 Declare event reporting functions.
3174 * join.c (pthread_exit): Signal event if this is wanted.
3175 * manager.c (__pthread_threads_events): New variable.
3176 (pthread_handle_create): Take new parameters with event information.
3177 Signal TD_CREATE event if wanted.
3178 (__pthread_manager): Adjust pthread_handle_create call.
3179 (pthread_start_thread_event): New function. Block until manager is
3180 finished and then call pthread_start_thread.
3181 (pthread_exited): Signal TD_REAP event if wanted.
3183 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3185 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3187 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3189 1999-10-25 Andreas Jaeger <aj@suse.de>
3191 * internals.h: Remove K&R compatibility.
3192 * no-tsd.c: Likewise.
3193 * semaphore.h: Likewise.
3194 * signals.c: Likewise.
3195 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3196 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3197 * weaks.c: Likewise.
3199 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3201 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3202 pthread_handle_sigcancel with functions that restore %gs from the
3203 signal context. For each signal handling function, two wrappers
3204 are required, one for a non-RT signal and one for a RT signal.
3205 * signal.c: For i386, add code to restore %gs from the signal
3206 context in pthread_sighandler and pthread_sighandler_rt.
3208 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3210 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3212 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3214 * pthread.c (__pthread_initial_thread): Pass argument to
3215 PTHREAD_START_ARGS_INITIALIZER.
3216 (__pthread_manager_thread): Likewise.
3218 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3219 initialize function.
3221 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3223 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3225 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3227 * internals.h: Correct return types for __libc_read and __libc_write.
3229 1999-10-09 Andreas Jaeger <aj@suse.de>
3231 * internals.h: Add __new_sem_post to get prototype in
3232 manager.c; include semaphore.h for needed types.
3234 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3236 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3237 directly instead of calling sem_post which should not be necessary
3238 but is faster and might help in some case to work around problems.
3239 Patch by khendricks@ivey.uwo.ca [libc/1382].
3241 1999-10-08 Andreas Schwab <schwab@suse.de>
3243 * sysdeps/pthread/Subdirs: New file.
3246 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3248 * Implies: New file.
3249 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3250 * manager.c (pthread_handle_create): Initialize p_startfct.
3251 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3253 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3255 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3256 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3257 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3259 * condvar.c (pthread_cond_timedwait_relative): Never return with
3260 EINTR. Patch by Andreas Schwab.
3262 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3264 * signals.c (sigaction): Correct last patch. Don't select
3265 pthread_sighandler_rt based on the signal number but instead of
3266 the SA_SIGINFO flag.
3268 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3270 * specific.c: Move definitions of struct pthread_key_struct and
3271 destr_function to ...
3272 * internals.h: ...here.
3274 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3276 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3277 this instead of pthread_handle_sigrestart if the signal is an RT
3280 * signals.c: Handle passing through of sighandler arguments also
3281 for real-time signals.
3283 1999-09-03 Andreas Schwab <schwab@suse.de>
3285 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3287 (__vfork): New function, alias vfork.
3288 * Versions: Export __fork, vfork, and __vfork in libpthread.
3290 1999-08-23 Andreas Schwab <schwab@suse.de>
3292 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3293 call to signal handler.
3295 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3297 * pthread.c (__pthread_reset_main_thread): Undo last change.
3298 (__pthread_kill_other_threads_np): Reset signal handlers for the
3299 signals we used in the thread implementation here.
3301 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3303 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3304 for the signals we used in the thread implementation [PR libc/1234].
3306 * Versions: Export __pthread_kill_other_threads_np from libpthread
3309 * signals.c: Pass sigcontext through wrapper to the user function.
3311 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3313 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3314 __libc_internal_tsd_set.
3316 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3318 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3321 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3323 * internals.h: Align _pthread_descr_struct to 32 bytes.
3324 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3327 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3329 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3332 1999-07-09 Cristian Gafton <gafton@redhat.com>
3334 * Makefile (libpthread-routines): Add oldsemaphore routine.
3335 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3336 sem_trywait, and sem_wait to GLIBC_2.1.
3337 * oldsemaphore.c: New file.
3338 * semaphore.c: Add default_symbol_versions for the changed functions.
3339 (__new_sem_init): Rename from sem_init.
3340 (__new_sem_post): Rename from sem_post.
3341 (__new_sem_wait): Rename from sem_wait.
3342 (__new_sem_trywait): Rename from sem_trywait.
3343 (__new_sem_getvalue): Rename from sem_getvalue.
3344 (__new_sem_destroy): Rename from sem_destroy.
3346 1999-06-23 Robey Pointer <robey@netscape.com>
3348 * internals.h: Added p_nextlock entry to separate queueing for a
3349 lock from queueing for a CV (sometimes a thread queues on a lock
3350 to serialize removing itself from a CV queue).
3351 * pthread.c: Added p_nextlock to initializers.
3352 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3354 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3356 * manager.c (pthread_handle_create): Free mmap region after stack
3357 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3359 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3361 * man/pthread_cond_init.man: Correct example.
3362 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3364 * linuxthreads.texi (Condition Variables): Likewise.
3366 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3368 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3369 casx not cas, also successful casx returns the old value in rd
3370 and not the new value.
3372 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3374 * manager.c: If pthread_create() is given a NULL attribute
3375 and the thread manager runs with a realtime policy, set the
3376 scheduling policy of the newly created thread back to SCHED_OTHER.
3377 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3378 initialize the schedpolicy field of new_thread->p_start_args
3379 to that of the calling thread.
3381 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3383 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3384 instruction does not allow memory element to use offset.
3386 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3388 * manager.c (pthread_allocate_stack): Optimize initialization of new
3391 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3392 Don't use initializer since it is all zeroes.
3393 (__libc_once_define): Likewise.
3395 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3397 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3398 doesn't exist anymore.
3399 * sysdeps/i386/Implies: Likewise.
3400 * sysdeps/m68k/Implies: Likewise.
3401 * sysdeps/mips/Implies: Likewise.
3402 * sysdeps/powerpc/Implies: Likewise.
3403 * sysdeps/sparc/sparc32/Implies: Likewise.
3404 * sysdeps/sparc/sparc64/Implies: Likewise.
3406 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3408 * sysdeps/alpha/bits/semaphore.h: Removed.
3409 * sysdeps/powerpc/bits/semaphore.h: Removed.
3410 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3411 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3412 * Makefile (headers): Remove bits/semaphore.h.
3414 * semaphore.h: Define _pthread_descr if necessary.
3415 Don't include limits.h. Define SEM_VALUE_MAX directly.
3417 (sem_t): Protect element names with leading __.
3418 Add declarations for sem_close, sem_open, and sem_unlink.
3419 * semaphore.c: Adjust all functions for new element names.
3420 Define sem_close, sem_open, and sem_unlink.
3421 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3423 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3426 1999-03-16 H.J. Lu <hjl@gnu.org>
3428 * specific.c (pthread_key_delete): Check th->p_terminated to see
3429 if the thread is running.
3431 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3432 Added to GLIBC_2.0 for libc.so.
3434 1999-02-12 H.J. Lu <hjl@gnu.org>
3436 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3437 __libc_allocate_rtsig): Added to GLIBC_2.1.
3439 * internals.h (DEFAULT_SIG_RESTART): Removed.
3440 (DEFAULT_SIG_CANCEL): Removed.
3442 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3443 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3444 (__pthread_sig_restart, __pthread_sig_cancel,
3445 __pthread_sig_debug): Initialized.
3446 (pthread_initialize): Call init_rtsigs () to initialize
3449 1999-02-03 H.J. Lu <hjl@gnu.org>
3451 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3452 Don't restart the thread which sent REQ_DEBUG.
3453 (pthread_start_thread): Check if __pthread_sig_debug > 0
3456 * pthread.c (__pthread_initialize_manager): Suspend ourself
3457 after sending __pthread_sig_debug to gdb instead of
3458 __pthread_sig_cancel.
3460 1999-01-24 H.J. Lu <hjl@gnu.org>
3462 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3463 from mask if __pthread_sig_debug > 0.
3464 (pthread_handle_create): Increment __pthread_handles_num.
3466 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3467 * pthread.c (__pthread_initialize_manager): Likewise.
3469 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3470 instead of __libc_allocate_rtsig (2).
3471 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3472 instead of __pthread_sig_cancel.
3473 (pthread_handle_sigdebug): Fix comments.
3475 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3477 * manager.c (pthread_allocate_stack): Set
3478 __pthread_nonstandard_stacks if user-specified stack is used.
3480 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3482 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3483 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3485 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3487 * pthread.c: Use a third signal __pthread_sig_debug distinct
3488 from __pthread_sig_cancel to notify gdb when a thread is
3490 * manager.c: Likewise.
3491 * internals.h: Likewise.
3492 * signals.c: The implementation of sigwait(s) assumed that
3493 all signals in s have signal handlers already attached.
3494 This is not required by the standard, so make it work
3495 also if some of the signals have no handlers.
3497 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3499 * linuxthreads.texi: Remove pointers from first @node. Move old
3500 @node spec inside comment.
3502 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3504 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3507 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3509 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3510 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3512 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3514 * manager.c: Threads now send __pthread_sig_cancel on termination.
3515 Change clone call and signal masks.
3516 * thread.c (pthread_handle_sigrestart): Remove special code for
3518 (pthread_handle_sigcancel): In manager thread call
3519 __pthread_manager_sighandler.
3520 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3521 * sysdeps/i386/i686/pt-machine.h: Likewise.
3522 Patches by Xavier Leroy.
3524 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3526 * spinlock.c (__pthread_unlock): Don't crash if called for an
3527 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3529 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3532 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3534 * Examples/ex3.c: Wait until all threads are started before
3535 searching for the number to avoid race condition on very fast
3538 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3540 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3541 declaration since it's not needed.
3543 * sysdeps/pthread/pthread.h: Move internal functions to ...
3544 * internals.h: ...here.
3546 1998-12-02 H.J. Lu <hjl@gnu.org>
3548 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3549 SIGRTMIN is defined.
3550 (__pthread_sig_cancel): Likewise.
3552 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3554 * wrapsyscall.c: Include <sys/mman.h> for msync,
3555 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3556 Correct msync declaration.
3558 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3560 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3561 __libc_tsd_set): New macros for new interface.
3562 * no-tsd.c: New file, provide uninitialized defns of
3563 __libc_internal_tsd_get and __libc_internal_tsd_set.
3564 * Makefile (routines): Add no-tsd.
3566 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3568 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3569 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3570 __libc_internal_tsd_set): Move decls to ...
3571 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3574 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3575 __libc_internal_tsd_set): Make these pointers to functions, not
3576 functions; remove #pragma weak decls for them.
3577 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3578 Define static functions and initialized pointers to them.
3580 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3582 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3583 (CFLAGS-specific.c): Likewise.
3584 (CFLAGS-pthread.c): Likewise.
3585 (CFLAGS-ptfork.c): Likewise.
3586 (CFLAGS-cancel.c): Likewise.
3587 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3588 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3590 * mutex.c (pthread_mutex_init): Define as strong symbol.
3591 (pthread_mutex_destroy): Likewise.
3592 (pthread_mutex_trylock): Likewise.
3593 (pthread_mutex_lock): Likewise.
3594 (pthread_mutex_unlock): Likewise.
3595 (pthread_mutexattr_init): Likewise.
3596 (pthread_mutexattr_destroy): Likewise.
3597 (pthread_once): Likewise.
3598 * ptfork.c (pthread_atfork): Likewise.
3599 * specific.c (pthread_key_create): Likewise.
3600 (pthread_setspecific): Likewise.
3601 (pthread_getspecific): Likewise.
3603 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3605 * linuxthreads.texi: Fix punctuation after xref.
3607 1998-11-10 H.J. Lu <hjl@gnu.org>
3609 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3610 if it is defined in <linux/limits.h>.
3612 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3614 * spinlock.h (__pthread_trylock): Define inline.
3615 (__pthread_lock): Add extra parameter to declaration. Declare
3616 using internal_function.
3617 (__pthread_unlock): Declare using internal_function.
3618 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3619 of local variable self. Avoid recomputing self. Define using
3621 (__pthread_trylock): Remove.
3622 (__pthread_unlock): Define using internal_function.
3623 * cancel.c: Adjust for __pthread_lock interface change. Use already
3624 computed self value is possible.
3625 * condvar.c: Likewise.
3627 * manager.c: Likewise.
3628 * mutex.c: Likewise.
3629 * pthread.c: Likewise.
3630 * rwlock.c: Likewise.
3631 * semaphore.c: Likewise.
3632 * signals.c: Likewise.
3634 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3636 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3637 __ to field names of the struct.
3638 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3640 (pthread_attr_t): Likewise.
3641 (pthread_cond_t): Likewise.
3642 (pthread_condattr_t): Likewise.
3643 (pthread_mutex_t): Likewise.
3644 (pthread_mutexattr_t): Likewise.
3645 (pthread_rwlock_t): Likewise.
3646 (pthread_rwlockattr_t): Likewise.
3647 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3648 * cancel.c: Likewise.
3649 * condvar.c: Likewise.
3650 * manager.c: Likewise.
3651 * mutex.c: Likewise.
3652 * pthread.c: Likewise.
3653 * ptlongjmp.c: Likewise.
3654 * rwlock.c: Likewise.
3655 * spinlock.c: Likewise.
3657 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3659 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3662 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3665 * Makefile (libpthread-routines): Add pt-machine.
3666 * pt-machine.c: New file.
3667 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3668 yet defined. Use PT_EI in extern inline definitions.
3669 * sysdeps/arm/pt-machine.h: Likewise.
3670 * sysdeps/i386/pt-machine.h: Likewise.
3671 * sysdeps/i386/i686/pt-machine.h: Likewise.
3672 * sysdeps/m68k/pt-machine.h: Likewise.
3673 * sysdeps/mips/pt-machine.h: Likewise.
3674 * sysdeps/powerpc/pt-machine.h: Likewise.
3675 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3676 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3678 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3680 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3683 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3685 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3687 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3689 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3691 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3694 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3696 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3697 array index overflow.
3699 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3701 * sysdeps/pthread/semaphore.h: New file.
3703 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3705 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3706 _LIBC_TSD_KEY_DL_ERROR.
3708 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3710 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3711 * sysdeps/i386/pt-machine.h: Likewise.
3712 Suggested by Roland McGrath.
3714 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3716 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3717 access thread data with non-constant offsets.
3718 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3721 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3722 THREAD_SETMEM_NC definitions.
3724 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3726 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3728 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3730 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3731 not already defined.
3732 (struct _pthread_descr_struct): Add p_self and p_nr field.
3733 * manager.c (__pthread_handles): Define second element to point
3735 (__pthread_handles_num): Initialize to 2.
3736 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3737 (pthread_start_thread): Likewise.
3738 (pthread_handle_create): Start search for free slot at entry 2.
3739 Initialize new fields p_self and p_nr.
3740 Call __clone with CLONE_PTRACE if available.
3741 (pthread_free): Call FREE_THREAD_SELF if available.
3742 * pthread.c (__pthread_initial_thread): Initialize new fields.
3743 (__pthread_manager_thread): Likewise.
3744 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3746 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3747 elements of the thread descriptor.
3748 * condvar.c: Likewise.
3749 * errno.c: Likewise.
3751 * manager.c: Likewise.
3752 * pthread.c: Likewise.
3753 * ptlongjmp.c: Likewise.
3754 * semaphore.c: Likewise.
3755 * signals.c: Likewise.
3756 * specific.c: Likewise.
3757 * spinlock.c: Likewise.
3759 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3761 * sysdeps/i386/useldt.h: New file.
3762 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3764 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3765 THREAD_SETMEM using __thread_self.
3766 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3768 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3770 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3771 turned out that we didn't need to queue after all.
3773 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3775 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3776 and wastes space; correct types.
3778 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3780 * signals.c (sigaction): Handle NULL argument.
3782 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3784 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3787 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3789 * Makefile (linuxthreads-version): Extract correct number from
3792 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3794 * Banner: Bump version number to 0.8
3795 * FAQ.html: Many updates, in particular w.r.t. debugging.
3796 * manager.c: Support for non-default stacksize for
3797 LinuxThreads-allocated stacks;
3798 don't use guard pages for stacks with default size, rely on
3799 rlimit(RLIMIT_STACK) instead (it's cheaper).
3801 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3802 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3803 * condvar.c: Likewise.
3804 * internals.h: Likewise.
3805 * restart.h: Likewise.
3806 * signals.c: Likewise.
3807 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3809 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3811 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3812 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3813 * Versions: Put __pthread_mutexattr_settype under version
3814 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3815 __pthread_mutexattr_gettype.
3817 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3819 * sysdeps/pthread/bits/libc-lock.h: Make
3820 __pthread_mutexattr_settype weak. Don't make
3821 __pthread_mutexattr_setkind_np weak.
3823 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3825 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3826 call can succeed here.
3828 * mutex.c: Define __pthread_mutexattr_settype and make
3829 __pthread_mutexattr_setkind_np an alias.
3830 Likewise for __pthread_mutexattr_gettype.
3832 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3834 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3837 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3839 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3841 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3843 * Examples/ex6.c: Include <unistd.h> for usleep.
3845 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3847 * Examples/ex4.c (main): Use exit, not pthread_exit.
3849 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3851 * Versions: Add __pthread_mutexattr_gettype and
3852 __pthread_mutexattr_settype.
3853 * lockfile.c: Use __pthread_mutexattr_settype instead of
3854 __pthread_mutexattr_setkind_np.
3855 * mutex.c: Define __pthread_mutexattr_gettype and
3856 __pthread_mutexattr_settype.
3858 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3859 __pthread_mutexattr_settype.
3860 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3861 Use __pthread_mutexattr_settype.
3863 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3865 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3866 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3867 pthread_mutexattr_settype.
3868 * sysdeps/pthread/pthread.h: Declare these functions.
3869 Move pthread_sigmask and pthread_kill declaration in separate header.
3870 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3872 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3874 * Makefile: Add rules to compile and run tests.
3875 * Examples/ex1.c: Little changes to fix warnings.
3876 * Examples/ex2.c: Likewise.
3877 * Examples/ex3.c: Likewise.
3878 * Examples/ex4.c: Likewise.
3879 * Examples/ex5.c: Likewise.
3880 * Examples/ex6.c: New file.
3882 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3884 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3886 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3888 * attr.c: Include <string.h>.
3890 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3892 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3893 * internals.h: Include limits.h.
3894 * manager.c: Use memcpy to copy sched_param.
3895 * ptfork.c: Include errno.h.
3896 * pthread.c: Likewise.
3897 * semaphore.c: Likewise.
3898 * specific.c: Likewise.
3899 * spinlock.h: Likewise.
3900 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3901 type definition to ...
3902 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3904 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3906 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3908 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3909 as macros as demanded in POSIX.1, Annex C.
3911 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3913 * internals.h (struct pthread_request): For free use pthread_t
3914 instead of pthread_descr.
3915 * join.c (pthread_join): Pass thread_id, not th to manager.
3916 (pthread_detach): Likewise.
3917 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3918 (pthread_exited): Remove detached queue code.
3919 (pthread_handle_free): Expect thread ID parameter and use it to
3920 validate the thread decsriptor. Don't use detached queue.
3921 Patches by Xavier Leroy.
3923 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3925 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3926 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3927 __pthread_atfork, __pthread_key_create, __pthread_once.
3928 * internals.h: Doc fix.
3929 * pthread.c (__pthread_initialize): Define again.
3931 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3933 * manager.c (pthread_exited): If thread is not detached put it on
3935 (pthread_handle_free): If thread is not on list with living threads
3936 search on list with detached threads.
3938 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3939 for new definition of pthread_rwlock_t.
3941 * spinlock.c: Correct test whether to compile
3942 __pthread_compare_and_swap or not.
3944 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3946 * attr.c: Finish user stack support. Change locking code to be safe
3947 in situations with different priorities.
3948 * cancel.c: Likewise.
3949 * condvar.c: Likewise.
3950 * internals.h: Likewise.
3952 * manager.c: Likewise.
3953 * mutex.c: Likewise.
3954 * pthread.c: Likewise.
3955 * ptlongjmp.c: Likewise.
3956 * queue.h: Likewise.
3957 * rwlock.c: Likewise.
3958 * semaphore.c: Likewise.
3959 * semaphore.h: Likewise.
3960 * signals.c: Likewise.
3961 * spinlock.c: Likewise.
3962 * spinlock.h: Likewise.
3963 * sysdeps/pthread/pthread.h: Likewise.
3964 Patches by Xavier Leroy.
3966 * sysdeps/i386/i686/pt-machine.h: New file.
3968 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3970 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3971 [sg]et_stackaddr prototypes always available.
3973 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3974 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3976 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3978 * manager.c (pthread_free): Undo patch from 980430.
3979 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3981 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3983 * manager.c: Define __pthread_manager_adjust_prio and use it to
3984 increase priority when needed.
3985 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3986 * mutex.c: Optimize mutexes to wake up only one thread.
3987 * pthread.c: Move PID of manager for global variable in structure
3989 Patches by Xavier Leroy.
3991 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3993 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3995 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3997 * attr.c: Correct typo.
3999 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
4001 * manager.c (pthread_free): Unmap guard before the stack.
4002 Patch by Matthias Urlichs.
4004 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
4006 * manager.c (pthread_free): Detect already free child.
4007 Patch by Xavier Leroy, reported by Matthias Urlichs.
4009 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4011 * Makefile (linuxthreads-version): Renamed back from
4014 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
4016 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
4019 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
4021 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
4022 * internals.h: Add definitions for new spinlock implementation.
4023 * ptlongjmp.c: New file.
4024 * spinlock.c: New file.
4025 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
4026 new function __pthread_acquire to prevent deadlocks with thread
4027 with different priorities.
4028 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
4030 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4032 * manager.c (__pthread_manager): Reduce first argument to select
4033 to include just the needed file descriptor.
4035 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
4037 * manager.c: Fix last patch which caused core dumps.
4039 * pthread.c: Correctly handle missing SIGRTMIN.
4041 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4043 * libpthread.map: Add __libc_internal_tsd_get and
4044 __libc_internal_tsd_set. Add missing cancelable functions. Export
4045 libc internal versions of the cancelable functions.
4047 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
4049 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
4051 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
4053 * attr.c: Implement pthread_attr_[gs]etguardsize,
4054 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
4055 Change pthread_attr_init to have two interfaces.
4056 * internals.h (struct _pthread_descr_struct): Add new fields for
4058 * libpthread.map: Add names in GLIBC_2.1 section.
4059 * manager.c (pthread_handle_create): Implement guardsize and
4061 (pthread_free): Likewise.
4062 * pthread.c (pthread_create): Add new interface for changed
4064 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4065 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
4068 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
4070 * manager.c: Enable resetting of the thread scheduling policy
4071 to SCHED_OTHER when the parent thread has a different one.
4073 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
4075 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4076 _POSIX_ASYNCHRONOUS_IO.
4078 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
4080 * mutex.c: Implement new mutex types.
4082 * internals.h: Include <signal.h>.
4084 * libpthread.map: Add __erno_location and __h_errno_location.
4086 * errno.c: Return pointer to variable actually in use. This might
4087 not be the one in the thread structure.
4088 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
4090 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
4091 of manager thread structure.
4092 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
4094 * pthread.c: Adapt initializer for thread structures.
4095 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
4096 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
4097 current thread to global variables.
4099 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
4101 * rwlock.c: New file.
4102 * Makefile (libpthread-routines): Add rwlock.
4103 * sysdeps/pthread/pthread.h: Define data structures and declare
4105 * libpthread.map: Add new functions.
4107 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4109 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4110 * sysdeps/arm/Implies: likewise.
4111 * README: Document it.
4113 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4115 * signals.c: Remove unneeded initializer for sigwaited, saving a
4118 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4120 * semaphore.c (sem_init): Set sem_spinlock only if available.
4122 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4124 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4125 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4127 * Makefile: Update from LinuxThreads 0.7.
4128 * internals.h. Likewise.
4129 * manager.c: Likewise.
4130 * mutex.c: Likewise.
4131 * pthread.c: Likewise.
4132 * signals.c: Likewise.
4133 * specific.c: Likewise.
4134 * Examples/ex3.c: Likewise.
4136 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4138 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4141 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4143 * wrapsyscall.c: Add socket functions which are also cancelation
4146 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4148 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4149 New functions for fast thread specific data within libc.
4151 * internals.h: Add new array p_libc_specific to struct
4152 _pthread_descr_struct.
4154 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4156 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4158 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4159 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4161 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4163 * internals.h (struct _pthread_descr_struct): Add definitions for
4164 two-level specific key handling.
4165 * manager.c (pthread_handle_create): Initialize specific memory array.
4166 * specific.c: Implement two-level key handling.
4167 * weaks.c: Don't provide dummy key handling.
4168 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4169 Add definition of __libc_key_t.
4170 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4172 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4173 PTHREAD_DESTRUCTOR_ITERATIONS.
4175 * manager.c (pthread_handle_create): Compare mmap result with
4178 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4179 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4181 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4183 sysdeps/sparc -> sysdeps/sparc/sparc32
4184 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4186 * internals.h: Change definition of THREAD_SELF to be an expression,
4187 not a statement that did a return.
4188 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4189 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4190 Follow Solaris and use a "system reserved" register (%g6) to hold
4191 the thread descriptor.
4192 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4194 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4196 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4197 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4198 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4200 * semaphore.c: Include spinlock.h only when needed.
4202 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4203 keys for entries not in use.
4205 * weaks.c: Implement key handling functions for real.
4207 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4209 Initial sparc64-linux support:
4210 * sysdeps/sparc64/Implies: New file.
4211 * sysdeps/sparc64/pt-machine.h: Likewise.
4213 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4215 * semaphore.c: Include spinlock.h at correct place.
4218 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4220 The Great Bit File Move:
4221 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4222 * sysdeps/powerpc/semaphorebits.h: Likewise.
4223 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4224 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4225 * sysdeps/pthread/libc-lock.h: -> bits/
4226 * sysdeps/pthread/stdio-lock.h: Likewise.
4227 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4228 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4229 * semaphore.h: Likewise.
4230 * sysdeps/pthread/pthread.h: Likewise.
4232 * lockfile.c: <foo.h> -> <bits/foo.h>.
4233 * semaphore.h: Likewise.
4235 * Makefile: (headers): foo.h -> bits/foo.h.
4236 * sysdeps/pthread/Makefile: Likewise.
4238 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4240 * semaphore.c (sem_init): Set sem_spinlock only if available.
4242 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4245 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4247 Update from LinuxThreads 0.6.
4249 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4250 and __sched_get_priority_min instead of names without `__'.
4252 * manager.c: Rewrite large parts to implement opaque pthread_t.
4254 * cancel.c: Adapt for opaque pthread_t type.
4255 * condvar.c: Likewise.
4256 * errno.c: Likewise.
4258 * mutex.c: Likewise.
4259 * pthread.c: Likewise.
4260 * signals.c: Likewise.
4261 * specific.c: Likewise.
4262 * restart.h: Likewise.
4263 * queue.h: Likewise.
4264 * Examples/ex3.c: Likewise.
4265 * Examples/ex4.c: Likewise.
4266 * sysdeps/pthread/pthread.h: Likewise.
4268 * pthread.c: Accumulate time for all threads in thread manager.
4270 * semaphore.c: Implement fallback implementation for architectures
4271 sometimes missing compare-exchange operations.
4273 * cancel.c (pthread_cancel): Validate handle argument.
4274 * join.c (pthread_join): Likewise.
4275 (pthread_detach): Likewise.
4276 * signals.c (pthread_kill): Likewise.
4278 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4280 * queue.h (enqueue): Enqueue thread according to priority.
4282 * internals.c (struct pthread_start_args): New struct for passing
4283 args to cloning function.
4284 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4287 * Examples/Makefile (clean): Pass -f option to rm.
4289 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4290 and define TEST_FOR_COMPARE_AND_SWAP.
4291 * sysdeps/i386/i486/pt-machine.h: Removed.
4293 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4296 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4298 * restart.h (suspend): Clear p_signal before suspending.
4299 (suspend_with_cancellation): Likewise.
4300 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4302 * weaks.c: Make __pthread_key_create return 1.
4303 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4304 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4305 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4308 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4310 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4312 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4314 * sysdeps/powerpc/Implies: Added.
4315 * sysdeps/powerpc/pt-machine.h: Added.
4316 * sysdeps/powerpc/semaphorebits.h: Added.
4318 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4320 * pthread.c (__pthread_initial_thread): Correct
4322 (__pthread_manager_thread): Likewise.
4323 Reported by Andreas Jaeger.
4325 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4327 Since sigset_t no longer fits in a register, we can't pass in the
4328 thread's initial mask so easily. Take this opportunity to simplify
4329 the clone implementation by only accepting a single void* argument.
4331 * manager.c (__pthread_manager): Put thread vitals in the thread
4332 struct instead of as arguments through clone.
4333 (pthread_start_thread): Look for them there.
4334 * internals.h (struct _pthread): Add p_initial_fn,
4335 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4336 * pthread.c (pthread_initialize_manager): Revise clone invocation.