1 2002-04-08 Jakub Jelinek <jakub@redhat.com>
3 * manager.c (__pthread_manager_event): Use self instead of arg
5 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
6 _pthread_descr_struct) instead of sizeof (*descr).
8 2002-04-05 Ulrich Drepper <drepper@redhat.com>
10 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
11 * sysdeps/alpha/pt-machine.h: Likewise.
12 * sysdeps/arm/pt-machine.h: Likewise.
13 * sysdeps/cris/pt-machine.h: Likewise.
14 * sysdeps/hppa/pt-machine.h: Likewise.
15 * sysdeps/m68k/pt-machine.h: Likewise.
16 * sysdeps/mips/pt-machine.h: Likewise.
17 * sysdeps/powerpc/pt-machine.h: Likewise.
18 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
19 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
20 * sysdeps/sh/pt-machine.h: Likewise.
21 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
22 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
23 * sysdeps/x86_64/pt-machine.h: Likewise.
25 2002-04-05 Jakub Jelinek <jakub@redhat.com>
27 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
28 instead of pthread_mutexattr_setkind_np.
29 (pthread_mutexattr_gettype): Similarly.
30 * man/pthread_mutexattr_setkind_np.man: New.
31 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
33 2002-04-02 Ulrich Drepper <drepper@redhat.com>
35 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
37 2002-03-22 Jakub Jelinek <jakub@redhat.com>
39 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
41 2002-03-22 Ulrich Drepper <drepper@redhat.com>
43 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
45 2002-03-17 Andreas Jaeger <aj@suse.de>
47 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
49 * sysdeps/alpha/pt-machine.h: Likewise.
50 * sysdeps/arm/pt-machine.h: Likewise.
51 * sysdeps/cris/pt-machine.h: Likewise.
52 * sysdeps/hppa/pt-machine.h: Likewise.
53 * sysdeps/i386/i686/pt-machine.h: Likewise.
54 * sysdeps/ia64/pt-machine.h: Likewise.
55 * sysdeps/m68k/pt-machine.h: Likewise.
56 * sysdeps/mips/pt-machine.h: Likewise.
57 * sysdeps/powerpc/pt-machine.h: Likewise.
58 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
59 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
60 * sysdeps/sh/pt-machine.h: Likewise.
61 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
62 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
63 * sysdeps/x86_64/pt-machine.h: Likewise.
65 * internals.h: Move testandset and __compare_and_swap prototypes
68 2002-03-03 Andreas Jaeger <aj@suse.de>
70 * errno.c: Include resolv.h to avoid warning.
72 2002-02-27 Ulrich Drepper <drepper@redhat.com>
74 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
77 2002-02-23 Ulrich Drepper <drepper@redhat.com>
79 * attr.c (pthread_getattr_np): Don't take thread descriptor size
80 into account if USE_TLS.
81 * manager.c (pthread_handle_create): Free TLS data structures if call
82 failed. Pass correct stack to clone if USE_TLS.
83 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
84 * sysdeps/i386/i686/pt-machine.h: Likewise.
85 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
87 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
88 Add p_stackaddr element #if USE_TLS.
89 * internals.c: Include <tls.h>.
90 * manager.c: Integrate creating and handling of thread descriptor
92 * pthread.c: Likewise.
93 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
94 Include <linuxthreads/descr.h> only if TLS is really used.
96 (TLS_INIT_TP): Initialize self pointer.
98 2002-02-17 Andreas Schwab <schwab@suse.de>
100 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
103 2002-02-12 Ulrich Drepper <drepper@redhat.com>
105 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
106 (INSTALL_DTV): Adjust for being passed pointer to element with length.
108 2002-02-08 Ulrich Drepper <drepper@redhat.com>
110 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
112 2002-02-08 Richard Henderson <rth@redhat.com>
114 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
116 2002-02-08 Ulrich Drepper <drepper@redhat.com>
118 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
121 2002-02-07 H.J. Lu <hjl@gnu.org>
123 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
125 (__pthread_spin_lock): Remove ".set noreorder".
126 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
128 2002-02-05 H.J. Lu <hjl@gnu.org>
130 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
132 * sysdeps/mips/pt-machine.h (testandset): Likewise.
133 (__compare_and_swap): Likewise.
135 2002-02-07 Ulrich Drepper <drepper@redhat.com>
137 * internals.h: Move declarations/definitions of
138 __pthread_initial_thread_bos, __pthread_initial_thread,
139 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
140 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
141 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
143 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
144 Define THREAD_GETMEM accordingly.
146 2002-02-06 Ulrich Drepper <drepper@redhat.com>
148 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
150 * sysdeps/i386/tls.h: Define THREAD_DTV.
152 2002-02-04 Ulrich Drepper <drepper@redhat.com>
154 * internals.h: Move thread descriptor definition...
155 * descr.h.: ...here. New file.
156 * sysdeps/i386/tls.h: New file.
158 2002-02-01 H.J. Lu <hjl@gnu.org>
160 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
161 different register in the delayed slot. Use branch likely.
163 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
164 (__compare_and_swap): Return 0 only when failed to compare. Use
167 2002-02-01 Jakub Jelinek <jakub@redhat.com>
169 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
170 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
171 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
172 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
173 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
174 * sysdeps/sparc/sparc64/Versions: New file.
175 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
177 2002-01-31 Ulrich Drepper <drepper@redhat.com>
179 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
180 in SHARED code, use GL(dl_cpuclock_offset).
182 2002-01-28 Andreas Jaeger <aj@suse.de>
184 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
185 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
187 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
189 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
190 (CURRENT_STACK_FRAME): Remove duplicate definition.
191 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
193 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
195 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
198 2002-01-12 Andreas Schwab <schwab@suse.de>
200 * Makefile (test-srcs): Add tst-signal.
201 (tests): Run tst-signal.
202 (distribute): Add tst-signal.sh.
203 * tst-signal.c, tst-signal.sh: New files.
205 2002-01-14 Andreas Jaeger <aj@suse.de>
207 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
209 2002-01-11 Andreas Schwab <schwab@suse.de>
211 * signals.c (sighandler): Initialize all elements to SIG_ERR.
212 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
214 2002-01-06 Richard Henderson <rth@redhat.com>
216 * sysdeps/alpha/elf/pt-initfini.c: New file.
218 2001-12-29 Andreas Jaeger <aj@suse.de>
220 * Examples/ex9.c: Add noreturn attribute for thread.
221 * Examples/ex10.c: Likewise.
222 * Examples/ex13.c (thread_start): Likewise.
223 * Examples/ex15.c (worker): Likewise.
225 * Examples/ex18.c: Include unistd.h for prototype of sleep.
227 2001-12-14 Ulrich Drepper <drepper@redhat.com>
229 * man/pthread_atfork.man: Adjust description of mutex handling
230 after fork for current implementation.
231 * linuxthreads.texi: Likewise [PR libc/2519].
233 2001-12-13 Andreas Schwab <schwab@suse.de>
235 * specific.c (pthread_key_delete): Don't contact the thread
236 manager if no threads have been created yet.
238 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
240 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
241 qualifier to be safe.
243 2001-11-30 Andreas Schwab <schwab@suse.de>
245 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
246 that self is the manager thread, and initialize the thread
248 (thread_self_stack) [THREAD_SELF]: New function to find self via
250 * manager.c (pthread_handle_create): Don't block cancel signal any
253 2001-11-29 Andreas Jaeger <aj@suse.de>
255 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
257 (INIT_THREAD_SELF): New.
258 (THREAD_GETMEM): New.
260 (THREAD_SETMEM): New.
261 (THREAD_SETMEM_NC): New.
262 (FLOATING_STACKS): Define.
263 (ARCH_STACK_MAX_SIZE): Define.
265 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
267 Bugfix to pthread_key_delete. It was iterating over the thread
268 manager's linked list of threads, behind the thread manager's
269 back causing a race. The fix is to have the manager iterate over
270 the threads instead, using a new request type for doing so.
271 * internals.h (struct pthread_request): New manager request type
273 * manager.c (pthread_for_each_thread): New function.
274 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
275 * specific.c (struct pthread_key_delete_helper_args): New type.
276 (pthread_key_delete_helper): New static function.
277 (pthread_key_delete): Use the new thread manager
278 REQ_FOR_EACH_THREAD function to iterate over the threads and set
279 the delete key slot to a null value in each thread.
280 * Examples/ex18.c: New test.
281 * Makefile (tests): Add ex18.
283 2001-11-22 Wolfram Gloger <wg@malloc.de>
285 * pthread.c (pthread_onexit_process): Don't call free
286 after threads have been asynchronously terminated.
288 * manager.c (pthread_handle_exit): Surround cancellation
289 of threads with __flockfilelist()/__funlockfilelist().
291 2001-11-26 Andreas Schwab <schwab@suse.de>
293 * manager.c (pthread_handle_create): Start the child thread with
294 the cancel signal blocked, so that it does not handle it before
295 the thread register is set up. Save errno from failed clone call.
297 2001-11-15 Ulrich Drepper <drepper@redhat.com>
299 * sysdeps/i386/i686/Implies: Removed.
300 * sysdeps/i386/i686/Versions: New file.
302 2001-10-31 Andreas Jaeger <aj@suse.de>
304 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
306 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
308 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
309 to __linuxthreads_pthread_sizeof_descr to match name used by
310 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
311 linuxthreads_db/td_symbol_list.c.
313 2001-09-22 Andreas Jaeger <aj@suse.de>
315 * linuxthreads/tst-context.c: Avoid compile warning.
317 2001-09-20 Andreas Jaeger <aj@suse.de>
319 * shlib-versions: Add x86-64.
321 2001-09-19 Andreas Jaeger <aj@suse.de>
323 * sysdeps/x86_64/Makefile: New file.
324 * sysdeps/x86_64/pspinlock.c: New file.
325 * sysdeps/x86_64/pt-machine.h: New file.
327 2001-09-12 Jakub Jelinek <jakub@redhat.com>
329 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
331 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
333 2001-09-11 Ulrich Drepper <drepper@redhat.com>
334 Wolfram Gloger <wg@malloc.de>
336 * join.c: Protect all communications from and to manager with
338 * manager.c: Likewise.
339 * pthread.c: Likewise.
340 * smeaphore.c: Likewise.
342 2001-08-29 Ulrich Drepper <drepper@redhat.com>
344 * spinlock.c (__pthread_lock): Top max_count value with
345 MAX_ADAPTIVE_SPIN_COUNT.
346 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
348 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
351 2001-08-27 Jakub Jelinek <jakub@redhat.com>
353 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
354 non-opaque type if __USE_UNIX98.
356 2001-08-26 Jakub Jelinek <jakub@redhat.com>
358 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
359 non-opaque lock types also if _IO_MTSAFE_IO is defined.
361 2001-08-23 Roland McGrath <roland@frob.com>
363 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
364 new first argument, skip the cleanup handler if it's zero.
365 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
366 (__libc_lock_define_initialized_recursive): Use it.
367 * sysdeps/pthread/bits/stdio-lock.h: File removed.
368 The sysdeps/generic file from the main tree now suffices.
370 2001-08-22 Roland McGrath <roland@frob.com>
372 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
373 instead of <pthread.h>.
374 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
375 (_IO_lock_initializer): Add braces.
376 (_IO_lock_lock): Use __libc_lock_lock_recursive.
377 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
379 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
380 (__libc_lock_define_initialized_recursive): Use it.
381 (__libc_lock_init_recursive): Likewise.
382 (__libc_lock_fini_recursive): Likewise.
383 (__libc_lock_lock_recursive): Likewise.
384 (__libc_lock_trylock_recursive): Likewise.
385 (__libc_lock_unlock_recursive): Likewise.
386 (__libc_lock_define_recursive): New macro.
388 2001-08-14 Jakub Jelinek <jakub@redhat.com>
390 * lockfile.c (__pthread_provide_lockfile): New variable.
391 * pthread.c (__pthread_require_lockfile): New variable.
392 * cancel.c (__pthread_require_lockfile): New variable.
394 2001-07-31 Ulrich Drepper <drepper@redhat.com>
396 * tst-context.c (threadfct): Initialize context before calling
399 * Examples/ex17.c: Make sure test thread is around long enough.
401 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
403 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
405 2001-07-24 Ulrich Drepper <drepper@redhat.com>
407 * tst-context.c (main): Print explanation before bailing out
408 because context handling is not supported.
410 2001-07-23 Ulrich Drepper <drepper@redhat.com>
412 * Makefile (tests): Add tst-context.
413 * tst-context.c: New file.
415 * sysdeps/pthread/bits/stdio-lock.h: Define
416 _IO_cleanup_region_start_noarg.
418 2001-07-23 Jakub Jelinek <jakub@redhat.com>
420 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
421 (ARCH_STACK_MAX_SIZE): Define.
422 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
423 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
425 2001-07-19 Jakub Jelinek <jakub@redhat.com>
427 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
429 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
430 (ARCH_STACK_MAX_SIZE): Define.
431 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
432 NEED_SEPARATE_REGISTER_STACK.
434 2001-07-16 Andreas Schwab <schwab@suse.de>
436 * Makefile (before-compile): Don't add $(objpfx)crti.o.
437 (omit-deps): Add crti.
438 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
439 it is filtered out of the link command.
441 2001-07-16 Ulrich Drepper <drepper@redhat.com>
443 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
444 to find the right value for __pthread_initial_thread_bos, it's not
445 used. If not FLOATING_STACKS first run
446 __pthread_init_max_stacksize.
448 2001-06-16 H.J. Lu <hjl@gnu.org>
450 * internals.h: Include <stackinfo.h>.
452 * attr.c: Don't include <stackinfo.h> here.
453 * cancel.c: Likewise.
454 * manager.c: Likewise.
455 * pthread.c: Likewise.
456 * ptlongjmp.c: Likewise.
458 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
460 * attr.c: Make _STACK_GROWS_UP work.
461 * internals.h: Likewise.
462 * manager.c: Likewise.
463 * pthread.c: Likewise.
465 2001-06-15 H.J. Lu <hjl@gnu.org>
467 * pthread.c (__pthread_reset_main_thread): Fix a typo.
469 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
471 * semaphore.h: Use struct _pthread_fastlock as an element of
472 sem_t instead of an identical struct.
473 * rwlock.c: Remove casts.
474 * semaphore.c: Likewise.
476 2001-04-30 Alan Modra <amodra@one.net.au>
478 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
480 2001-05-25 Bruce Mitchener <bruce@cubik.org>
482 * linuxthreads.texi: Spelling corrections.
484 2001-05-25 Ulrich Drepper <drepper@redhat.com>
486 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
487 returning successfully.
488 Patch by Gene Cooperman <gene@ccs.neu.edu>.
490 2001-05-24 Ulrich Drepper <drepper@redhat.com>
492 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
493 serious work try once whether the lock is uncontested.
494 Remove duplicate reading of __status before loop.
495 Change suggested by Hans Boehm <hans_boehm@hp.com>.
497 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
498 (__pthread_alt_trylock): Likewise.
500 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
502 Memory barrier overhaul following line by line inspection.
503 * mutex.c (pthread_once): Missing memory barriers added.
504 * pthread.c (__pthread_wait_for_restart_signal,
505 __pthread_timedsuspend_new, __pthread_restart_new): Added
506 memory barriers ``just in case'' and for documentary value.
507 * spinlock.c (__pthread_release): New inline function for releasing
508 spinlock, to complement __pthread_acquire. Includes memory
509 barrier prior to assignment to spinlock, and __asm __volatile
510 dance to prevent reordering or optimization of the spinlock access.
511 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
512 __pthread_alt_timedlock, __pthread_alt_unlock,
513 __pthread_compare_and_swap): Updated to use new __pthread_release
514 instead of updating spinlock directly.
515 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
516 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
517 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
518 Memory barrier overhaul. Lots of missing memory barriers added,
519 a couple needless ones removed.
520 * spinlock.c (__pthread_compare_and_swap): testandset optimization
521 removed, just calls __pthread_acquire, which has the new read
522 barrier in it before its testandset.
524 2001-05-20 Roland McGrath <roland@frob.com>
526 * Makeconfig: New file, variables used to be in main libc Makeconfig.
528 2001-05-09 Geoff Keating <geoffk@redhat.com>
530 * sysdeps/powerpc/pt-machine.h
531 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
532 (__compare_and_swap): Remove memory barriers.
533 (__compare_and_swap_with_release_semantics): New function.
535 2001-04-24 Andreas Jaeger <aj@suse.de>
537 * wrapsyscall.c: send* and recv* return ssize_t.
539 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
540 mutex instead of double locking it.
541 Reported by Pierre Artaud <partaud@sodatec.com>.
543 2001-04-23 Ulrich Drepper <drepper@redhat.com>
545 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
546 using #ifdef whether the clock is available.
547 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
549 * sysdeps/ia64/Versions: New file.
551 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
552 have to call __gmon_start__ in the libpthread DSO.
553 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
555 * Makefile (libpthread-routines): Add ptclock_gettime and
557 * internals.h: Don't use cpuclock-init.h definitions, use
558 hp-timing.h definitions.
559 * pthread.c: Likewise.
560 * manager.c: Likewise.
561 * ptclock_gettime.c: New file.
562 * ptclock_settime.c: New file.
563 * internals.h: Fix parameter type for __pthread_clock_gettime and
564 __pthread_clock_settime.
566 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
567 * sysdeps/i386/i586/ptclock_settime.c: Removed.
568 * sysdeps/i386/i586/Makefile: Removed.
570 2001-04-22 Ulrich Drepper <drepper@redhat.com>
572 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
573 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
575 2001-04-21 Andreas Jaeger <aj@suse.de>
577 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
578 attribute, remove statements that will never be executed.
579 (thread_func): Remove mutex_unlock call since it's never executed.
580 (thread_func): Fix comment as suggested by Jakub Jelinek.
582 * manager.c (__pthread_manager): Add noreturn
584 (pthread_start_thread): Likewise, remove return statement.
585 (pthread_start_thread_event): Likewise.
586 Add noreturn attribute for pthread_handle_exit.
587 * weaks.c: Add noreturn attribute for pthread_exit.
589 * internals.h: Add __pthread_clock_gettime and
590 __pthread_clock_settime prototypes.
592 2001-04-21 Ulrich Drepper <drepper@redhat.com>
594 * internals.h: Include <cpuclock-init.h>.
595 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
596 CPUCLOCK_VARDEF is defined.
597 * pthread.c (__pthread_initialize_minimal): Initialize
598 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
599 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
600 for new thread to current CPU clock value.
602 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
604 * sysdeps/i386/i586/Makefile: New file.
605 * sysdeps/i386/i586/Versions: New file.
606 * sysdeps/i386/i586/ptclock_gettime.c: New file.
607 * sysdeps/i386/i586/ptclock_settime.c: New file.
608 * sysdeps/i386/i686/Implies: New file.
610 2001-04-18 Jakub Jelinek <jakub@redhat.com>
612 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
613 $generated, not $postclean-generated.
615 2001-04-18 Andreas Jaeger <aj@suse.de>
617 * Makefile (otherlibs): Added.
619 2001-04-18 Jakub Jelinek <jakub@redhat.com>
621 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
623 2001-04-16 Ulrich Drepper <drepper@redhat.com>
625 * signals.c (sigwait): NSIG is no signal number. Block all
626 signals while in signal handler for signals in SET.
627 Patch by Manfred Spraul <manfred@colorfullife.com>.
629 2001-04-12 Ulrich Drepper <drepper@redhat.com>
631 * tst-cancel.c: Disable most tests. Add new test where all
632 cleanup handlers must run.
633 * Makefile (tests): Add tst-cancel again.
635 * cancel.c (__pthread_perform_cleanup): Correct condition for
636 leaving cleanup loop early.
638 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
639 all the files which use CURRENT_STACK_FRAME.
640 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
641 __builtin_frame_address.
642 * sysdeps/i386/i686/pt-machine.h: Likewise.
644 2001-04-11 Ulrich Drepper <drepper@redhat.com>
646 * Makefile (tests): Comment out tst-cancel for now.
648 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
649 temporary file in object directory.
650 * Makefile: Don't allow inlining when compiling tst-cancel.c.
651 Pass $(objpfx) to tst-cancel.
653 2001-04-11 David S. Miller <davem@redhat.com>
655 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
656 up closer to user local variables so that new cleanup heuristics work.
657 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
659 2001-04-11 Ulrich Drepper <drepper@redhat.com>
661 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
663 (_pthread_cleanup_push_defer): Likewise.
665 * tst-cancel.c (main): Fix loop printing cleanup output.
667 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
669 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
671 (__pthread_spin_trylock): Likewise.
672 * sysdeps/sh/pt-machine.h (testandset): Likewise.
674 2001-04-10 Ulrich Drepper <drepper@redhat.com>
676 * join.c (pthread_exit): Move code to new function __pthread_do_exit
677 which takes an extra parameter with the current frame pointer.
678 Call new function with CURRENT_STACK_FRAME.
679 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
680 with the new parameter.
681 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
682 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
683 this parameter as the initial value the cleanup handler records are
684 compared against. No active cleanup handler record must have an
685 address lower than the previous one and the initial record must be
686 above (below on PA) the frame address passed in.
687 (pthread_setcancelstate): Call __pthread_do_exit instead of
689 (pthread_setcanceltype): Likewise.
690 (pthread_testcancel): Likewise.
691 (_pthread_cleanup_pop_restore): Likewise.
692 * condvar.c (pthread_cond_wait): Likewise.
693 (pthread_cond_timedwait_relative): Likewise.
694 * manager.c (pthread_start_thread): Likewise.
695 * oldsemaphore.c (__old_sem_wait): Likewise.
696 * pthread.c (pthread_handle_sigcancel): Likewise.
697 * semaphore.c (__new_sem_wait): Likewise.
698 (sem_timedwait): Likewise.
699 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
700 to limit the cleanup handlers which get run.
701 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
702 for __pthread_perform_cleanup.
704 * Makefile (tests): Add tst-cancel.
705 * tst-cancel.c: New file.
707 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
709 * sysdeps/cris/pt-machine.h: New file.
710 * sysdeps/cris/pspinlock.c: New file.
712 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
714 * shlib-versions: Add case for Linux on CRIS.
716 2001-03-26 Ulrich Drepper <drepper@redhat.com>
718 * attr.c (pthread_getattr_np): Correct computation of stack size
719 for machiens with register stack.
721 * Examples/ex17.c (main): Correct detection of failed mmap call.
723 2001-03-21 Jakub Jelinek <jakub@redhat.com>
725 * pthread.c (__pthread_initialize_manager): Fix a typo.
727 2001-03-21 Jakub Jelinek <jakub@redhat.com>
729 * attr.c (__pthread_attr_setstack): Fix alignment check.
730 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
731 * Makefile (tests): Add ex17 test.
732 * Examples/ex17.c: New test.
734 2001-03-20 Ulrich Drepper <drepper@redhat.com>
736 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
737 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
738 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
740 2001-03-18 Ulrich Drepper <drepper@redhat.com>
742 * Makefile: When generating DSO link with libc_nonshared.a.
744 2001-02-26 Jakub Jelinek <jakub@redhat.com>
746 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
748 2001-02-23 Jakub Jelinek <jakub@redhat.com>
750 * internals.h (__pthread_init_max_stacksize): New prototype.
751 * attr.c (__pthread_attr_setstacksize): Call
752 __pthread_init_max_stacksize if not yet initialized.
753 * pthread.c (__pthread_init_max_stacksize): New function.
754 (__pthread_initialize_manager): Call it.
755 Patch by <dtc@cmucl.cons.org>.
757 2001-03-16 Ulrich Drepper <drepper@redhat.com>
759 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
761 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
763 * shlib-versions: Add rule for Linux on 64 bit S/390.
764 * sysdeps/s390/s390-64/pt-machine.h: New file.
765 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
767 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
769 * sysdeps/s390/pt-machine.h: Move to...
770 * sysdeps/s390/s390-32/pt-machine.h: ...here.
771 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
773 2001-03-15 Ulrich Drepper <drepper@redhat.com>
775 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
776 * attr.c: Implement pthread_getattr_np.
777 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
778 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
779 * manager.c (pthread_handle_create): Initialize p_inheritsched.
781 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
783 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
786 2001-02-20 Hans Boehm <hans_boehm@hp.com>
788 * manager.c (manager_mask): Removed static vesion. Now always local
789 to __pthread_manager().
790 (manager_mask_all): Removed completely.
791 (__pthread_manager): Remove manager_mask_all initialization.
792 (pthread_handle_create): Remove code to set and reset signal mask
793 around __clone2() calls.
795 2001-02-17 Jakub Jelinek <jakub@redhat.com>
797 * spinlock.c (__pthread_lock): Force lock->__status to be read from
798 memory on every spin.
800 2001-02-10 Andreas Jaeger <aj@suse.de>
802 * Makefile (extra-objs): New.
804 2001-02-09 Jakub Jelinek <jakub@redhat.com>
806 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
807 __pthread_initialize_minimal prototype.
809 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
811 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
813 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
815 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
817 2001-02-06 Ulrich Drepper <drepper@redhat.com>
819 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
820 broken code. Patch by Jes Sorensen.
822 2001-02-06 Andreas Jaeger <aj@suse.de>
824 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
826 * internals.h: ...here.
828 2001-02-05 Jes Sorensen <jes@linuxcare.com>
830 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
832 2001-02-02 Ulrich Drepper <drepper@redhat.com>
834 * Versions: Remove __pthread_initialize_minimal.
836 2001-02-01 Ulrich Drepper <drepper@redhat.com>
838 * Makefile: Add rules to build crti.o and make it being used in
839 building libpthread.so.
840 * sysdeps/i386/Makefile: New file.
841 * sysdeps/pthread/pt-initfini.c: New file.
843 * pthread.c: Cleanups.
845 2001-01-28 Andreas Jaeger <aj@suse.de>
847 * oldsemaphore.c (__old_sem_init): Adjust for last change.
848 * sysdeps/pthread/bits/libc-lock.h: Likewise.
849 * spinlock.c: Likewise.
851 2001-01-28 Ulrich Drepper <drepper@redhat.com>
853 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
854 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
855 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
856 * pthread.c: Likewise.
857 * spinlock.h: Likewise.
858 * sysdeps/pthread/pthread.h: Likewise.
860 2001-01-26 Ulrich Drepper <drepper@redhat.com>
862 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
863 as struct __pthread_attr_s.
865 * semaphore.h (sem_t): Cleanup namespace, rename status and
868 2001-01-13 Jakub Jelinek <jakub@redhat.com>
870 * pthread.c (pthread_onexit_process): Clear
871 __pthread_manager_thread_bos after freeing it.
872 * Makefile (tests): Add ex16.
873 * Examples/ex16.c: New file.
875 2001-01-11 Jakub Jelinek <jakub@redhat.com>
877 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
879 * pthread.c (pthread_exit_process): Rename to...
880 (pthread_onexit_process): ...this.
881 (pthread_atexit_process, pthread_atexit_retcode): New.
882 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
883 and only if HAVE_Z_NODELETE is not defined.
884 (__pthread_initialize_manager): Register pthread_atexit_retcode
887 2001-01-11 Ulrich Drepper <drepper@redhat.com>
889 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
891 2001-01-11 Jakub Jelinek <jakub@redhat.com>
893 * Makefile (tests): Add ex15.
894 * Examples/ex15.c: New test.
896 2001-01-08 Ulrich Drepper <drepper@redhat.com>
898 * pthread.c (pthread_exit_process): Free memory allocated for
901 2000-12-31 Ulrich Drepper <drepper@redhat.com>
903 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
904 (pthread_free): Always unmap the stack. It's safe now that we don't
905 use MAP_FIXED to allocate stacks.
907 2000-12-31 Ulrich Drepper <drepper@redhat.com>
909 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
911 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
913 2000-11-15 Wolfram Gloger <wg@malloc.de>
915 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
916 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
918 2000-12-27 Andreas Jaeger <aj@suse.de>
920 * Examples/ex13.c: Make local functions static.
921 * ecmutex.c: Likewise.
922 * joinrace.c: Likewise.
923 * Examples/ex14.c: Likewise.
925 * Examples/ex2.c: Make local functions static; reformat.
926 * Examples/ex1.c: Likewise.
927 * Examples/ex4.c: Likewise.
928 * Examples/ex5.c: Likewise.
929 * Examples/ex7.c: Likewise.
931 * oldsemaphore.c: Add prototypes to shut up GCC.
932 * pt-machine.c: Likewise.
934 * weaks.c: Add prototype for pthread_exit.
936 * internals.h: Add some prototypes, format prototypes and add
938 Move __libc_waitpid prototype to include/sys/wait.h.
940 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
942 * specific.c: Likewise.
943 * ptfork.c: Likewise.
945 * lockfile.c: Include internals.h to get prototypes.
946 * events.c: Likewise.
947 * sysdeps/alpha/pspinlock.c: Likewise.
948 * sysdeps/arm/pspinlock.c: Likewise.
949 * sysdeps/hppa/pspinlock.c: Likewise.
950 * sysdeps/i386/pspinlock.c: Likewise.
951 * sysdeps/ia64/pspinlock.c: Likewise.
952 * sysdeps/m68k/pspinlock.c: Likewise.
953 * sysdeps/mips/pspinlock.c: Likewise.
954 * sysdeps/powerpc/pspinlock.c: Likewise.
955 * sysdeps/s390/pspinlock.c: Likewise.
956 * sysdeps/sh/pspinlock.c: Likewise.
957 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
958 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
959 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
961 2000-12-27 Ulrich Drepper <drepper@redhat.com>
963 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
964 (__pthread_attr_getstack): Return correct address.
965 Add warnings for using pthread_attr_getstackaddr and
966 pthread_attr_setstackaddr.
968 2000-12-26 Ulrich Drepper <drepper@redhat.com>
970 * Examples/ex6.c (test_thread): Make static.
971 * Examples/ex12.c (test_thread): Make static and add noreturn
974 2000-12-18 Jes Sorensen <jes@linuxcare.com>
976 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
977 and compare_and_swap_with_release_semantics returns int not long.
979 2000-12-17 Andreas Jaeger <aj@suse.de>
981 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
983 * sysdeps/arm/pt-machine.h (testandset): Likewise.
984 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
985 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
986 * sysdeps/sh/pt-machine.h (testandset): Likewise.
987 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
988 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
990 2000-12-17 Ulrich Drepper <drepper@redhat.com>
992 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
993 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
995 2000-12-17 Andreas Jaeger <aj@suse.de>
997 * internals.h: Add prototypes for testandset and
998 __compare_and_swap to shut up gcc warnings.
1000 2000-12-06 Wolfram Gloger <wg@malloc.de>
1002 * join.c (pthread_detach): Allow case where the thread has already
1005 2000-12-05 Andreas Jaeger <aj@suse.de>
1007 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1008 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1009 (__compare_and_swap): Likewise.
1010 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1012 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1014 * Examples/ex3.c (main): Cast int to long before casting to void *.
1015 (search): Cast void * to long, not int.
1016 * Examples/ex8.c (main, thread): Similarly.
1017 * Examples/ex11.c (main): Similarly.
1018 * Examples/ex14.c (worker, do_test): Similarly.
1019 * ecmutex.c (worker, do_test): Similarly.
1020 (nlocks): Cast to int.
1022 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1024 * linuxthreads.texi: Add documentation for pthreads attributes
1025 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1026 patch. Document pthread_[sg]etconcurrency(). Mark
1027 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1029 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1031 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1033 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1034 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1036 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1038 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1039 not doing it right now.
1040 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1042 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1044 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1047 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1049 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1050 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1052 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1053 discussing mutexes. (As per the Unix98 name for the API.)
1054 Changes documentation for pthread_mutexattr_setkind_np() and
1055 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1056 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1057 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1058 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1059 Begins to introduce discussion of the ``timed'' mutex type. This
1060 discussion is currently incomplete.
1061 Patch by Bruce Mitchener <bruce@cubik.org>.
1063 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1064 Yutaka Niibe <gniibe@chroot.org>
1066 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1067 has restrictions, use register.
1069 2000-10-23 Andreas Schwab <schwab@suse.de>
1071 * Examples/ex14.c (TIMEOUT): Override default timeout.
1073 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1075 * specific.c: Protect tsd array modification in thread data
1076 structures by getting the thread lock in pthread_key_delete and
1077 __pthread_destroy_specifics.
1078 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1080 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1082 * sysdeps/pthread/bits/initspin.h: New file.
1083 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1084 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1085 (__pthread_alt_init_lock): Likewise.
1086 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1088 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1090 * oldsemaphore.c (__old_sem_init): Release lock with
1091 LT_SPINLOCK_INIT, not zero.
1092 * spinlock.c (__pthread_unlock): Likewise.
1093 (__pthread_alt_lock): Likewise.
1094 (__pthread_alt_timedlock): Likewise.
1095 (__pthread_alt_unlock): Likewise.
1096 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1097 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1098 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1099 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1101 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1103 * shlib-versions: Add version definitions for hppa-linux.
1105 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1107 * sysdeps/hppa/pspinlock.c: New file.
1108 * sysdeps/hppa/pt-machine.h: New file.
1109 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1111 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1113 * mutex.c (__pthread_mutex_destroy): Correct test of
1114 busy mutex for mutexes using alternate fastlocks.
1115 Patch by dtc@cmucl.cons.org.
1117 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1119 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1121 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1123 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1124 test for owner first.
1125 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1127 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1130 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1132 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1133 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1135 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1136 _POSIX_MONOTONIC_CLOCK.
1138 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1141 2000-09-20 Andreas Jaeger <aj@suse.de>
1143 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1144 "testrtsig.h" conditional.
1146 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1148 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1149 pthread_attr_setstack.
1150 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1151 pthread_attr_setstack.
1152 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1154 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1156 * Examples/ex14.c: New file.
1157 * Makefile (tests): Add ex14.
1159 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1160 mutex. Patch by dtc@cmucl.cons.org.
1162 * ecmutex.c: New file.
1163 * Makefile (tests): Add ecmutex.
1165 2000-09-04 H.J. Lu <hjl@gnu.org>
1167 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1168 instead of roundup to round up to the page size.
1170 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1172 * manager.c (pthread_exited): Correctly report event as TD_REAP
1173 instead of TD_DEATH. Fix comments.
1175 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1177 * spinlock.h (testandset): Add cast to avoid warning.
1178 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1180 2000-09-02 Andreas Jaeger <aj@suse.de>
1182 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1185 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1187 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1188 Fix typo in last patch (_mode -> _flags).
1190 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1191 Provide definition which respects _IO_USER_LOCK flag.
1193 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1195 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1198 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1200 * Makefile: Add rules to build and run unload.
1201 * unload.c: New file.
1203 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1205 * sysdeps/pthread/pthread.h
1206 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1207 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1209 2000-08-24 Andreas Jaeger <aj@suse.de>
1211 * Examples/ex13.c: Include <string.h> for strerror prototype and
1212 <stdlib.h> for abort prototype.
1213 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1214 (thread_start): Remove unused variable err.
1215 (main): Silence GCC warnings.
1217 2000-08-22 Andreas Jaeger <aj@suse.de>
1219 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1221 * Makefile (tests): Add ex13.
1223 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1225 * semaphore.h: Add restrict where required by AGd4.
1226 * sysdeps/pthread/pthread.h: Likewise.
1227 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1229 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1231 * Makefile (tests): Add ex12. Add rule to build it.
1232 * Examples/ex12.c: New file.
1234 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1236 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1237 even though the implementation is not quite complete (but it reports
1238 it). Define _POSIX_MESSAGE_PASSING to -1.
1239 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1241 2000-08-12 Andreas Jaeger <aj@suse.de>
1243 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1245 (__compare_and_swap): Likewise.
1246 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1248 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1250 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1251 p_h_errnop correctly and not to NULL.
1253 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1255 * Banner: Bump version number to 0.9.
1257 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1259 * Makefile (tests): Add tststack. Add rule to build the program.
1260 * tststack.c: New file.
1262 * internals.h: Declare __pthread_max_stacksize.
1263 * pthread.c (__pthread_max_stacksize): New variable.
1264 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1266 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1267 (pthread_allocate_stack): Allow kernel to choose stack address if
1268 FLOATING_STACKS. This also handles variable-sized stacks.
1269 Always allocate stack and guardpage together. Use mprotect to
1270 change guardpage access.
1271 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1272 ARCH_STACK_MAX_SIZE.
1274 * attr.c (__pthread_attr_setstacksize): Also test value against
1277 * manager.c (__pthread_nonstandard_stacks): Define only if
1278 THREAD_SELF is not defined.
1279 (pthread_allocate_stack): Always initialize gardaddr to a correct
1281 (pthread_handle_create): Unmap thread with one call.
1282 (pthread_free): Remove test for initial thread before removing stack.
1283 Unmap stack with one call.
1285 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1286 1 to avoid removing the stack.
1288 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1290 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1291 load of spin lock to prime the cache before the atomic compare and
1292 exchange operation (cmpxchg4). This avoids the spinning on the
1293 cmpxchg4 instruction and reduces movement of the cache line back
1294 and forth between the processors (explanation by Asis K. Mallick
1295 from Intel). This basically makes the implementation operate the
1296 same as the Linux kernel implementation.
1298 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1299 * sysdeps/ia64/pspinlock.c: New file.
1301 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1303 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1304 * spinlock.h: ...here. Remove locking.
1305 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1307 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1308 (rwlock_rd_extricate_func): Don't determine self, let
1309 __pthread_lock do it.
1310 (rwlock_wr_extricate_func): Likewise.
1311 (rwlock_have_already): Optimize *pself handling a bit.
1313 * mutex.c: Use __builtin_expect.
1314 * pthread.c: Likewise.
1316 2000-08-02 Andreas Jaeger <aj@suse.de>
1318 * sysdeps/s390/pspinlock.c: New file.
1319 * sysdeps/s390/pt-machine.h: New file.
1320 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1322 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1324 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1326 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1328 2000-07-26 Andreas Jaeger <aj@suse.de>
1330 * pthread.c: Initialize p_sem_avail.
1332 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1334 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1335 * semaphore.c: Handle spurious wakeups.
1337 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1338 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1340 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1341 (__pthread_wait_for_restart): Likewise.
1343 * condvar.c (pthread_cond_wait): Also check whether thread is
1344 cancelable before aborting loop.
1345 (pthread_cond_timedwait): Likewise.
1347 * signals.c (pthread_sighandler): Remove special code to restrore
1349 (pthread_sighandler_t): Likewise.
1351 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1353 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1354 * pthread.c: Include <resolv.h>.
1355 (_res): Undefine. Add extern declaration.
1357 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1359 * pthread.c (__pthread_initial_thread): Update initializer.
1360 (__pthread_manager_thread): Likewise.
1361 (pthread_initialize): Move setrlimit call to...
1362 (__pthread_initialize_manager): ...here.
1363 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1365 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1366 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1368 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1370 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1371 __compare_and_swap to define testandset.
1372 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1373 Define IMPLEMENT_TAS_WITH_CAS.
1375 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1377 * Makefile: Pass -z nodelete to linker for libpthread.so
1378 generation if it understand this option.
1380 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1382 * manager.c (pthread_handle_create): Remove initialization of
1383 new_thread->p_res._sock.
1385 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1387 Bugfixes to the variant of the code for machines with no compare
1390 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1391 node was not being properly enqueued, due to failing to update
1392 the lock->__status field.
1394 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1395 being set inappropriately, causing the suspend function to be called
1396 with a null self pointer and crash.
1398 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1400 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1401 compare&swap is available.
1403 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1406 * pthread.c (pthread_initialize): Don't use sysconf to determine
1407 whether the machine has more than one processor.
1409 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1410 removed thread_self calls.
1412 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1414 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1415 __compare_and_swap to compare_and_swap in code which assumes
1416 compare swap is available.
1418 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1420 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1421 bug whereby thr field of waitnode structure would not be correctly
1422 set unless a null self pointer is passed to the functions.
1423 Eliminated redundant calls to thread_self().
1425 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1427 * pthread.c (__pthread_initialize_manager): Lock
1428 __pthread_manager_thread.p_lock before calling clone.
1430 2000-05-05 H.J. Lu <hjl@gnu.org>
1432 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1433 have acquire semantics.
1434 (__compare_and_swap_with_release_semantics): New inline
1436 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1438 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1440 * manager.c: Fix the problem with signals at startup.
1441 Change the way that thread stacks are allocated on IA64.
1442 Clean up some of the guard page allocation stuff.
1444 1999-12-19 H.J. Lu <hjl@gnu.org>
1446 * internals.h (page_roundup): New.
1447 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1449 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1450 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1453 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1455 * manager.c (pthread_allocate_stack): Unmap the stack top
1456 if failed to map the stack bottom.
1458 (pthread_free): Fix the guard page.
1460 * pthread.c (pthread_initialize): Set rlimit correctly for
1461 NEED_SEPARATE_REGISTER_STACK.
1463 1999-12-16 H.J. Lu <hjl@gnu.org>
1465 * pthread.c (__pthread_initialize_manager): Pass
1466 __pthread_manager_thread_bos instead of
1467 __pthread_manager_thread_tos to __clone2.
1469 1999-12-16 H.J. Lu <hjl@gnu.org>
1471 * manager.c (pthread_allocate_stack): Correct the calculation
1472 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1475 1999-12-13 H.J. Lu <hjl@gnu.org>
1477 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1478 bit after setting ar.ccv.
1480 1999-12-12 H.J. Lu <hjl@gnu.org>
1482 * manager.c (pthread_allocate_stack): Make the starting
1483 address of the stack bottom page aligned. FIXME: it may
1484 need changes in other places.
1485 (pthread_handle_create): Likewise.
1487 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1489 * manager.c (pthread_allocate_stack): Handle
1490 NEED_SEPARATE_REGISTER_STACK.
1491 (pthread_handle_create): Likewise.
1492 * pthread.c (__pthread_initialize_manager): Likewise.
1494 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1496 1999-12-02 H.J. Lu <hjl@gnu.org>
1498 * sysdeps/ia64/pt-machine.h: New.
1500 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1502 * wrapsyscall.c: Mark non-__ protected names as weak.
1505 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1507 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1509 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1511 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1512 Add tests also to new alternative spinlock implementation.
1513 * spinlock.h: Likewise.
1514 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1516 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1518 * Version: Export __sigaction.
1519 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1521 * pthread.c: Use __libc_sigaction instead of __sigaction.
1523 * condvar.c: Implement pthread_condattr_getpshared and
1524 pthread_condattr_setpshared.
1525 * mutex.c: Implement pthread_mutexattr_getpshared and
1526 pthread_mutexattr_setpshared.
1527 * Versions: Export new functions.
1528 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1530 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1531 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1534 2000-07-04 Greg McGary <greg@mcgary.org>
1536 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1537 pragmas. Include bp-sym.h only if _LIBC.
1539 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1541 * spinlock.c (__pthread_unlock): Properly place write barrier.
1542 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1544 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1546 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1547 faster on SMP systems. No more emulation of compare&swap for adaptive
1549 * spinlock.h: Likewise.
1550 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1551 Replace fast with adaptive mutex.
1552 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1553 * condvar.c: Likewise.
1554 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1555 * internals.h: Declare __pthread_smp_kernel.
1556 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1557 _pthread_fastlock structure.
1558 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1560 * pthread.c: Remove initialization to zero from global variables.
1562 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1564 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1566 2000-06-28 Greg McGary <greg@mcgary.org>
1568 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1569 pthread functions that have pointers in their return+arg signatures.
1571 2000-06-27 Greg McGary <greg@mcgary.org>
1573 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1574 extern declarations of pthread functions that have pointers in
1575 their return+arg signatures.
1577 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1579 * Makefile (tests): Add ex11. Add rules to build it.
1580 * Examples/ex11.c: New file.
1581 * rwlock.c: Fix complete braindamaged previous try to implement
1584 * spinlock.c: Pretty print.
1586 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1588 * Makefile (tests): Add ex10. Add rules to build it.
1589 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1590 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1591 * condvar.c (pthread_cond_wait): Allow mutex of kind
1592 PTHREAD_MUTEX_TIMED_NP.
1593 (pthread_cond_timedwait_relative): Likewise.
1594 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1595 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1596 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1597 (__pthread_mutex_lock): Use __pthread_alt_lock for
1598 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1599 (__pthread_mutex_timedlock): New function.
1600 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1601 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1602 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1603 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1604 * spinlock.c: Implement alternate fastlocks.
1605 * spinlock.h: Add prototypes.
1606 * Examples/ex10.c: New file.
1607 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1608 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1610 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1611 (__pthread_rwlock_timedrdlock): New function.
1612 (__pthread_rwlock_timedwrlock): New function.
1613 Use laternate fastlock function everywhere.
1615 2000-06-21 Andreas Jaeger <aj@suse.de>
1617 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1620 * join.c: Include <stdlib.h> for exit prototype.
1622 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1624 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1626 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1627 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1629 * Makefile (libpthread-routines): Add barrier.
1630 (tests): Add ex9. Add rule to build ex9.
1631 * Versions: Export barrier functions.
1632 * barrier.c: New file.
1633 * Examples/ex9.c: New file.
1634 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1635 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1636 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1638 2000-06-19 H.J. Lu <hjl@gnu.org>
1640 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1641 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1642 (compare_and_swap_with_release_semantics): New. Default to
1643 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1646 * spinlock.c (__pthread_unlock): Call
1647 compare_and_swap_with_release_semantics () instead of
1648 compare_and_swap ().
1650 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1652 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1654 * sysdeps/pthread/timer_delete.c: Likewise.
1655 * sysdeps/pthread/timer_getoverr.c: Likewise.
1656 * sysdeps/pthread/timer_gettime.c: Likewise.
1657 * sysdeps/pthread/timer_settime.c: Likewise.
1659 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1661 Timer nodes are now reference counted, and can be marked
1662 as deleted. This allows for the safe release of the global mutex
1663 in the middle without losing the timer being operated on.
1665 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1666 member is now an enum with three values, so that an intermediate
1667 state can be represented (deleted but not free for reuse yet).
1668 New refcount member added.
1669 * sysdeps/pthread/timer_routines.c: Likewise.
1671 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1672 timer_valid): New inline functions added.
1674 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1675 restructured, recursive deadlock bug fixed.
1677 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1678 timer_addref to ensure that timer won't be deleted while mutex is not
1679 held. Also uses timer_invalid to perform validation of timer handle.
1680 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1681 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1683 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1685 * shlib-versions: Add entry for SH.
1686 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1688 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1690 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1691 tightened up some critical regions and micro-optimized some list
1694 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1695 Returns int value now to indicate whether timer was queued at head.
1696 * sysdeps/pthread/posix-timer.h: Likewise.
1697 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1698 new return value from __timer_thread_queue_timer to avoid waking
1699 up timer thread unnecessarily.
1701 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1702 inuse flag, because this requires mutex to be held. Callers updated
1703 to do the check when they have the mutex.
1704 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1706 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1707 regions: avoids making system calls while holding timer mutex, and
1708 a few computations were moved outside of the mutex as well.
1709 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1711 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1712 to list_unlink_ip, meaning idempotent. Pointer manipulation
1713 changed to get better better code out of gcc.
1714 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1715 version of list_unlink added here.
1716 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1717 function in all places: idempotent one for timers, non-idempotent
1718 one for thread nodes.
1719 * sysdeps/pthread/timer_settime: Likewise.
1720 * sysdeps/pthread/timer_routines.c: Likewise.
1722 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1724 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1725 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1727 * sysdeps/pthread/Makefile: Remove tests definition.
1729 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1730 Yutaka Niibe <gniibe@chroot.org>
1732 * sysdeps/sh/pspinlock.c: New file.
1733 * sysdeps/sh/pt-machine.h: New file.
1735 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1737 * Makefile (tests): Add joinrace.
1739 * Examples/ex6.c: Test return value of pthread_join.
1741 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1743 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1744 (__pthread_spin_trylock): Implement.
1745 (__pthread_spin_unlock): Implement.
1746 (__pthread_spin_init): Implement.
1747 (__pthread_spin_destroy): Implement.
1749 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1751 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1752 really append the entry.
1754 2000-06-10 Andreas Jaeger <aj@suse.de>
1756 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1758 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1760 * sysdeps/pthread/timer_create.c: Thread matching now done on
1761 clock type as well as thread attributes.
1762 There are individual global signal-delivering threads for
1763 different clock types.
1764 * sysdeps/pthread/posix-timer.h: Likewise.
1765 * sysdeps/pthread/timer_routines.c: Likewise.
1767 * sysdeps/pthread/timer_routines.c: Thread allocation and
1768 deallocation function now remembers to put thread on active
1769 list and remove from active list.
1770 Thus now the feature of binding multiple timers
1771 to a single thread actually works.
1773 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1775 * pthread.c (__pthread_create_2_1): Optimize a bit.
1777 * internals.h (invalid_handle): Also test for p_terminated != 0.
1778 (nonexisting_handle): New function. Same as old invalid_handle.
1779 * join.c (pthread_join): Use nonexisting_handle instead of
1780 invalid_handle to test for acceptable thread handle.
1781 * manager.c (pthread_handle_free): Likewise.
1782 * joinrace.c: New file.
1783 Reported by Permaine Cheung <pcheung@cygnus.com>.
1785 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1787 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1788 Correct handling of matching variable.
1790 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1793 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1794 Be prepared for empty timer list.
1796 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1797 CPUTIME clock ID. Add support for thread clocks.
1799 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1800 subtraction were switched.
1802 * sysdeps/pthread/timer_routines.c (init_module): Use
1803 THREAD_MAXNODES threads.
1805 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1806 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1807 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1808 with sigqueueinfo is this system call is available.
1810 * sysdeps/pthread/timer_create.c (timer_create): Allow
1811 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1813 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1815 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1817 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1819 * sysdeps/pthread/posix-timer.h: New file.
1820 * sysdeps/pthread/timer_create.c: New file.
1821 * sysdeps/pthread/timer_delete.c: New file.
1822 * sysdeps/pthread/timer_getoverr.c: New file.
1823 * sysdeps/pthread/timer_gettime.c: New file.
1824 * sysdeps/pthread/timer_routines.c: New file.
1825 * sysdeps/pthread/timer_settime.c: New file.
1826 * sysdeps/pthread/tst-timer.c: New file.
1828 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1830 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1831 LINK_MAX definitions if necessary.
1833 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1835 Added missing fork time handling of global libio lock.
1837 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1838 not just the individual stream locks. Rewritten to use new
1839 iterator interface provided by libio rather than accessing
1842 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1843 which lock and unlock the stream list using the new interface
1845 * internals.h: Likewise.
1847 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1848 and __funlockfilelist in the parent after the fork.
1849 Child still calls __fresetlockfiles as before.
1851 * linuxthreads.texi: Now explains what happens to streams at
1852 fork time. Also whole new section on forking and thread added.
1853 Definition of pthread_atfork moved out of Miscellaneous Functions
1854 to this new section.
1856 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1858 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1859 Add missing register.
1860 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1862 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1864 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1865 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1866 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1868 2000-05-31 Andreas Jaeger <aj@suse.de>
1870 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1872 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1874 * spinlock.c (__pthread_lock): Remove ASSERT.
1876 * Makefile (tests): Add ex8.
1877 * Examples/ex8.c: New file.
1879 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1881 Bugfix: The pthread_atfork mechanism now takes care of its
1882 own internal mutex at fork time.
1884 * ptfork.c (__fork): Revised so that the mutex is held across
1885 the fork operation and while the handlers are called, and so that
1886 the child resets the mutex.
1888 * linuxthreads.texi: Updated pthread_atfork documentation to make
1889 it clear that fork and pthread_atfork can't be reentered from
1890 atfork handlers, that pthread_atfork and fork are mutually atomic,
1891 and that the handlers are inherited by the child process.
1893 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1895 * Makefile (libpthread-routines): Add pspinlock.
1896 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1897 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1898 * condvar.c: Likewise.
1899 * internals.h: Likewise.
1901 * manager.c: Likewise.
1902 * mutex.c: Likewise.
1903 * pthread.c: Likewise.
1904 * rwlock.c: Likewise.
1905 * semaphore.c: Likewise.
1906 * signals.c: Likewise.
1907 * spinlock.h: Likewise.
1908 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1909 * sysdeps/alpha/pspinlock.c: New file.
1910 * sysdeps/arm/pspinlock.c: New file.
1911 * sysdeps/i386/pspinlock.c: New file.
1912 * sysdeps/m68k/pspinlock.c: New file.
1913 * sysdeps/mips/pspinlock.c: New file.
1914 * sysdeps/powerpc/pspinlock.c: New file.
1915 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1916 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1917 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1918 back to _pthread_fastlock. Define new pthread_spinlock_t.
1920 2000-05-24 Andreas Jaeger <aj@suse.de>
1922 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1924 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1926 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1928 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1930 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1932 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1934 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1935 object state is represented with additional bits which distinguish
1936 whether that state was set up in the current process, or
1937 in an ancestor process. If that state was set in an ancestor,
1938 it means that a fork happened while thread was executing the init
1939 function. In that case, the state is reset to NEVER.
1940 * mutex.c (__pthread_once_fork_prepare): New function.
1941 (__pthread_once_fork_child): Likewise
1942 (__pthread_once_fork_parent): Likewise
1943 (__pthread_reset_pthread_once): Removed.
1944 * ptfork.c (__fork): Call new handlers in mutex.c.
1945 * internals.h: Declarations of new mutex.c functions added.
1946 Declaration of removed function deleted.
1947 * linuxthreads.texi: Updated documentation about pthread_once
1948 to clarify what happens under cancellation and forking.
1950 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1952 * internals.h: New thread manager request type, REQ_KICK.
1953 * join.c (pthread_exit): main thread now calls exit() instead
1954 of _exit() in order to proper process cleanup.
1955 * manager.c (__pthread_manager): Do not terminate manager
1956 after unblocking main thread; wait for main thread's
1957 REQ_PROCESS_EXIT request instead.
1958 Also, added REQ_KICK case to handle new request; this just does
1960 * manager.c (pthread_exited): Do not terminate manager after
1961 unblocking main thread.
1962 * manager.c (__pthread_manager_sighandler): If the main thread
1963 is waiting for all other threads to die, send a REQ_KICK into
1964 the thread manager request pipe to get it to clean out the threads
1965 and unblock the main thread as soon as possible. This fixes
1966 the 2000 millisecond hang on shutdown bug.
1967 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1968 including the main one call pthread_exit(), or implicitly do so.
1969 * Makefile (tests): Add ex7.
1971 2000-05-05 Andreas Jaeger <aj@suse.de>
1973 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1974 (pthread_getcpuclockid): Correct test for ourselves.
1976 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1978 * internals.h (struct _pthread_descr_struct): Reorganization.
1979 Allocate room for 16 pointers at head of the structure for future
1980 thread-local data handling. Move p_self member in this area.
1981 * manager.c (pthread_handle_create): Adjust use of p_self.
1982 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1983 * pthread.c (__pthread_initial_thread): Adjust initialization.
1984 (__pthread_manager_thread): Likewise.
1986 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1988 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1989 for eventmask larger than 1 word.
1991 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1993 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1994 * pthread.c (__pthread_initialize_minimal): New function. Perform
1995 minimal initialization.
1996 (pthread_initialize): Remove this code here.
1997 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1998 are working around the problem in glibc.
2000 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2002 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2003 now. First gcc must be fixed (more concrete: libgcc).
2005 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2007 * pthread.c: Remove special treatement for interrupt handlers on x86.
2008 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2009 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2011 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2013 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2015 * join.c (pthread_exit): Set p_terminated after reporting the
2016 termination event instead of before.
2018 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2020 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2023 2000-04-18 Andreas Jaeger <aj@suse.de>
2025 * Versions: Use ld instead of ld.so.
2027 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2029 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2030 Remove the typedef keyword.
2032 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2034 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2036 (READ_MEMORY_BARRIER): Define.
2037 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2039 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2042 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2044 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2045 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2046 use thread_handle().
2048 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2050 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2051 if fast mutex is used. Don't initialize `already_canceled' twice.
2052 Correctly test for return value of timedsuspend.
2054 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2055 therefore don't need the _rt versions of the signal handlers.
2057 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2059 * pthread.c (pthread_yield): New function.
2060 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2061 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2062 * internals.h: Declare __pthread_yield.
2064 * pthread.c (pthread_initialize): Avoid a bit more code if
2065 realtime signals are known to exist.
2067 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2068 to dynamically detect RT signals and avoid generating compatibility
2069 functions with old kernel.
2070 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2071 __pthread_restart_new directly.
2072 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2073 __pthread_wait_for_restart_signal directly.
2074 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2075 __pthread_timedsuspend_new directly.
2077 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2079 * condvar.c: Remove all the special code to handle cond_timedwait.
2080 Use timedsuspend instead.
2081 * internals.h: Declare __pthread_timedsuspend_old,
2082 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2083 Remove declaration of __pthread_init_condvar.
2084 * pthread.c: Define __pthread_timedsuspend variable.
2085 (__pthread_timedsuspend_old): New function. Timed suspension
2086 implementation for old Linux kernels.
2087 (__pthread_timedsuspend_new): New function. Timed suspension
2088 implementation for new Linux kernels.
2089 * restart.h (timedsuspend): New function. Call appropriate
2090 suspension function through __pthread_timedsuspend.
2091 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2093 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2095 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2097 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2099 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2100 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2102 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2103 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2105 2000-04-14 Andreas Jaeger <aj@suse.de>
2107 * weaks.c: Fix typo.
2109 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2110 2.2 for linuxthreads.
2112 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2114 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2115 (pthread_getcpuclockid): Fix typo.
2117 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2119 * Makefile (libpthread-routines): Add getcpuclockid.
2120 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2121 * sysdeps/pthread/getcpuclockid.c: New file.
2122 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2123 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2125 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2127 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2129 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2130 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2131 and pthread_spin_unlock.
2132 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2133 into pthread_spinlock_t. Change all uses.
2134 * spinlock.c: Implement pthread_spin_lock.
2135 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2136 alias for real name.
2137 Define pthread_spin_trylock, pthread_spin_init, and
2138 pthread_spin_destroy.
2139 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2140 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2141 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2142 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2143 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2144 and pthread_spin_unlock.
2145 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2146 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2147 * condvar.c: Likewise.
2148 * internals.h: Likewise.
2150 * manager.c: Likewise.
2151 * mutex.c: Likewise.
2152 * pthread.c: Likewise.
2153 * rwlock.c: Likewise.
2154 * semaphore.c: Likewise.
2155 * signals.c: Likewise.
2157 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2159 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2161 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2164 _POSIX_SHARED_MEMORY_OBJECTS.
2166 2000-04-11 Andreas Jaeger <aj@suse.de>
2168 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2169 (__compare_and_swap): Mark as modifying memory.
2171 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2173 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2175 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2176 Don't have the 'asm' __volatile__.
2178 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2180 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2181 * spinlock.c (__pthread_lock): Add memory barriers.
2182 (__pthread_unlock): Likewise.
2183 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2185 (RELEASE): Not needed anymore.
2186 (__compare_and_swap): Mark asm as modifying memory.
2187 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2189 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2190 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2191 (MEMORY_BARRIER): Define using stbar.
2192 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2194 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2195 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2196 Mike Burrows <m3b@pa.dec.com>.
2198 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2200 * signals.c (sigaction): Fix return value for the case SIG is one
2201 of the signals the implementation uses.
2202 Patch by Xavier.Leroy@inria.fr.
2204 2000-04-01 Andreas Jaeger <aj@suse.de>
2206 * attr.c: Use shlib-compat macros.
2207 * oldsemaphore.c: Likewise.
2208 * pthread.c: Likewise.
2209 * weaks.c: Likewise.
2211 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2213 * semaphore.c (sem_timedwait): New function.
2214 Patch by Carl Mailloux <carlm@oricom.ca>.
2215 * semaphore.h: Declare sem_timedwait.
2216 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2218 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2220 * sysdeps/pthread/Makefile: File removed.
2222 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2224 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2225 * internals.h (__pthread_reset_pthread_once): Add prototype.
2226 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2228 * manager.c (pthread_handle_create): Store ID of new thread before
2231 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2233 * attr.c: Use new macros from shlib-compat.h to define versions.
2234 * oldsemaphore.c: Likewise.
2235 * semaphore.c: Likewise.
2236 * weaks.c: Likewise.
2238 * pthread.c: Update for new SHLIB_COMPAT definition.
2240 * manager.c (__pthread_manager): Unmask debug signal.
2242 * pthread.c (pthread_initialize): Test for address of __dso_handle
2243 being NULL, not value. Use __on_exit, not on_exit.
2244 Patch by Andreas Jaeger <aj@suse.de>.
2246 * pthread.c: Use new macros from shlib-compat.h to define versions.
2248 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2250 * pthread.c (pthread_initialize): Instead of on_exit use
2251 __cxa_atexit if __dso_label is available to allow unloading the
2252 libpthread shared library.
2254 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2256 * condvar.c: Make tests for ownership of mutex less strict.
2258 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2260 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2261 current thread and return error if not.
2262 (pthread_cond_timedwait_relative_old): Likewise.
2263 (pthread_cond_timedwait_relative_new): Likewise.
2265 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2266 (pthread_once_cancelhandler): New function.
2267 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2269 2000-03-14 Andreas Jaeger <aj@suse.de>
2271 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2273 (pthread_handle_sigrestart_rt): Likewise.
2274 * signals.c (pthread_sighandler_rt): Likewise.
2276 2000-03-02 Andreas Jaeger <aj@suse.de>
2278 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2279 Reported by Sean Chen <sean.chen@turbolinux.com>.
2281 2000-02-28 Andreas Jaeger <aj@suse.de>
2283 * rwlock.c: Fix typo.
2285 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2287 * rwlock.c: Define __* variants of the functions and make old names
2289 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2290 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2292 2000-02-25 Andreas Jaeger <aj@suse.de>
2294 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2295 pwrite64, lseek64, open64, and __open64 with version 2.2.
2297 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2299 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2301 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2303 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2304 nanosleep does not work either. Get absolute time inside the
2306 (pthread_cond_timedwait_relative_new): Likewise.
2307 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2309 2000-02-13 Andreas Jaeger <aj@suse.de>
2311 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2312 (pthread_cond_timedwait_relative_old): Likewise.
2314 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2316 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2317 but keep the code around. A bug in the kernel prevent us from
2319 (pthread_cond_timedwait_relative_new): Likewise.
2320 (PR libc/1597 and libc/1598).
2322 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2324 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2325 loop around nanosleep calls instead of around most of the function
2326 (pthread_cond_timedwait_relative_new): Likewise.
2327 body. Got rid of backwards goto and one local.
2329 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2331 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2332 before every nanosleep call to account for time spent in the rest
2334 (pthread_cond_timedwait_relative_new): Likewise.
2335 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2337 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2339 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2340 from nanosleep call so that in case we restart we only wait for the
2342 (pthread_cond_timedwait_relative_new): Likewise.
2343 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2345 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2347 * manager.c (pthread_allocate_stack): Compute guard page address
2348 correctly. Patch by HJ Lu.
2350 * sysdeps/pthread/pthread.h: Define
2351 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2353 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2355 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2356 preference handling.
2357 (pthread_rwlockattr_setkind_np): Allow
2358 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2359 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2361 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2363 * internals.h (pthread_readlock_info): New structure.
2364 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2365 p_untracked_readlock_count.
2366 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2367 Add initializers for new fields.
2368 * manager.c (pthread_free): Free read/write lock lists.
2369 * queue.h (queue_is_empty): New function.
2370 * rwlock.c: Implement requirements about when readers should get
2372 * sysdeps/pthread/pthread.h
2373 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2374 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2375 Define this name as well.
2376 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2378 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2380 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2381 Adjust initializers for struct _pthread_descr_struct change.
2382 * internals.h (struct _pthread_descr_struct): Move new elements to
2385 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2387 Redesigned how cancellation unblocks a thread from internal
2388 cancellation points (sem_wait, pthread_join,
2389 pthread_cond_{wait,timedwait}).
2390 Cancellation won't eat a signal in any of these functions
2391 (*required* by POSIX and Single Unix Spec!).
2392 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2393 simultaneous condition variable signal (not required by POSIX
2394 or Single Unix Spec, but nice).
2395 * spinlock.c: __pthread_lock queues back any received restarts
2396 that don't belong to it instead of assuming ownership of lock
2397 upon any restart; fastlock can no longer be acquired by two threads
2399 * restart.h: Restarts queue even on kernels that don't have
2400 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2401 avoiding a rare race condition in pthread_cond_timedwait.
2403 1999-12-31 Andreas Jaeger <aj@suse.de>
2405 * internals.h: Remove duplicate prototype declarations.
2407 * weaks.c: Remove __THROW from prototypes since the file is not
2408 compiled by a C++ compiler.
2409 * internals.h: Likewise.
2411 1999-12-30 Andreas Jaeger <aj@suse.de>
2413 * sysdeps/pthread/pthread.h: Move internal functions to...
2414 * sysdeps/pthread/bits/libc-lock.h: ...here.
2416 1999-12-29 Andreas Jaeger <aj@suse.de>
2418 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2420 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2422 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2425 * manager.c (__pthread_start): Add one more cast to prevent
2426 warning on 64bit machines.
2428 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2430 * manager.c (pthread_handle_create): Set p_pid of new thread
2431 before calling the callback function to report a new thread.
2433 1999-12-20 Andreas Jaeger <aj@suse.de>
2435 * pthread.c (pthread_initialize): Move getrlimit call after
2438 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2440 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2441 pwrite64, lseek64, open64, and __open64.
2442 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2443 pwrite64, lseek64, open64, and __open64.
2445 * manager.c (pthread_allocate_stack): Correct computation of
2446 new_thread_bottom. Correct handling of stack size and when the
2447 rlimit method to guard for stack growth is used.
2448 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2449 minus one pagesize (not two).
2451 1999-12-03 Andreas Jaeger <aj@suse.de>
2453 * Versions: Add __res_state with version GLIBC_2.2.
2455 * errno.c (__res_state): New function to return thread specific
2458 * pthread.c (pthread_initialize): Initialize p_resp.
2459 (__pthread_reset_main_thread): Also set p_resp.
2461 * manager.c (pthread_handle_create): Initialize p_resp.
2463 * internals.h: Add thread specific resolver state.
2464 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2466 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2468 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2470 * sysdeps/i386/i686/pt-machine.h: Likewise.
2471 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2473 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2475 * manager.c (pthread_start_thread_event): Initialize p_pid already
2478 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2480 * internals.h: Add prototype for __pthread_manager_event.
2481 * manager.c (__pthread_manager_event): New function.
2482 (pthread_start_thread_event): Correct computation of self.
2483 Use INIT_THREAD_SELF.
2484 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2485 (__pthread_initialize_manager): Respect event flags also for creation
2486 of the manager thread.
2488 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2490 * pthread.c (__pthread_initialize_manager): Initialize
2491 __pthread_manager_thread.p_tid.
2493 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2495 * internals.h: Declare __pthread_last_event.
2496 * manager.c: Define __pthread_last_event.
2497 (pthread_handle_create): Set __pthread_last_event.
2498 (pthread_exited): Likewise.
2499 * join.c (pthread_exit): Likewise.
2501 * Makefile (libpthread-routines): Add events.
2502 * events.c: New file.
2503 * internals.h: Protect against multiple inclusion.
2504 Include thread_dbP.h header.
2505 (struct _pthread_descr_struct): Add new fields p_report_events and
2507 Declare event reporting functions.
2508 * join.c (pthread_exit): Signal event if this is wanted.
2509 * manager.c (__pthread_threads_events): New variable.
2510 (pthread_handle_create): Take new parameters with event information.
2511 Signal TD_CREATE event if wanted.
2512 (__pthread_manager): Adjust pthread_handle_create call.
2513 (pthread_start_thread_event): New function. Block until manager is
2514 finished and then call pthread_start_thread.
2515 (pthread_exited): Signal TD_REAP event if wanted.
2517 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2519 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2521 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2523 1999-10-25 Andreas Jaeger <aj@suse.de>
2525 * internals.h: Remove K&R compatibility.
2526 * no-tsd.c: Likewise.
2527 * semaphore.h: Likewise.
2528 * signals.c: Likewise.
2529 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2530 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2531 * weaks.c: Likewise.
2533 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2535 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2536 pthread_handle_sigcancel with functions that restore %gs from the
2537 signal context. For each signal handling function, two wrappers
2538 are required, one for a non-RT signal and one for a RT signal.
2539 * signal.c: For i386, add code to restore %gs from the signal
2540 context in pthread_sighandler and pthread_sighandler_rt.
2542 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2544 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2546 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2548 * pthread.c (__pthread_initial_thread): Pass argument to
2549 PTHREAD_START_ARGS_INITIALIZER.
2550 (__pthread_manager_thread): Likewise.
2552 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2553 initialize function.
2555 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2557 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2559 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2561 * internals.h: Correct return types for __libc_read and __libc_write.
2563 1999-10-09 Andreas Jaeger <aj@suse.de>
2565 * internals.h: Add __new_sem_post to get prototype in
2566 manager.c; include semaphore.h for needed types.
2568 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2570 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2571 directly instead of calling sem_post which should not be necessary
2572 but is faster and might help in some case to work around problems.
2573 Patch by khendricks@ivey.uwo.ca [libc/1382].
2575 1999-10-08 Andreas Schwab <schwab@suse.de>
2577 * sysdeps/pthread/Subdirs: New file.
2580 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2582 * Implies: New file.
2583 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2584 * manager.c (pthread_handle_create): Initialize p_startfct.
2585 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2587 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2589 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2590 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2591 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2593 * condvar.c (pthread_cond_timedwait_relative): Never return with
2594 EINTR. Patch by Andreas Schwab.
2596 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2598 * signals.c (sigaction): Correct last patch. Don't select
2599 pthread_sighandler_rt based on the signal number but instead of
2600 the SA_SIGINFO flag.
2602 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2604 * specific.c: Move definitions of struct pthread_key_struct and
2605 destr_function to ...
2606 * internals.h: ...here.
2608 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2610 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2611 this instead of pthread_handle_sigrestart if the signal is an RT
2614 * signals.c: Handle passing through of sighandler arguments also
2615 for real-time signals.
2617 1999-09-03 Andreas Schwab <schwab@suse.de>
2619 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2621 (__vfork): New function, alias vfork.
2622 * Versions: Export __fork, vfork, and __vfork in libpthread.
2624 1999-08-23 Andreas Schwab <schwab@suse.de>
2626 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2627 call to signal handler.
2629 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2631 * pthread.c (__pthread_reset_main_thread): Undo last change.
2632 (__pthread_kill_other_threads_np): Reset signal handlers for the
2633 signals we used in the thread implementation here.
2635 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2637 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2638 for the signals we used in the thread implementation [PR libc/1234].
2640 * Versions: Export __pthread_kill_other_threads_np from libpthread
2643 * signals.c: Pass sigcontext through wrapper to the user function.
2645 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2647 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2648 __libc_internal_tsd_set.
2650 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2652 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2655 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2657 * internals.h: Align _pthread_descr_struct to 32 bytes.
2658 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2661 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2663 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2666 1999-07-09 Cristian Gafton <gafton@redhat.com>
2668 * Makefile (libpthread-routines): Add oldsemaphore routine.
2669 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2670 sem_trywait, and sem_wait to GLIBC_2.1.
2671 * oldsemaphore.c: New file.
2672 * semaphore.c: Add default_symbol_versions for the changed functions.
2673 (__new_sem_init): Rename from sem_init.
2674 (__new_sem_post): Rename from sem_post.
2675 (__new_sem_wait): Rename from sem_wait.
2676 (__new_sem_trywait): Rename from sem_trywait.
2677 (__new_sem_getvalue): Rename from sem_getvalue.
2678 (__new_sem_destroy): Rename from sem_destroy.
2680 1999-06-23 Robey Pointer <robey@netscape.com>
2682 * internals.h: Added p_nextlock entry to separate queueing for a
2683 lock from queueing for a CV (sometimes a thread queues on a lock
2684 to serialize removing itself from a CV queue).
2685 * pthread.c: Added p_nextlock to initializers.
2686 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2688 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2690 * manager.c (pthread_handle_create): Free mmap region after stack
2691 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2693 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2695 * man/pthread_cond_init.man: Correct example.
2696 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2698 * linuxthreads.texi (Condition Variables): Likewise.
2700 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2702 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2703 casx not cas, also successful casx returns the old value in rd
2704 and not the new value.
2706 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2708 * manager.c: If pthread_create() is given a NULL attribute
2709 and the thread manager runs with a realtime policy, set the
2710 scheduling policy of the newly created thread back to SCHED_OTHER.
2711 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2712 initialize the schedpolicy field of new_thread->p_start_args
2713 to that of the calling thread.
2715 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2717 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2718 instruction does not allow memory element to use offset.
2720 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2722 * manager.c (pthread_allocate_stack): Optimize initialization of new
2725 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2726 Don't use initializer since it is all zeroes.
2727 (__libc_once_define): Likewise.
2729 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2731 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2732 doesn't exist anymore.
2733 * sysdeps/i386/Implies: Likewise.
2734 * sysdeps/m68k/Implies: Likewise.
2735 * sysdeps/mips/Implies: Likewise.
2736 * sysdeps/powerpc/Implies: Likewise.
2737 * sysdeps/sparc/sparc32/Implies: Likewise.
2738 * sysdeps/sparc/sparc64/Implies: Likewise.
2740 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2742 * sysdeps/alpha/bits/semaphore.h: Removed.
2743 * sysdeps/powerpc/bits/semaphore.h: Removed.
2744 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2745 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2746 * Makefile (headers): Remove bits/semaphore.h.
2748 * semaphore.h: Define _pthread_descr if necessary.
2749 Don't include limits.h. Define SEM_VALUE_MAX directly.
2751 (sem_t): Protect element names with leading __.
2752 Add declarations for sem_close, sem_open, and sem_unlink.
2753 * semaphore.c: Adjust all functions for new element names.
2754 Define sem_close, sem_open, and sem_unlink.
2755 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2757 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2760 1999-03-16 H.J. Lu <hjl@gnu.org>
2762 * specific.c (pthread_key_delete): Check th->p_terminated to see
2763 if the thread is running.
2765 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2766 Added to GLIBC_2.0 for libc.so.
2768 1999-02-12 H.J. Lu <hjl@gnu.org>
2770 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2771 __libc_allocate_rtsig): Added to GLIBC_2.1.
2773 * internals.h (DEFAULT_SIG_RESTART): Removed.
2774 (DEFAULT_SIG_CANCEL): Removed.
2776 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2777 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2778 (__pthread_sig_restart, __pthread_sig_cancel,
2779 __pthread_sig_debug): Initialized.
2780 (pthread_initialize): Call init_rtsigs () to initialize
2783 1999-02-03 H.J. Lu <hjl@gnu.org>
2785 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2786 Don't restart the thread which sent REQ_DEBUG.
2787 (pthread_start_thread): Check if __pthread_sig_debug > 0
2790 * pthread.c (__pthread_initialize_manager): Suspend ourself
2791 after sending __pthread_sig_debug to gdb instead of
2792 __pthread_sig_cancel.
2794 1999-01-24 H.J. Lu <hjl@gnu.org>
2796 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2797 from mask if __pthread_sig_debug > 0.
2798 (pthread_handle_create): Increment __pthread_handles_num.
2800 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2801 * pthread.c (__pthread_initialize_manager): Likewise.
2803 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2804 instead of __libc_allocate_rtsig (2).
2805 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2806 instead of __pthread_sig_cancel.
2807 (pthread_handle_sigdebug): Fix comments.
2809 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2811 * manager.c (pthread_allocate_stack): Set
2812 __pthread_nonstandard_stacks if user-specified stack is used.
2814 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2816 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2817 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2819 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2821 * pthread.c: Use a third signal __pthread_sig_debug distinct
2822 from __pthread_sig_cancel to notify gdb when a thread is
2824 * manager.c: Likewise.
2825 * internals.h: Likewise.
2826 * signals.c: The implementation of sigwait(s) assumed that
2827 all signals in s have signal handlers already attached.
2828 This is not required by the standard, so make it work
2829 also if some of the signals have no handlers.
2831 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2833 * linuxthreads.texi: Remove pointers from first @node. Move old
2834 @node spec inside comment.
2836 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2838 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2841 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2843 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2844 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2846 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2848 * manager.c: Threads now send __pthread_sig_cancel on termination.
2849 Change clone call and signal masks.
2850 * thread.c (pthread_handle_sigrestart): Remove special code for
2852 (pthread_handle_sigcancel): In manager thread call
2853 __pthread_manager_sighandler.
2854 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2855 * sysdeps/i386/i686/pt-machine.h: Likewise.
2856 Patches by Xavier Leroy.
2858 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2860 * spinlock.c (__pthread_unlock): Don't crash if called for an
2861 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2863 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2866 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2868 * Examples/ex3.c: Wait until all threads are started before
2869 searching for the number to avoid race condition on very fast
2872 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2874 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2875 declaration since it's not needed.
2877 * sysdeps/pthread/pthread.h: Move internal functions to ...
2878 * internals.h: ...here.
2880 1998-12-02 H.J. Lu <hjl@gnu.org>
2882 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2883 SIGRTMIN is defined.
2884 (__pthread_sig_cancel): Likewise.
2886 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2888 * wrapsyscall.c: Include <sys/mman.h> for msync,
2889 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2890 Correct msync declaration.
2892 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2894 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2895 __libc_tsd_set): New macros for new interface.
2896 * no-tsd.c: New file, provide uninitialized defns of
2897 __libc_internal_tsd_get and __libc_internal_tsd_set.
2898 * Makefile (routines): Add no-tsd.
2900 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2902 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2903 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2904 __libc_internal_tsd_set): Move decls to ...
2905 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2908 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2909 __libc_internal_tsd_set): Make these pointers to functions, not
2910 functions; remove #pragma weak decls for them.
2911 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2912 Define static functions and initialized pointers to them.
2914 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2916 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2917 (CFLAGS-specific.c): Likewise.
2918 (CFLAGS-pthread.c): Likewise.
2919 (CFLAGS-ptfork.c): Likewise.
2920 (CFLAGS-cancel.c): Likewise.
2921 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2922 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2924 * mutex.c (pthread_mutex_init): Define as strong symbol.
2925 (pthread_mutex_destroy): Likewise.
2926 (pthread_mutex_trylock): Likewise.
2927 (pthread_mutex_lock): Likewise.
2928 (pthread_mutex_unlock): Likewise.
2929 (pthread_mutexattr_init): Likewise.
2930 (pthread_mutexattr_destroy): Likewise.
2931 (pthread_once): Likewise.
2932 * ptfork.c (pthread_atfork): Likewise.
2933 * specific.c (pthread_key_create): Likewise.
2934 (pthread_setspecific): Likewise.
2935 (pthread_getspecific): Likewise.
2937 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2939 * linuxthreads.texi: Fix punctuation after xref.
2941 1998-11-10 H.J. Lu <hjl@gnu.org>
2943 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2944 if it is defined in <linux/limits.h>.
2946 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2948 * spinlock.h (__pthread_trylock): Define inline.
2949 (__pthread_lock): Add extra parameter to declaration. Declare
2950 using internal_function.
2951 (__pthread_unlock): Declare using internal_function.
2952 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2953 of local variable self. Avoid recomputing self. Define using
2955 (__pthread_trylock): Remove.
2956 (__pthread_unlock): Define using internal_function.
2957 * cancel.c: Adjust for __pthread_lock interface change. Use already
2958 computed self value is possible.
2959 * condvar.c: Likewise.
2961 * manager.c: Likewise.
2962 * mutex.c: Likewise.
2963 * pthread.c: Likewise.
2964 * rwlock.c: Likewise.
2965 * semaphore.c: Likewise.
2966 * signals.c: Likewise.
2968 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2970 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2971 __ to field names of the struct.
2972 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2974 (pthread_attr_t): Likewise.
2975 (pthread_cond_t): Likewise.
2976 (pthread_condattr_t): Likewise.
2977 (pthread_mutex_t): Likewise.
2978 (pthread_mutexattr_t): Likewise.
2979 (pthread_rwlock_t): Likewise.
2980 (pthread_rwlockattr_t): Likewise.
2981 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2982 * cancel.c: Likewise.
2983 * condvar.c: Likewise.
2984 * manager.c: Likewise.
2985 * mutex.c: Likewise.
2986 * pthread.c: Likewise.
2987 * ptlongjmp.c: Likewise.
2988 * rwlock.c: Likewise.
2989 * spinlock.c: Likewise.
2991 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2993 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2996 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2999 * Makefile (libpthread-routines): Add pt-machine.
3000 * pt-machine.c: New file.
3001 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3002 yet defined. Use PT_EI in extern inline definitions.
3003 * sysdeps/arm/pt-machine.h: Likewise.
3004 * sysdeps/i386/pt-machine.h: Likewise.
3005 * sysdeps/i386/i686/pt-machine.h: Likewise.
3006 * sysdeps/m68k/pt-machine.h: Likewise.
3007 * sysdeps/mips/pt-machine.h: Likewise.
3008 * sysdeps/powerpc/pt-machine.h: Likewise.
3009 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3010 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3012 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3014 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3017 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3019 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3021 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3023 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3025 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3028 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3030 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3031 array index overflow.
3033 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3035 * sysdeps/pthread/semaphore.h: New file.
3037 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3039 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3040 _LIBC_TSD_KEY_DL_ERROR.
3042 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3044 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3045 * sysdeps/i386/pt-machine.h: Likewise.
3046 Suggested by Roland McGrath.
3048 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3050 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3051 access thread data with non-constant offsets.
3052 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3055 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3056 THREAD_SETMEM_NC definitions.
3058 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3060 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3062 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3064 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3065 not already defined.
3066 (struct _pthread_descr_struct): Add p_self and p_nr field.
3067 * manager.c (__pthread_handles): Define second element to point
3069 (__pthread_handles_num): Initialize to 2.
3070 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3071 (pthread_start_thread): Likewise.
3072 (pthread_handle_create): Start search for free slot at entry 2.
3073 Initialize new fields p_self and p_nr.
3074 Call __clone with CLONE_PTRACE if available.
3075 (pthread_free): Call FREE_THREAD_SELF if available.
3076 * pthread.c (__pthread_initial_thread): Initialize new fields.
3077 (__pthread_manager_thread): Likewise.
3078 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3080 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3081 elements of the thread descriptor.
3082 * condvar.c: Likewise.
3083 * errno.c: Likewise.
3085 * manager.c: Likewise.
3086 * pthread.c: Likewise.
3087 * ptlongjmp.c: Likewise.
3088 * semaphore.c: Likewise.
3089 * signals.c: Likewise.
3090 * specific.c: Likewise.
3091 * spinlock.c: Likewise.
3093 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3095 * sysdeps/i386/useldt.h: New file.
3096 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3098 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3099 THREAD_SETMEM using __thread_self.
3100 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3102 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3104 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3105 turned out that we didn't need to queue after all.
3107 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3109 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3110 and wastes space; correct types.
3112 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3114 * signals.c (sigaction): Handle NULL argument.
3116 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3118 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3121 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3123 * Makefile (linuxthreads-version): Extract correct number from
3126 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3128 * Banner: Bump version number to 0.8
3129 * FAQ.html: Many updates, in particular w.r.t. debugging.
3130 * manager.c: Support for non-default stacksize for
3131 LinuxThreads-allocated stacks;
3132 don't use guard pages for stacks with default size, rely on
3133 rlimit(RLIMIT_STACK) instead (it's cheaper).
3135 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3136 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3137 * condvar.c: Likewise.
3138 * internals.h: Likewise.
3139 * restart.h: Likewise.
3140 * signals.c: Likewise.
3141 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3143 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3145 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3146 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3147 * Versions: Put __pthread_mutexattr_settype under version
3148 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3149 __pthread_mutexattr_gettype.
3151 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3153 * sysdeps/pthread/bits/libc-lock.h: Make
3154 __pthread_mutexattr_settype weak. Don't make
3155 __pthread_mutexattr_setkind_np weak.
3157 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3159 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3160 call can succeed here.
3162 * mutex.c: Define __pthread_mutexattr_settype and make
3163 __pthread_mutexattr_setkind_np an alias.
3164 Likewise for __pthread_mutexattr_gettype.
3166 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3168 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3171 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3173 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3175 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3177 * Examples/ex6.c: Include <unistd.h> for usleep.
3179 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3181 * Examples/ex4.c (main): Use exit, not pthread_exit.
3183 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3185 * Versions: Add __pthread_mutexattr_gettype and
3186 __pthread_mutexattr_settype.
3187 * lockfile.c: Use __pthread_mutexattr_settype instead of
3188 __pthread_mutexattr_setkind_np.
3189 * mutex.c: Define __pthread_mutexattr_gettype and
3190 __pthread_mutexattr_settype.
3192 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3193 __pthread_mutexattr_settype.
3194 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3195 Use __pthread_mutexattr_settype.
3197 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3199 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3200 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3201 pthread_mutexattr_settype.
3202 * sysdeps/pthread/pthread.h: Declare these functions.
3203 Move pthread_sigmask and pthread_kill declaration in separate header.
3204 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3206 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3208 * Makefile: Add rules to compile and run tests.
3209 * Examples/ex1.c: Little changes to fix warnings.
3210 * Examples/ex2.c: Likewise.
3211 * Examples/ex3.c: Likewise.
3212 * Examples/ex4.c: Likewise.
3213 * Examples/ex5.c: Likewise.
3214 * Examples/ex6.c: New file.
3216 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3218 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3220 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3222 * attr.c: Include <string.h>.
3224 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3226 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3227 * internals.h: Include limits.h.
3228 * manager.c: Use memcpy to copy sched_param.
3229 * ptfork.c: Include errno.h.
3230 * pthread.c: Likewise.
3231 * semaphore.c: Likewise.
3232 * specific.c: Likewise.
3233 * spinlock.h: Likewise.
3234 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3235 type definition to ...
3236 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3238 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3240 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3242 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3243 as macros as demanded in POSIX.1, Annex C.
3245 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3247 * internals.h (struct pthread_request): For free use pthread_t
3248 instead of pthread_descr.
3249 * join.c (pthread_join): Pass thread_id, not th to manager.
3250 (pthread_detach): Likewise.
3251 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3252 (pthread_exited): Remove detached queue code.
3253 (pthread_handle_free): Expect thread ID parameter and use it to
3254 validate the thread decsriptor. Don't use detached queue.
3255 Patches by Xavier Leroy.
3257 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3259 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3260 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3261 __pthread_atfork, __pthread_key_create, __pthread_once.
3262 * internals.h: Doc fix.
3263 * pthread.c (__pthread_initialize): Define again.
3265 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3267 * manager.c (pthread_exited): If thread is not detached put it on
3269 (pthread_handle_free): If thread is not on list with living threads
3270 search on list with detached threads.
3272 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3273 for new definition of pthread_rwlock_t.
3275 * spinlock.c: Correct test whether to compile
3276 __pthread_compare_and_swap or not.
3278 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3280 * attr.c: Finish user stack support. Change locking code to be safe
3281 in situations with different priorities.
3282 * cancel.c: Likewise.
3283 * condvar.c: Likewise.
3284 * internals.h: Likewise.
3286 * manager.c: Likewise.
3287 * mutex.c: Likewise.
3288 * pthread.c: Likewise.
3289 * ptlongjmp.c: Likewise.
3290 * queue.h: Likewise.
3291 * rwlock.c: Likewise.
3292 * semaphore.c: Likewise.
3293 * semaphore.h: Likewise.
3294 * signals.c: Likewise.
3295 * spinlock.c: Likewise.
3296 * spinlock.h: Likewise.
3297 * sysdeps/pthread/pthread.h: Likewise.
3298 Patches by Xavier Leroy.
3300 * sysdeps/i386/i686/pt-machine.h: New file.
3302 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3304 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3305 [sg]et_stackaddr prototypes always available.
3307 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3308 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3310 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3312 * manager.c (pthread_free): Undo patch from 980430.
3313 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3315 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3317 * manager.c: Define __pthread_manager_adjust_prio and use it to
3318 increase priority when needed.
3319 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3320 * mutex.c: Optimize mutexes to wake up only one thread.
3321 * pthread.c: Move PID of manager for global variable in structure
3323 Patches by Xavier Leroy.
3325 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3327 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3329 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3331 * attr.c: Correct typo.
3333 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3335 * manager.c (pthread_free): Unmap guard before the stack.
3336 Patch by Matthias Urlichs.
3338 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3340 * manager.c (pthread_free): Detect already free child.
3341 Patch by Xavier Leroy, reported by Matthias Urlichs.
3343 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3345 * Makefile (linuxthreads-version): Renamed back from
3348 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3350 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3353 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3355 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3356 * internals.h: Add definitions for new spinlock implementation.
3357 * ptlongjmp.c: New file.
3358 * spinlock.c: New file.
3359 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3360 new function __pthread_acquire to prevent deadlocks with thread
3361 with different priorities.
3362 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3364 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3366 * manager.c (__pthread_manager): Reduce first argument to select
3367 to include just the needed file descriptor.
3369 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3371 * manager.c: Fix last patch which caused core dumps.
3373 * pthread.c: Correctly handle missing SIGRTMIN.
3375 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3377 * libpthread.map: Add __libc_internal_tsd_get and
3378 __libc_internal_tsd_set. Add missing cancelable functions. Export
3379 libc internal versions of the cancelable functions.
3381 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3383 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3385 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3387 * attr.c: Implement pthread_attr_[gs]etguardsize,
3388 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3389 Change pthread_attr_init to have two interfaces.
3390 * internals.h (struct _pthread_descr_struct): Add new fields for
3392 * libpthread.map: Add names in GLIBC_2.1 section.
3393 * manager.c (pthread_handle_create): Implement guardsize and
3395 (pthread_free): Likewise.
3396 * pthread.c (pthread_create): Add new interface for changed
3398 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3399 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3402 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3404 * manager.c: Enable resetting of the thread scheduling policy
3405 to SCHED_OTHER when the parent thread has a different one.
3407 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3409 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3410 _POSIX_ASYNCHRONOUS_IO.
3412 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3414 * mutex.c: Implement new mutex types.
3416 * internals.h: Include <signal.h>.
3418 * libpthread.map: Add __erno_location and __h_errno_location.
3420 * errno.c: Return pointer to variable actually in use. This might
3421 not be the one in the thread structure.
3422 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3424 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3425 of manager thread structure.
3426 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3428 * pthread.c: Adapt initializer for thread structures.
3429 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3430 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3431 current thread to global variables.
3433 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3435 * rwlock.c: New file.
3436 * Makefile (libpthread-routines): Add rwlock.
3437 * sysdeps/pthread/pthread.h: Define data structures and declare
3439 * libpthread.map: Add new functions.
3441 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3443 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3444 * sysdeps/arm/Implies: likewise.
3445 * README: Document it.
3447 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3449 * signals.c: Remove unneeded initializer for sigwaited, saving a
3452 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3454 * semaphore.c (sem_init): Set sem_spinlock only if available.
3456 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3458 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3459 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3461 * Makefile: Update from LinuxThreads 0.7.
3462 * internals.h. Likewise.
3463 * manager.c: Likewise.
3464 * mutex.c: Likewise.
3465 * pthread.c: Likewise.
3466 * signals.c: Likewise.
3467 * specific.c: Likewise.
3468 * Examples/ex3.c: Likewise.
3470 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3472 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3475 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3477 * wrapsyscall.c: Add socket functions which are also cancelation
3480 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3482 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3483 New functions for fast thread specific data within libc.
3485 * internals.h: Add new array p_libc_specific to struct
3486 _pthread_descr_struct.
3488 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3490 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3492 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3493 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3495 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3497 * internals.h (struct _pthread_descr_struct): Add definitions for
3498 two-level specific key handling.
3499 * manager.c (pthread_handle_create): Initialize specific memory array.
3500 * specific.c: Implement two-level key handling.
3501 * weaks.c: Don't provide dummy key handling.
3502 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3503 Add definition of __libc_key_t.
3504 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3506 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3507 PTHREAD_DESTRUCTOR_ITERATIONS.
3509 * manager.c (pthread_handle_create): Compare mmap result with
3512 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3513 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3515 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3517 sysdeps/sparc -> sysdeps/sparc/sparc32
3518 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3520 * internals.h: Change definition of THREAD_SELF to be an expression,
3521 not a statement that did a return.
3522 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3523 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3524 Follow Solaris and use a "system reserved" register (%g6) to hold
3525 the thread descriptor.
3526 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3528 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3530 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3531 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3532 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3534 * semaphore.c: Include spinlock.h only when needed.
3536 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3537 keys for entries not in use.
3539 * weaks.c: Implement key handling functions for real.
3541 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3543 Initial sparc64-linux support:
3544 * sysdeps/sparc64/Implies: New file.
3545 * sysdeps/sparc64/pt-machine.h: Likewise.
3547 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3549 * semaphore.c: Include spinlock.h at correct place.
3552 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3554 The Great Bit File Move:
3555 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3556 * sysdeps/powerpc/semaphorebits.h: Likewise.
3557 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3558 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3559 * sysdeps/pthread/libc-lock.h: -> bits/
3560 * sysdeps/pthread/stdio-lock.h: Likewise.
3561 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3562 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3563 * semaphore.h: Likewise.
3564 * sysdeps/pthread/pthread.h: Likewise.
3566 * lockfile.c: <foo.h> -> <bits/foo.h>.
3567 * semaphore.h: Likewise.
3569 * Makefile: (headers): foo.h -> bits/foo.h.
3570 * sysdeps/pthread/Makefile: Likewise.
3572 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3574 * semaphore.c (sem_init): Set sem_spinlock only if available.
3576 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3579 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3581 Update from LinuxThreads 0.6.
3583 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3584 and __sched_get_priority_min instead of names without `__'.
3586 * manager.c: Rewrite large parts to implement opaque pthread_t.
3588 * cancel.c: Adapt for opaque pthread_t type.
3589 * condvar.c: Likewise.
3590 * errno.c: Likewise.
3592 * mutex.c: Likewise.
3593 * pthread.c: Likewise.
3594 * signals.c: Likewise.
3595 * specific.c: Likewise.
3596 * restart.h: Likewise.
3597 * queue.h: Likewise.
3598 * Examples/ex3.c: Likewise.
3599 * Examples/ex4.c: Likewise.
3600 * sysdeps/pthread/pthread.h: Likewise.
3602 * pthread.c: Accumulate time for all threads in thread manager.
3604 * semaphore.c: Implement fallback implementation for architectures
3605 sometimes missing compare-exchange operations.
3607 * cancel.c (pthread_cancel): Validate handle argument.
3608 * join.c (pthread_join): Likewise.
3609 (pthread_detach): Likewise.
3610 * signals.c (pthread_kill): Likewise.
3612 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3614 * queue.h (enqueue): Enqueue thread according to priority.
3616 * internals.c (struct pthread_start_args): New struct for passing
3617 args to cloning function.
3618 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3621 * Examples/Makefile (clean): Pass -f option to rm.
3623 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3624 and define TEST_FOR_COMPARE_AND_SWAP.
3625 * sysdeps/i386/i486/pt-machine.h: Removed.
3627 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3630 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3632 * restart.h (suspend): Clear p_signal before suspending.
3633 (suspend_with_cancellation): Likewise.
3634 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3636 * weaks.c: Make __pthread_key_create return 1.
3637 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3638 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3639 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3642 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3644 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3646 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3648 * sysdeps/powerpc/Implies: Added.
3649 * sysdeps/powerpc/pt-machine.h: Added.
3650 * sysdeps/powerpc/semaphorebits.h: Added.
3652 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3654 * pthread.c (__pthread_initial_thread): Correct
3656 (__pthread_manager_thread): Likewise.
3657 Reported by Andreas Jaeger.
3659 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3661 Since sigset_t no longer fits in a register, we can't pass in the
3662 thread's initial mask so easily. Take this opportunity to simplify
3663 the clone implementation by only accepting a single void* argument.
3665 * manager.c (__pthread_manager): Put thread vitals in the thread
3666 struct instead of as arguments through clone.
3667 (pthread_start_thread): Look for them there.
3668 * internals.h (struct _pthread): Add p_initial_fn,
3669 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3670 * pthread.c (pthread_initialize_manager): Revise clone invocation.