1 2002-02-23 Ulrich Drepper <drepper@redhat.com>
3 * attr.c (pthread_getattr_np): Don't take thread descriptor size
4 into account if USE_TLS.
5 * manager.c (pthread_handle_create): Free TLS data structures if call
6 failed. Pass correct stack to clone if USE_TLS.
7 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
8 * sysdeps/i386/i686/pt-machine.h: Likewise.
9 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
11 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
12 Add p_stackaddr element #if USE_TLS.
13 * internals.c: Include <tls.h>.
14 * manager.c: Integrate creating and handling of thread descriptor
16 * pthread.c: Likewise.
17 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
18 Include <linuxthreads/descr.h> only if TLS is really used.
20 (TLS_INIT_TP): Initialize self pointer.
22 2002-02-17 Andreas Schwab <schwab@suse.de>
24 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
27 2002-02-12 Ulrich Drepper <drepper@redhat.com>
29 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
30 (INSTALL_DTV): Adjust for being passed pointer to element with length.
32 2002-02-08 Ulrich Drepper <drepper@redhat.com>
34 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
36 2002-02-08 Richard Henderson <rth@redhat.com>
38 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
40 2002-02-08 Ulrich Drepper <drepper@redhat.com>
42 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
45 2002-02-07 H.J. Lu <hjl@gnu.org>
47 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
49 (__pthread_spin_lock): Remove ".set noreorder".
50 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
52 2002-02-05 H.J. Lu <hjl@gnu.org>
54 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
56 * sysdeps/mips/pt-machine.h (testandset): Likewise.
57 (__compare_and_swap): Likewise.
59 2002-02-07 Ulrich Drepper <drepper@redhat.com>
61 * internals.h: Move declarations/definitions of
62 __pthread_initial_thread_bos, __pthread_initial_thread,
63 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
64 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
65 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
67 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
68 Define THREAD_GETMEM accordingly.
70 2002-02-06 Ulrich Drepper <drepper@redhat.com>
72 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
74 * sysdeps/i386/tls.h: Define THREAD_DTV.
76 2002-02-04 Ulrich Drepper <drepper@redhat.com>
78 * internals.h: Move thread descriptor definition...
79 * descr.h.: ...here. New file.
80 * sysdeps/i386/tls.h: New file.
82 2002-02-01 H.J. Lu <hjl@gnu.org>
84 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
85 different register in the delayed slot. Use branch likely.
87 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
88 (__compare_and_swap): Return 0 only when failed to compare. Use
91 2002-02-01 Jakub Jelinek <jakub@redhat.com>
93 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
94 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
95 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
96 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
97 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
98 * sysdeps/sparc/sparc64/Versions: New file.
99 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
101 2002-01-31 Ulrich Drepper <drepper@redhat.com>
103 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
104 in SHARED code, use GL(dl_cpuclock_offset).
106 2002-01-28 Andreas Jaeger <aj@suse.de>
108 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
109 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
111 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
113 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
114 (CURRENT_STACK_FRAME): Remove duplicate definition.
115 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
117 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
119 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
122 2002-01-12 Andreas Schwab <schwab@suse.de>
124 * Makefile (test-srcs): Add tst-signal.
125 (tests): Run tst-signal.
126 (distribute): Add tst-signal.sh.
127 * tst-signal.c, tst-signal.sh: New files.
129 2002-01-14 Andreas Jaeger <aj@suse.de>
131 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
133 2002-01-11 Andreas Schwab <schwab@suse.de>
135 * signals.c (sighandler): Initialize all elements to SIG_ERR.
136 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
138 2002-01-06 Richard Henderson <rth@redhat.com>
140 * sysdeps/alpha/elf/pt-initfini.c: New file.
142 2001-12-29 Andreas Jaeger <aj@suse.de>
144 * Examples/ex9.c: Add noreturn attribute for thread.
145 * Examples/ex10.c: Likewise.
146 * Examples/ex13.c (thread_start): Likewise.
147 * Examples/ex15.c (worker): Likewise.
149 * Examples/ex18.c: Include unistd.h for prototype of sleep.
151 2001-12-14 Ulrich Drepper <drepper@redhat.com>
153 * man/pthread_atfork.man: Adjust description of mutex handling
154 after fork for current implementation.
155 * linuxthreads.texi: Likewise [PR libc/2519].
157 2001-12-13 Andreas Schwab <schwab@suse.de>
159 * specific.c (pthread_key_delete): Don't contact the thread
160 manager if no threads have been created yet.
162 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
164 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
165 qualifier to be safe.
167 2001-11-30 Andreas Schwab <schwab@suse.de>
169 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
170 that self is the manager thread, and initialize the thread
172 (thread_self_stack) [THREAD_SELF]: New function to find self via
174 * manager.c (pthread_handle_create): Don't block cancel signal any
177 2001-11-29 Andreas Jaeger <aj@suse.de>
179 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
181 (INIT_THREAD_SELF): New.
182 (THREAD_GETMEM): New.
184 (THREAD_SETMEM): New.
185 (THREAD_SETMEM_NC): New.
186 (FLOATING_STACKS): Define.
187 (ARCH_STACK_MAX_SIZE): Define.
189 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
191 Bugfix to pthread_key_delete. It was iterating over the thread
192 manager's linked list of threads, behind the thread manager's
193 back causing a race. The fix is to have the manager iterate over
194 the threads instead, using a new request type for doing so.
195 * internals.h (struct pthread_request): New manager request type
197 * manager.c (pthread_for_each_thread): New function.
198 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
199 * specific.c (struct pthread_key_delete_helper_args): New type.
200 (pthread_key_delete_helper): New static function.
201 (pthread_key_delete): Use the new thread manager
202 REQ_FOR_EACH_THREAD function to iterate over the threads and set
203 the delete key slot to a null value in each thread.
204 * Examples/ex18.c: New test.
205 * Makefile (tests): Add ex18.
207 2001-11-22 Wolfram Gloger <wg@malloc.de>
209 * pthread.c (pthread_onexit_process): Don't call free
210 after threads have been asynchronously terminated.
212 * manager.c (pthread_handle_exit): Surround cancellation
213 of threads with __flockfilelist()/__funlockfilelist().
215 2001-11-26 Andreas Schwab <schwab@suse.de>
217 * manager.c (pthread_handle_create): Start the child thread with
218 the cancel signal blocked, so that it does not handle it before
219 the thread register is set up. Save errno from failed clone call.
221 2001-11-15 Ulrich Drepper <drepper@redhat.com>
223 * sysdeps/i386/i686/Implies: Removed.
224 * sysdeps/i386/i686/Versions: New file.
226 2001-10-31 Andreas Jaeger <aj@suse.de>
228 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
230 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
232 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
233 to __linuxthreads_pthread_sizeof_descr to match name used by
234 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
235 linuxthreads_db/td_symbol_list.c.
237 2001-09-22 Andreas Jaeger <aj@suse.de>
239 * linuxthreads/tst-context.c: Avoid compile warning.
241 2001-09-20 Andreas Jaeger <aj@suse.de>
243 * shlib-versions: Add x86-64.
245 2001-09-19 Andreas Jaeger <aj@suse.de>
247 * sysdeps/x86_64/Makefile: New file.
248 * sysdeps/x86_64/pspinlock.c: New file.
249 * sysdeps/x86_64/pt-machine.h: New file.
251 2001-09-12 Jakub Jelinek <jakub@redhat.com>
253 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
255 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
257 2001-09-11 Ulrich Drepper <drepper@redhat.com>
258 Wolfram Gloger <wg@malloc.de>
260 * join.c: Protect all communications from and to manager with
262 * manager.c: Likewise.
263 * pthread.c: Likewise.
264 * smeaphore.c: Likewise.
266 2001-08-29 Ulrich Drepper <drepper@redhat.com>
268 * spinlock.c (__pthread_lock): Top max_count value with
269 MAX_ADAPTIVE_SPIN_COUNT.
270 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
272 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
275 2001-08-27 Jakub Jelinek <jakub@redhat.com>
277 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
278 non-opaque type if __USE_UNIX98.
280 2001-08-26 Jakub Jelinek <jakub@redhat.com>
282 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
283 non-opaque lock types also if _IO_MTSAFE_IO is defined.
285 2001-08-23 Roland McGrath <roland@frob.com>
287 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
288 new first argument, skip the cleanup handler if it's zero.
289 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
290 (__libc_lock_define_initialized_recursive): Use it.
291 * sysdeps/pthread/bits/stdio-lock.h: File removed.
292 The sysdeps/generic file from the main tree now suffices.
294 2001-08-22 Roland McGrath <roland@frob.com>
296 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
297 instead of <pthread.h>.
298 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
299 (_IO_lock_initializer): Add braces.
300 (_IO_lock_lock): Use __libc_lock_lock_recursive.
301 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
303 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
304 (__libc_lock_define_initialized_recursive): Use it.
305 (__libc_lock_init_recursive): Likewise.
306 (__libc_lock_fini_recursive): Likewise.
307 (__libc_lock_lock_recursive): Likewise.
308 (__libc_lock_trylock_recursive): Likewise.
309 (__libc_lock_unlock_recursive): Likewise.
310 (__libc_lock_define_recursive): New macro.
312 2001-08-14 Jakub Jelinek <jakub@redhat.com>
314 * lockfile.c (__pthread_provide_lockfile): New variable.
315 * pthread.c (__pthread_require_lockfile): New variable.
316 * cancel.c (__pthread_require_lockfile): New variable.
318 2001-07-31 Ulrich Drepper <drepper@redhat.com>
320 * tst-context.c (threadfct): Initialize context before calling
323 * Examples/ex17.c: Make sure test thread is around long enough.
325 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
327 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
329 2001-07-24 Ulrich Drepper <drepper@redhat.com>
331 * tst-context.c (main): Print explanation before bailing out
332 because context handling is not supported.
334 2001-07-23 Ulrich Drepper <drepper@redhat.com>
336 * Makefile (tests): Add tst-context.
337 * tst-context.c: New file.
339 * sysdeps/pthread/bits/stdio-lock.h: Define
340 _IO_cleanup_region_start_noarg.
342 2001-07-23 Jakub Jelinek <jakub@redhat.com>
344 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
345 (ARCH_STACK_MAX_SIZE): Define.
346 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
347 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
349 2001-07-19 Jakub Jelinek <jakub@redhat.com>
351 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
353 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
354 (ARCH_STACK_MAX_SIZE): Define.
355 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
356 NEED_SEPARATE_REGISTER_STACK.
358 2001-07-16 Andreas Schwab <schwab@suse.de>
360 * Makefile (before-compile): Don't add $(objpfx)crti.o.
361 (omit-deps): Add crti.
362 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
363 it is filtered out of the link command.
365 2001-07-16 Ulrich Drepper <drepper@redhat.com>
367 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
368 to find the right value for __pthread_initial_thread_bos, it's not
369 used. If not FLOATING_STACKS first run
370 __pthread_init_max_stacksize.
372 2001-06-16 H.J. Lu <hjl@gnu.org>
374 * internals.h: Include <stackinfo.h>.
376 * attr.c: Don't include <stackinfo.h> here.
377 * cancel.c: Likewise.
378 * manager.c: Likewise.
379 * pthread.c: Likewise.
380 * ptlongjmp.c: Likewise.
382 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
384 * attr.c: Make _STACK_GROWS_UP work.
385 * internals.h: Likewise.
386 * manager.c: Likewise.
387 * pthread.c: Likewise.
389 2001-06-15 H.J. Lu <hjl@gnu.org>
391 * pthread.c (__pthread_reset_main_thread): Fix a typo.
393 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
395 * semaphore.h: Use struct _pthread_fastlock as an element of
396 sem_t instead of an identical struct.
397 * rwlock.c: Remove casts.
398 * semaphore.c: Likewise.
400 2001-04-30 Alan Modra <amodra@one.net.au>
402 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
404 2001-05-25 Bruce Mitchener <bruce@cubik.org>
406 * linuxthreads.texi: Spelling corrections.
408 2001-05-25 Ulrich Drepper <drepper@redhat.com>
410 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
411 returning successfully.
412 Patch by Gene Cooperman <gene@ccs.neu.edu>.
414 2001-05-24 Ulrich Drepper <drepper@redhat.com>
416 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
417 serious work try once whether the lock is uncontested.
418 Remove duplicate reading of __status before loop.
419 Change suggested by Hans Boehm <hans_boehm@hp.com>.
421 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
422 (__pthread_alt_trylock): Likewise.
424 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
426 Memory barrier overhaul following line by line inspection.
427 * mutex.c (pthread_once): Missing memory barriers added.
428 * pthread.c (__pthread_wait_for_restart_signal,
429 __pthread_timedsuspend_new, __pthread_restart_new): Added
430 memory barriers ``just in case'' and for documentary value.
431 * spinlock.c (__pthread_release): New inline function for releasing
432 spinlock, to complement __pthread_acquire. Includes memory
433 barrier prior to assignment to spinlock, and __asm __volatile
434 dance to prevent reordering or optimization of the spinlock access.
435 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
436 __pthread_alt_timedlock, __pthread_alt_unlock,
437 __pthread_compare_and_swap): Updated to use new __pthread_release
438 instead of updating spinlock directly.
439 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
440 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
441 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
442 Memory barrier overhaul. Lots of missing memory barriers added,
443 a couple needless ones removed.
444 * spinlock.c (__pthread_compare_and_swap): testandset optimization
445 removed, just calls __pthread_acquire, which has the new read
446 barrier in it before its testandset.
448 2001-05-20 Roland McGrath <roland@frob.com>
450 * Makeconfig: New file, variables used to be in main libc Makeconfig.
452 2001-05-09 Geoff Keating <geoffk@redhat.com>
454 * sysdeps/powerpc/pt-machine.h
455 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
456 (__compare_and_swap): Remove memory barriers.
457 (__compare_and_swap_with_release_semantics): New function.
459 2001-04-24 Andreas Jaeger <aj@suse.de>
461 * wrapsyscall.c: send* and recv* return ssize_t.
463 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
464 mutex instead of double locking it.
465 Reported by Pierre Artaud <partaud@sodatec.com>.
467 2001-04-23 Ulrich Drepper <drepper@redhat.com>
469 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
470 using #ifdef whether the clock is available.
471 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
473 * sysdeps/ia64/Versions: New file.
475 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
476 have to call __gmon_start__ in the libpthread DSO.
477 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
479 * Makefile (libpthread-routines): Add ptclock_gettime and
481 * internals.h: Don't use cpuclock-init.h definitions, use
482 hp-timing.h definitions.
483 * pthread.c: Likewise.
484 * manager.c: Likewise.
485 * ptclock_gettime.c: New file.
486 * ptclock_settime.c: New file.
487 * internals.h: Fix parameter type for __pthread_clock_gettime and
488 __pthread_clock_settime.
490 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
491 * sysdeps/i386/i586/ptclock_settime.c: Removed.
492 * sysdeps/i386/i586/Makefile: Removed.
494 2001-04-22 Ulrich Drepper <drepper@redhat.com>
496 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
497 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
499 2001-04-21 Andreas Jaeger <aj@suse.de>
501 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
502 attribute, remove statements that will never be executed.
503 (thread_func): Remove mutex_unlock call since it's never executed.
504 (thread_func): Fix comment as suggested by Jakub Jelinek.
506 * manager.c (__pthread_manager): Add noreturn
508 (pthread_start_thread): Likewise, remove return statement.
509 (pthread_start_thread_event): Likewise.
510 Add noreturn attribute for pthread_handle_exit.
511 * weaks.c: Add noreturn attribute for pthread_exit.
513 * internals.h: Add __pthread_clock_gettime and
514 __pthread_clock_settime prototypes.
516 2001-04-21 Ulrich Drepper <drepper@redhat.com>
518 * internals.h: Include <cpuclock-init.h>.
519 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
520 CPUCLOCK_VARDEF is defined.
521 * pthread.c (__pthread_initialize_minimal): Initialize
522 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
523 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
524 for new thread to current CPU clock value.
526 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
528 * sysdeps/i386/i586/Makefile: New file.
529 * sysdeps/i386/i586/Versions: New file.
530 * sysdeps/i386/i586/ptclock_gettime.c: New file.
531 * sysdeps/i386/i586/ptclock_settime.c: New file.
532 * sysdeps/i386/i686/Implies: New file.
534 2001-04-18 Jakub Jelinek <jakub@redhat.com>
536 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
537 $generated, not $postclean-generated.
539 2001-04-18 Andreas Jaeger <aj@suse.de>
541 * Makefile (otherlibs): Added.
543 2001-04-18 Jakub Jelinek <jakub@redhat.com>
545 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
547 2001-04-16 Ulrich Drepper <drepper@redhat.com>
549 * signals.c (sigwait): NSIG is no signal number. Block all
550 signals while in signal handler for signals in SET.
551 Patch by Manfred Spraul <manfred@colorfullife.com>.
553 2001-04-12 Ulrich Drepper <drepper@redhat.com>
555 * tst-cancel.c: Disable most tests. Add new test where all
556 cleanup handlers must run.
557 * Makefile (tests): Add tst-cancel again.
559 * cancel.c (__pthread_perform_cleanup): Correct condition for
560 leaving cleanup loop early.
562 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
563 all the files which use CURRENT_STACK_FRAME.
564 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
565 __builtin_frame_address.
566 * sysdeps/i386/i686/pt-machine.h: Likewise.
568 2001-04-11 Ulrich Drepper <drepper@redhat.com>
570 * Makefile (tests): Comment out tst-cancel for now.
572 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
573 temporary file in object directory.
574 * Makefile: Don't allow inlining when compiling tst-cancel.c.
575 Pass $(objpfx) to tst-cancel.
577 2001-04-11 David S. Miller <davem@redhat.com>
579 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
580 up closer to user local variables so that new cleanup heuristics work.
581 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
583 2001-04-11 Ulrich Drepper <drepper@redhat.com>
585 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
587 (_pthread_cleanup_push_defer): Likewise.
589 * tst-cancel.c (main): Fix loop printing cleanup output.
591 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
593 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
595 (__pthread_spin_trylock): Likewise.
596 * sysdeps/sh/pt-machine.h (testandset): Likewise.
598 2001-04-10 Ulrich Drepper <drepper@redhat.com>
600 * join.c (pthread_exit): Move code to new function __pthread_do_exit
601 which takes an extra parameter with the current frame pointer.
602 Call new function with CURRENT_STACK_FRAME.
603 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
604 with the new parameter.
605 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
606 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
607 this parameter as the initial value the cleanup handler records are
608 compared against. No active cleanup handler record must have an
609 address lower than the previous one and the initial record must be
610 above (below on PA) the frame address passed in.
611 (pthread_setcancelstate): Call __pthread_do_exit instead of
613 (pthread_setcanceltype): Likewise.
614 (pthread_testcancel): Likewise.
615 (_pthread_cleanup_pop_restore): Likewise.
616 * condvar.c (pthread_cond_wait): Likewise.
617 (pthread_cond_timedwait_relative): Likewise.
618 * manager.c (pthread_start_thread): Likewise.
619 * oldsemaphore.c (__old_sem_wait): Likewise.
620 * pthread.c (pthread_handle_sigcancel): Likewise.
621 * semaphore.c (__new_sem_wait): Likewise.
622 (sem_timedwait): Likewise.
623 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
624 to limit the cleanup handlers which get run.
625 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
626 for __pthread_perform_cleanup.
628 * Makefile (tests): Add tst-cancel.
629 * tst-cancel.c: New file.
631 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
633 * sysdeps/cris/pt-machine.h: New file.
634 * sysdeps/cris/pspinlock.c: New file.
636 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
638 * shlib-versions: Add case for Linux on CRIS.
640 2001-03-26 Ulrich Drepper <drepper@redhat.com>
642 * attr.c (pthread_getattr_np): Correct computation of stack size
643 for machiens with register stack.
645 * Examples/ex17.c (main): Correct detection of failed mmap call.
647 2001-03-21 Jakub Jelinek <jakub@redhat.com>
649 * pthread.c (__pthread_initialize_manager): Fix a typo.
651 2001-03-21 Jakub Jelinek <jakub@redhat.com>
653 * attr.c (__pthread_attr_setstack): Fix alignment check.
654 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
655 * Makefile (tests): Add ex17 test.
656 * Examples/ex17.c: New test.
658 2001-03-20 Ulrich Drepper <drepper@redhat.com>
660 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
661 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
662 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
664 2001-03-18 Ulrich Drepper <drepper@redhat.com>
666 * Makefile: When generating DSO link with libc_nonshared.a.
668 2001-02-26 Jakub Jelinek <jakub@redhat.com>
670 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
672 2001-02-23 Jakub Jelinek <jakub@redhat.com>
674 * internals.h (__pthread_init_max_stacksize): New prototype.
675 * attr.c (__pthread_attr_setstacksize): Call
676 __pthread_init_max_stacksize if not yet initialized.
677 * pthread.c (__pthread_init_max_stacksize): New function.
678 (__pthread_initialize_manager): Call it.
679 Patch by <dtc@cmucl.cons.org>.
681 2001-03-16 Ulrich Drepper <drepper@redhat.com>
683 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
685 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
687 * shlib-versions: Add rule for Linux on 64 bit S/390.
688 * sysdeps/s390/s390-64/pt-machine.h: New file.
689 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
691 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
693 * sysdeps/s390/pt-machine.h: Move to...
694 * sysdeps/s390/s390-32/pt-machine.h: ...here.
695 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
697 2001-03-15 Ulrich Drepper <drepper@redhat.com>
699 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
700 * attr.c: Implement pthread_getattr_np.
701 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
702 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
703 * manager.c (pthread_handle_create): Initialize p_inheritsched.
705 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
707 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
710 2001-02-20 Hans Boehm <hans_boehm@hp.com>
712 * manager.c (manager_mask): Removed static vesion. Now always local
713 to __pthread_manager().
714 (manager_mask_all): Removed completely.
715 (__pthread_manager): Remove manager_mask_all initialization.
716 (pthread_handle_create): Remove code to set and reset signal mask
717 around __clone2() calls.
719 2001-02-17 Jakub Jelinek <jakub@redhat.com>
721 * spinlock.c (__pthread_lock): Force lock->__status to be read from
722 memory on every spin.
724 2001-02-10 Andreas Jaeger <aj@suse.de>
726 * Makefile (extra-objs): New.
728 2001-02-09 Jakub Jelinek <jakub@redhat.com>
730 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
731 __pthread_initialize_minimal prototype.
733 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
735 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
737 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
739 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
741 2001-02-06 Ulrich Drepper <drepper@redhat.com>
743 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
744 broken code. Patch by Jes Sorensen.
746 2001-02-06 Andreas Jaeger <aj@suse.de>
748 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
750 * internals.h: ...here.
752 2001-02-05 Jes Sorensen <jes@linuxcare.com>
754 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
756 2001-02-02 Ulrich Drepper <drepper@redhat.com>
758 * Versions: Remove __pthread_initialize_minimal.
760 2001-02-01 Ulrich Drepper <drepper@redhat.com>
762 * Makefile: Add rules to build crti.o and make it being used in
763 building libpthread.so.
764 * sysdeps/i386/Makefile: New file.
765 * sysdeps/pthread/pt-initfini.c: New file.
767 * pthread.c: Cleanups.
769 2001-01-28 Andreas Jaeger <aj@suse.de>
771 * oldsemaphore.c (__old_sem_init): Adjust for last change.
772 * sysdeps/pthread/bits/libc-lock.h: Likewise.
773 * spinlock.c: Likewise.
775 2001-01-28 Ulrich Drepper <drepper@redhat.com>
777 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
778 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
779 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
780 * pthread.c: Likewise.
781 * spinlock.h: Likewise.
782 * sysdeps/pthread/pthread.h: Likewise.
784 2001-01-26 Ulrich Drepper <drepper@redhat.com>
786 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
787 as struct __pthread_attr_s.
789 * semaphore.h (sem_t): Cleanup namespace, rename status and
792 2001-01-13 Jakub Jelinek <jakub@redhat.com>
794 * pthread.c (pthread_onexit_process): Clear
795 __pthread_manager_thread_bos after freeing it.
796 * Makefile (tests): Add ex16.
797 * Examples/ex16.c: New file.
799 2001-01-11 Jakub Jelinek <jakub@redhat.com>
801 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
803 * pthread.c (pthread_exit_process): Rename to...
804 (pthread_onexit_process): ...this.
805 (pthread_atexit_process, pthread_atexit_retcode): New.
806 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
807 and only if HAVE_Z_NODELETE is not defined.
808 (__pthread_initialize_manager): Register pthread_atexit_retcode
811 2001-01-11 Ulrich Drepper <drepper@redhat.com>
813 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
815 2001-01-11 Jakub Jelinek <jakub@redhat.com>
817 * Makefile (tests): Add ex15.
818 * Examples/ex15.c: New test.
820 2001-01-08 Ulrich Drepper <drepper@redhat.com>
822 * pthread.c (pthread_exit_process): Free memory allocated for
825 2000-12-31 Ulrich Drepper <drepper@redhat.com>
827 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
828 (pthread_free): Always unmap the stack. It's safe now that we don't
829 use MAP_FIXED to allocate stacks.
831 2000-12-31 Ulrich Drepper <drepper@redhat.com>
833 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
835 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
837 2000-11-15 Wolfram Gloger <wg@malloc.de>
839 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
840 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
842 2000-12-27 Andreas Jaeger <aj@suse.de>
844 * Examples/ex13.c: Make local functions static.
845 * ecmutex.c: Likewise.
846 * joinrace.c: Likewise.
847 * Examples/ex14.c: Likewise.
849 * Examples/ex2.c: Make local functions static; reformat.
850 * Examples/ex1.c: Likewise.
851 * Examples/ex4.c: Likewise.
852 * Examples/ex5.c: Likewise.
853 * Examples/ex7.c: Likewise.
855 * oldsemaphore.c: Add prototypes to shut up GCC.
856 * pt-machine.c: Likewise.
858 * weaks.c: Add prototype for pthread_exit.
860 * internals.h: Add some prototypes, format prototypes and add
862 Move __libc_waitpid prototype to include/sys/wait.h.
864 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
866 * specific.c: Likewise.
867 * ptfork.c: Likewise.
869 * lockfile.c: Include internals.h to get prototypes.
870 * events.c: Likewise.
871 * sysdeps/alpha/pspinlock.c: Likewise.
872 * sysdeps/arm/pspinlock.c: Likewise.
873 * sysdeps/hppa/pspinlock.c: Likewise.
874 * sysdeps/i386/pspinlock.c: Likewise.
875 * sysdeps/ia64/pspinlock.c: Likewise.
876 * sysdeps/m68k/pspinlock.c: Likewise.
877 * sysdeps/mips/pspinlock.c: Likewise.
878 * sysdeps/powerpc/pspinlock.c: Likewise.
879 * sysdeps/s390/pspinlock.c: Likewise.
880 * sysdeps/sh/pspinlock.c: Likewise.
881 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
882 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
883 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
885 2000-12-27 Ulrich Drepper <drepper@redhat.com>
887 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
888 (__pthread_attr_getstack): Return correct address.
889 Add warnings for using pthread_attr_getstackaddr and
890 pthread_attr_setstackaddr.
892 2000-12-26 Ulrich Drepper <drepper@redhat.com>
894 * Examples/ex6.c (test_thread): Make static.
895 * Examples/ex12.c (test_thread): Make static and add noreturn
898 2000-12-18 Jes Sorensen <jes@linuxcare.com>
900 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
901 and compare_and_swap_with_release_semantics returns int not long.
903 2000-12-17 Andreas Jaeger <aj@suse.de>
905 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
907 * sysdeps/arm/pt-machine.h (testandset): Likewise.
908 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
909 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
910 * sysdeps/sh/pt-machine.h (testandset): Likewise.
911 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
912 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
914 2000-12-17 Ulrich Drepper <drepper@redhat.com>
916 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
917 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
919 2000-12-17 Andreas Jaeger <aj@suse.de>
921 * internals.h: Add prototypes for testandset and
922 __compare_and_swap to shut up gcc warnings.
924 2000-12-06 Wolfram Gloger <wg@malloc.de>
926 * join.c (pthread_detach): Allow case where the thread has already
929 2000-12-05 Andreas Jaeger <aj@suse.de>
931 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
932 * sysdeps/mips/pt-machine.h (testandset): Likewise.
933 (__compare_and_swap): Likewise.
934 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
936 2000-11-20 Jakub Jelinek <jakub@redhat.com>
938 * Examples/ex3.c (main): Cast int to long before casting to void *.
939 (search): Cast void * to long, not int.
940 * Examples/ex8.c (main, thread): Similarly.
941 * Examples/ex11.c (main): Similarly.
942 * Examples/ex14.c (worker, do_test): Similarly.
943 * ecmutex.c (worker, do_test): Similarly.
944 (nlocks): Cast to int.
946 2000-11-08 Bruce Mitchener <bruce@cubik.org>
948 * linuxthreads.texi: Add documentation for pthreads attributes
949 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
950 patch. Document pthread_[sg]etconcurrency(). Mark
951 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
953 2000-11-07 Ulrich Drepper <drepper@redhat.com>
955 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
957 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
958 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
960 2000-11-06 Ulrich Drepper <drepper@redhat.com>
962 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
963 not doing it right now.
964 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
966 2000-10-30 Ulrich Drepper <drepper@redhat.com>
968 * Examples/ex4.c (main): Don't use exit() to avoid warning with
971 2000-10-29 Ulrich Drepper <drepper@redhat.com>
973 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
974 here. Reported by Bruce Mitchener <bruce@cubik.org>.
976 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
977 discussing mutexes. (As per the Unix98 name for the API.)
978 Changes documentation for pthread_mutexattr_setkind_np() and
979 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
980 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
981 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
982 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
983 Begins to introduce discussion of the ``timed'' mutex type. This
984 discussion is currently incomplete.
985 Patch by Bruce Mitchener <bruce@cubik.org>.
987 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
988 Yutaka Niibe <gniibe@chroot.org>
990 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
991 has restrictions, use register.
993 2000-10-23 Andreas Schwab <schwab@suse.de>
995 * Examples/ex14.c (TIMEOUT): Override default timeout.
997 2000-10-16 Ulrich Drepper <drepper@redhat.com>
999 * specific.c: Protect tsd array modification in thread data
1000 structures by getting the thread lock in pthread_key_delete and
1001 __pthread_destroy_specifics.
1002 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1004 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1006 * sysdeps/pthread/bits/initspin.h: New file.
1007 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1008 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1009 (__pthread_alt_init_lock): Likewise.
1010 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1012 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1014 * oldsemaphore.c (__old_sem_init): Release lock with
1015 LT_SPINLOCK_INIT, not zero.
1016 * spinlock.c (__pthread_unlock): Likewise.
1017 (__pthread_alt_lock): Likewise.
1018 (__pthread_alt_timedlock): Likewise.
1019 (__pthread_alt_unlock): Likewise.
1020 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1021 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1022 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1023 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1025 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1027 * shlib-versions: Add version definitions for hppa-linux.
1029 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1031 * sysdeps/hppa/pspinlock.c: New file.
1032 * sysdeps/hppa/pt-machine.h: New file.
1033 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1035 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1037 * mutex.c (__pthread_mutex_destroy): Correct test of
1038 busy mutex for mutexes using alternate fastlocks.
1039 Patch by dtc@cmucl.cons.org.
1041 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1043 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1045 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1047 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1048 test for owner first.
1049 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1051 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1054 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1056 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1057 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1059 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1060 _POSIX_MONOTONIC_CLOCK.
1062 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1065 2000-09-20 Andreas Jaeger <aj@suse.de>
1067 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1068 "testrtsig.h" conditional.
1070 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1072 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1073 pthread_attr_setstack.
1074 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1075 pthread_attr_setstack.
1076 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1078 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1080 * Examples/ex14.c: New file.
1081 * Makefile (tests): Add ex14.
1083 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1084 mutex. Patch by dtc@cmucl.cons.org.
1086 * ecmutex.c: New file.
1087 * Makefile (tests): Add ecmutex.
1089 2000-09-04 H.J. Lu <hjl@gnu.org>
1091 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1092 instead of roundup to round up to the page size.
1094 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1096 * manager.c (pthread_exited): Correctly report event as TD_REAP
1097 instead of TD_DEATH. Fix comments.
1099 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1101 * spinlock.h (testandset): Add cast to avoid warning.
1102 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1104 2000-09-02 Andreas Jaeger <aj@suse.de>
1106 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1109 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1111 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1112 Fix typo in last patch (_mode -> _flags).
1114 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1115 Provide definition which respects _IO_USER_LOCK flag.
1117 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1119 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1122 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1124 * Makefile: Add rules to build and run unload.
1125 * unload.c: New file.
1127 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1129 * sysdeps/pthread/pthread.h
1130 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1131 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1133 2000-08-24 Andreas Jaeger <aj@suse.de>
1135 * Examples/ex13.c: Include <string.h> for strerror prototype and
1136 <stdlib.h> for abort prototype.
1137 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1138 (thread_start): Remove unused variable err.
1139 (main): Silence GCC warnings.
1141 2000-08-22 Andreas Jaeger <aj@suse.de>
1143 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1145 * Makefile (tests): Add ex13.
1147 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1149 * semaphore.h: Add restrict where required by AGd4.
1150 * sysdeps/pthread/pthread.h: Likewise.
1151 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1153 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1155 * Makefile (tests): Add ex12. Add rule to build it.
1156 * Examples/ex12.c: New file.
1158 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1160 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1161 even though the implementation is not quite complete (but it reports
1162 it). Define _POSIX_MESSAGE_PASSING to -1.
1163 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1165 2000-08-12 Andreas Jaeger <aj@suse.de>
1167 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1169 (__compare_and_swap): Likewise.
1170 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1172 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1174 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1175 p_h_errnop correctly and not to NULL.
1177 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1179 * Banner: Bump version number to 0.9.
1181 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1183 * Makefile (tests): Add tststack. Add rule to build the program.
1184 * tststack.c: New file.
1186 * internals.h: Declare __pthread_max_stacksize.
1187 * pthread.c (__pthread_max_stacksize): New variable.
1188 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1190 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1191 (pthread_allocate_stack): Allow kernel to choose stack address if
1192 FLOATING_STACKS. This also handles variable-sized stacks.
1193 Always allocate stack and guardpage together. Use mprotect to
1194 change guardpage access.
1195 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1196 ARCH_STACK_MAX_SIZE.
1198 * attr.c (__pthread_attr_setstacksize): Also test value against
1201 * manager.c (__pthread_nonstandard_stacks): Define only if
1202 THREAD_SELF is not defined.
1203 (pthread_allocate_stack): Always initialize gardaddr to a correct
1205 (pthread_handle_create): Unmap thread with one call.
1206 (pthread_free): Remove test for initial thread before removing stack.
1207 Unmap stack with one call.
1209 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1210 1 to avoid removing the stack.
1212 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1214 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1215 load of spin lock to prime the cache before the atomic compare and
1216 exchange operation (cmpxchg4). This avoids the spinning on the
1217 cmpxchg4 instruction and reduces movement of the cache line back
1218 and forth between the processors (explanation by Asis K. Mallick
1219 from Intel). This basically makes the implementation operate the
1220 same as the Linux kernel implementation.
1222 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1223 * sysdeps/ia64/pspinlock.c: New file.
1225 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1227 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1228 * spinlock.h: ...here. Remove locking.
1229 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1231 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1232 (rwlock_rd_extricate_func): Don't determine self, let
1233 __pthread_lock do it.
1234 (rwlock_wr_extricate_func): Likewise.
1235 (rwlock_have_already): Optimize *pself handling a bit.
1237 * mutex.c: Use __builtin_expect.
1238 * pthread.c: Likewise.
1240 2000-08-02 Andreas Jaeger <aj@suse.de>
1242 * sysdeps/s390/pspinlock.c: New file.
1243 * sysdeps/s390/pt-machine.h: New file.
1244 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1246 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1248 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1250 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1252 2000-07-26 Andreas Jaeger <aj@suse.de>
1254 * pthread.c: Initialize p_sem_avail.
1256 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1258 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1259 * semaphore.c: Handle spurious wakeups.
1261 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1262 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1264 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1265 (__pthread_wait_for_restart): Likewise.
1267 * condvar.c (pthread_cond_wait): Also check whether thread is
1268 cancelable before aborting loop.
1269 (pthread_cond_timedwait): Likewise.
1271 * signals.c (pthread_sighandler): Remove special code to restrore
1273 (pthread_sighandler_t): Likewise.
1275 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1277 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1278 * pthread.c: Include <resolv.h>.
1279 (_res): Undefine. Add extern declaration.
1281 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1283 * pthread.c (__pthread_initial_thread): Update initializer.
1284 (__pthread_manager_thread): Likewise.
1285 (pthread_initialize): Move setrlimit call to...
1286 (__pthread_initialize_manager): ...here.
1287 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1289 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1290 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1292 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1294 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1295 __compare_and_swap to define testandset.
1296 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1297 Define IMPLEMENT_TAS_WITH_CAS.
1299 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1301 * Makefile: Pass -z nodelete to linker for libpthread.so
1302 generation if it understand this option.
1304 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1306 * manager.c (pthread_handle_create): Remove initialization of
1307 new_thread->p_res._sock.
1309 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1311 Bugfixes to the variant of the code for machines with no compare
1314 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1315 node was not being properly enqueued, due to failing to update
1316 the lock->__status field.
1318 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1319 being set inappropriately, causing the suspend function to be called
1320 with a null self pointer and crash.
1322 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1324 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1325 compare&swap is available.
1327 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1330 * pthread.c (pthread_initialize): Don't use sysconf to determine
1331 whether the machine has more than one processor.
1333 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1334 removed thread_self calls.
1336 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1338 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1339 __compare_and_swap to compare_and_swap in code which assumes
1340 compare swap is available.
1342 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1344 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1345 bug whereby thr field of waitnode structure would not be correctly
1346 set unless a null self pointer is passed to the functions.
1347 Eliminated redundant calls to thread_self().
1349 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1351 * pthread.c (__pthread_initialize_manager): Lock
1352 __pthread_manager_thread.p_lock before calling clone.
1354 2000-05-05 H.J. Lu <hjl@gnu.org>
1356 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1357 have acquire semantics.
1358 (__compare_and_swap_with_release_semantics): New inline
1360 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1362 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1364 * manager.c: Fix the problem with signals at startup.
1365 Change the way that thread stacks are allocated on IA64.
1366 Clean up some of the guard page allocation stuff.
1368 1999-12-19 H.J. Lu <hjl@gnu.org>
1370 * internals.h (page_roundup): New.
1371 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1373 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1374 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1377 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1379 * manager.c (pthread_allocate_stack): Unmap the stack top
1380 if failed to map the stack bottom.
1382 (pthread_free): Fix the guard page.
1384 * pthread.c (pthread_initialize): Set rlimit correctly for
1385 NEED_SEPARATE_REGISTER_STACK.
1387 1999-12-16 H.J. Lu <hjl@gnu.org>
1389 * pthread.c (__pthread_initialize_manager): Pass
1390 __pthread_manager_thread_bos instead of
1391 __pthread_manager_thread_tos to __clone2.
1393 1999-12-16 H.J. Lu <hjl@gnu.org>
1395 * manager.c (pthread_allocate_stack): Correct the calculation
1396 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1399 1999-12-13 H.J. Lu <hjl@gnu.org>
1401 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1402 bit after setting ar.ccv.
1404 1999-12-12 H.J. Lu <hjl@gnu.org>
1406 * manager.c (pthread_allocate_stack): Make the starting
1407 address of the stack bottom page aligned. FIXME: it may
1408 need changes in other places.
1409 (pthread_handle_create): Likewise.
1411 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1413 * manager.c (pthread_allocate_stack): Handle
1414 NEED_SEPARATE_REGISTER_STACK.
1415 (pthread_handle_create): Likewise.
1416 * pthread.c (__pthread_initialize_manager): Likewise.
1418 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1420 1999-12-02 H.J. Lu <hjl@gnu.org>
1422 * sysdeps/ia64/pt-machine.h: New.
1424 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1426 * wrapsyscall.c: Mark non-__ protected names as weak.
1429 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1431 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1433 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1435 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1436 Add tests also to new alternative spinlock implementation.
1437 * spinlock.h: Likewise.
1438 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1440 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1442 * Version: Export __sigaction.
1443 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1445 * pthread.c: Use __libc_sigaction instead of __sigaction.
1447 * condvar.c: Implement pthread_condattr_getpshared and
1448 pthread_condattr_setpshared.
1449 * mutex.c: Implement pthread_mutexattr_getpshared and
1450 pthread_mutexattr_setpshared.
1451 * Versions: Export new functions.
1452 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1454 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1455 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1458 2000-07-04 Greg McGary <greg@mcgary.org>
1460 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1461 pragmas. Include bp-sym.h only if _LIBC.
1463 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1465 * spinlock.c (__pthread_unlock): Properly place write barrier.
1466 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1468 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1470 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1471 faster on SMP systems. No more emulation of compare&swap for adaptive
1473 * spinlock.h: Likewise.
1474 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1475 Replace fast with adaptive mutex.
1476 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1477 * condvar.c: Likewise.
1478 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1479 * internals.h: Declare __pthread_smp_kernel.
1480 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1481 _pthread_fastlock structure.
1482 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1484 * pthread.c: Remove initialization to zero from global variables.
1486 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1488 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1490 2000-06-28 Greg McGary <greg@mcgary.org>
1492 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1493 pthread functions that have pointers in their return+arg signatures.
1495 2000-06-27 Greg McGary <greg@mcgary.org>
1497 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1498 extern declarations of pthread functions that have pointers in
1499 their return+arg signatures.
1501 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1503 * Makefile (tests): Add ex11. Add rules to build it.
1504 * Examples/ex11.c: New file.
1505 * rwlock.c: Fix complete braindamaged previous try to implement
1508 * spinlock.c: Pretty print.
1510 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1512 * Makefile (tests): Add ex10. Add rules to build it.
1513 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1514 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1515 * condvar.c (pthread_cond_wait): Allow mutex of kind
1516 PTHREAD_MUTEX_TIMED_NP.
1517 (pthread_cond_timedwait_relative): Likewise.
1518 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1519 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1520 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1521 (__pthread_mutex_lock): Use __pthread_alt_lock for
1522 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1523 (__pthread_mutex_timedlock): New function.
1524 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1525 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1526 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1527 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1528 * spinlock.c: Implement alternate fastlocks.
1529 * spinlock.h: Add prototypes.
1530 * Examples/ex10.c: New file.
1531 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1532 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1534 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1535 (__pthread_rwlock_timedrdlock): New function.
1536 (__pthread_rwlock_timedwrlock): New function.
1537 Use laternate fastlock function everywhere.
1539 2000-06-21 Andreas Jaeger <aj@suse.de>
1541 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1544 * join.c: Include <stdlib.h> for exit prototype.
1546 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1548 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1550 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1551 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1553 * Makefile (libpthread-routines): Add barrier.
1554 (tests): Add ex9. Add rule to build ex9.
1555 * Versions: Export barrier functions.
1556 * barrier.c: New file.
1557 * Examples/ex9.c: New file.
1558 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1559 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1560 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1562 2000-06-19 H.J. Lu <hjl@gnu.org>
1564 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1565 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1566 (compare_and_swap_with_release_semantics): New. Default to
1567 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1570 * spinlock.c (__pthread_unlock): Call
1571 compare_and_swap_with_release_semantics () instead of
1572 compare_and_swap ().
1574 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1576 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1578 * sysdeps/pthread/timer_delete.c: Likewise.
1579 * sysdeps/pthread/timer_getoverr.c: Likewise.
1580 * sysdeps/pthread/timer_gettime.c: Likewise.
1581 * sysdeps/pthread/timer_settime.c: Likewise.
1583 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1585 Timer nodes are now reference counted, and can be marked
1586 as deleted. This allows for the safe release of the global mutex
1587 in the middle without losing the timer being operated on.
1589 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1590 member is now an enum with three values, so that an intermediate
1591 state can be represented (deleted but not free for reuse yet).
1592 New refcount member added.
1593 * sysdeps/pthread/timer_routines.c: Likewise.
1595 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1596 timer_valid): New inline functions added.
1598 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1599 restructured, recursive deadlock bug fixed.
1601 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1602 timer_addref to ensure that timer won't be deleted while mutex is not
1603 held. Also uses timer_invalid to perform validation of timer handle.
1604 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1605 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1607 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1609 * shlib-versions: Add entry for SH.
1610 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1612 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1614 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1615 tightened up some critical regions and micro-optimized some list
1618 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1619 Returns int value now to indicate whether timer was queued at head.
1620 * sysdeps/pthread/posix-timer.h: Likewise.
1621 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1622 new return value from __timer_thread_queue_timer to avoid waking
1623 up timer thread unnecessarily.
1625 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1626 inuse flag, because this requires mutex to be held. Callers updated
1627 to do the check when they have the mutex.
1628 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1630 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1631 regions: avoids making system calls while holding timer mutex, and
1632 a few computations were moved outside of the mutex as well.
1633 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1635 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1636 to list_unlink_ip, meaning idempotent. Pointer manipulation
1637 changed to get better better code out of gcc.
1638 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1639 version of list_unlink added here.
1640 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1641 function in all places: idempotent one for timers, non-idempotent
1642 one for thread nodes.
1643 * sysdeps/pthread/timer_settime: Likewise.
1644 * sysdeps/pthread/timer_routines.c: Likewise.
1646 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1648 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1649 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1651 * sysdeps/pthread/Makefile: Remove tests definition.
1653 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1654 Yutaka Niibe <gniibe@chroot.org>
1656 * sysdeps/sh/pspinlock.c: New file.
1657 * sysdeps/sh/pt-machine.h: New file.
1659 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1661 * Makefile (tests): Add joinrace.
1663 * Examples/ex6.c: Test return value of pthread_join.
1665 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1667 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1668 (__pthread_spin_trylock): Implement.
1669 (__pthread_spin_unlock): Implement.
1670 (__pthread_spin_init): Implement.
1671 (__pthread_spin_destroy): Implement.
1673 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1675 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1676 really append the entry.
1678 2000-06-10 Andreas Jaeger <aj@suse.de>
1680 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1682 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1684 * sysdeps/pthread/timer_create.c: Thread matching now done on
1685 clock type as well as thread attributes.
1686 There are individual global signal-delivering threads for
1687 different clock types.
1688 * sysdeps/pthread/posix-timer.h: Likewise.
1689 * sysdeps/pthread/timer_routines.c: Likewise.
1691 * sysdeps/pthread/timer_routines.c: Thread allocation and
1692 deallocation function now remembers to put thread on active
1693 list and remove from active list.
1694 Thus now the feature of binding multiple timers
1695 to a single thread actually works.
1697 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1699 * pthread.c (__pthread_create_2_1): Optimize a bit.
1701 * internals.h (invalid_handle): Also test for p_terminated != 0.
1702 (nonexisting_handle): New function. Same as old invalid_handle.
1703 * join.c (pthread_join): Use nonexisting_handle instead of
1704 invalid_handle to test for acceptable thread handle.
1705 * manager.c (pthread_handle_free): Likewise.
1706 * joinrace.c: New file.
1707 Reported by Permaine Cheung <pcheung@cygnus.com>.
1709 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1711 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1712 Correct handling of matching variable.
1714 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1717 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1718 Be prepared for empty timer list.
1720 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1721 CPUTIME clock ID. Add support for thread clocks.
1723 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1724 subtraction were switched.
1726 * sysdeps/pthread/timer_routines.c (init_module): Use
1727 THREAD_MAXNODES threads.
1729 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1730 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1731 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1732 with sigqueueinfo is this system call is available.
1734 * sysdeps/pthread/timer_create.c (timer_create): Allow
1735 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1737 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1739 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1741 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1743 * sysdeps/pthread/posix-timer.h: New file.
1744 * sysdeps/pthread/timer_create.c: New file.
1745 * sysdeps/pthread/timer_delete.c: New file.
1746 * sysdeps/pthread/timer_getoverr.c: New file.
1747 * sysdeps/pthread/timer_gettime.c: New file.
1748 * sysdeps/pthread/timer_routines.c: New file.
1749 * sysdeps/pthread/timer_settime.c: New file.
1750 * sysdeps/pthread/tst-timer.c: New file.
1752 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1754 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1755 LINK_MAX definitions if necessary.
1757 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1759 Added missing fork time handling of global libio lock.
1761 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1762 not just the individual stream locks. Rewritten to use new
1763 iterator interface provided by libio rather than accessing
1766 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1767 which lock and unlock the stream list using the new interface
1769 * internals.h: Likewise.
1771 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1772 and __funlockfilelist in the parent after the fork.
1773 Child still calls __fresetlockfiles as before.
1775 * linuxthreads.texi: Now explains what happens to streams at
1776 fork time. Also whole new section on forking and thread added.
1777 Definition of pthread_atfork moved out of Miscellaneous Functions
1778 to this new section.
1780 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1782 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1783 Add missing register.
1784 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1786 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1788 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1789 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1790 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1792 2000-05-31 Andreas Jaeger <aj@suse.de>
1794 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1796 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1798 * spinlock.c (__pthread_lock): Remove ASSERT.
1800 * Makefile (tests): Add ex8.
1801 * Examples/ex8.c: New file.
1803 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1805 Bugfix: The pthread_atfork mechanism now takes care of its
1806 own internal mutex at fork time.
1808 * ptfork.c (__fork): Revised so that the mutex is held across
1809 the fork operation and while the handlers are called, and so that
1810 the child resets the mutex.
1812 * linuxthreads.texi: Updated pthread_atfork documentation to make
1813 it clear that fork and pthread_atfork can't be reentered from
1814 atfork handlers, that pthread_atfork and fork are mutually atomic,
1815 and that the handlers are inherited by the child process.
1817 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1819 * Makefile (libpthread-routines): Add pspinlock.
1820 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1821 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1822 * condvar.c: Likewise.
1823 * internals.h: Likewise.
1825 * manager.c: Likewise.
1826 * mutex.c: Likewise.
1827 * pthread.c: Likewise.
1828 * rwlock.c: Likewise.
1829 * semaphore.c: Likewise.
1830 * signals.c: Likewise.
1831 * spinlock.h: Likewise.
1832 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1833 * sysdeps/alpha/pspinlock.c: New file.
1834 * sysdeps/arm/pspinlock.c: New file.
1835 * sysdeps/i386/pspinlock.c: New file.
1836 * sysdeps/m68k/pspinlock.c: New file.
1837 * sysdeps/mips/pspinlock.c: New file.
1838 * sysdeps/powerpc/pspinlock.c: New file.
1839 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1840 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1841 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1842 back to _pthread_fastlock. Define new pthread_spinlock_t.
1844 2000-05-24 Andreas Jaeger <aj@suse.de>
1846 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1848 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1850 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1852 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1854 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1856 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1858 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1859 object state is represented with additional bits which distinguish
1860 whether that state was set up in the current process, or
1861 in an ancestor process. If that state was set in an ancestor,
1862 it means that a fork happened while thread was executing the init
1863 function. In that case, the state is reset to NEVER.
1864 * mutex.c (__pthread_once_fork_prepare): New function.
1865 (__pthread_once_fork_child): Likewise
1866 (__pthread_once_fork_parent): Likewise
1867 (__pthread_reset_pthread_once): Removed.
1868 * ptfork.c (__fork): Call new handlers in mutex.c.
1869 * internals.h: Declarations of new mutex.c functions added.
1870 Declaration of removed function deleted.
1871 * linuxthreads.texi: Updated documentation about pthread_once
1872 to clarify what happens under cancellation and forking.
1874 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1876 * internals.h: New thread manager request type, REQ_KICK.
1877 * join.c (pthread_exit): main thread now calls exit() instead
1878 of _exit() in order to proper process cleanup.
1879 * manager.c (__pthread_manager): Do not terminate manager
1880 after unblocking main thread; wait for main thread's
1881 REQ_PROCESS_EXIT request instead.
1882 Also, added REQ_KICK case to handle new request; this just does
1884 * manager.c (pthread_exited): Do not terminate manager after
1885 unblocking main thread.
1886 * manager.c (__pthread_manager_sighandler): If the main thread
1887 is waiting for all other threads to die, send a REQ_KICK into
1888 the thread manager request pipe to get it to clean out the threads
1889 and unblock the main thread as soon as possible. This fixes
1890 the 2000 millisecond hang on shutdown bug.
1891 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1892 including the main one call pthread_exit(), or implicitly do so.
1893 * Makefile (tests): Add ex7.
1895 2000-05-05 Andreas Jaeger <aj@suse.de>
1897 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1898 (pthread_getcpuclockid): Correct test for ourselves.
1900 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1902 * internals.h (struct _pthread_descr_struct): Reorganization.
1903 Allocate room for 16 pointers at head of the structure for future
1904 thread-local data handling. Move p_self member in this area.
1905 * manager.c (pthread_handle_create): Adjust use of p_self.
1906 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1907 * pthread.c (__pthread_initial_thread): Adjust initialization.
1908 (__pthread_manager_thread): Likewise.
1910 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1912 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1913 for eventmask larger than 1 word.
1915 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1917 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1918 * pthread.c (__pthread_initialize_minimal): New function. Perform
1919 minimal initialization.
1920 (pthread_initialize): Remove this code here.
1921 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1922 are working around the problem in glibc.
1924 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1926 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1927 now. First gcc must be fixed (more concrete: libgcc).
1929 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1931 * pthread.c: Remove special treatement for interrupt handlers on x86.
1932 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1933 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1935 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1937 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1939 * join.c (pthread_exit): Set p_terminated after reporting the
1940 termination event instead of before.
1942 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1944 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1947 2000-04-18 Andreas Jaeger <aj@suse.de>
1949 * Versions: Use ld instead of ld.so.
1951 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1953 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1954 Remove the typedef keyword.
1956 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1958 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1960 (READ_MEMORY_BARRIER): Define.
1961 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1963 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1966 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1968 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1969 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1970 use thread_handle().
1972 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1974 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1975 if fast mutex is used. Don't initialize `already_canceled' twice.
1976 Correctly test for return value of timedsuspend.
1978 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1979 therefore don't need the _rt versions of the signal handlers.
1981 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1983 * pthread.c (pthread_yield): New function.
1984 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1985 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1986 * internals.h: Declare __pthread_yield.
1988 * pthread.c (pthread_initialize): Avoid a bit more code if
1989 realtime signals are known to exist.
1991 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1992 to dynamically detect RT signals and avoid generating compatibility
1993 functions with old kernel.
1994 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1995 __pthread_restart_new directly.
1996 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1997 __pthread_wait_for_restart_signal directly.
1998 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1999 __pthread_timedsuspend_new directly.
2001 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2003 * condvar.c: Remove all the special code to handle cond_timedwait.
2004 Use timedsuspend instead.
2005 * internals.h: Declare __pthread_timedsuspend_old,
2006 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2007 Remove declaration of __pthread_init_condvar.
2008 * pthread.c: Define __pthread_timedsuspend variable.
2009 (__pthread_timedsuspend_old): New function. Timed suspension
2010 implementation for old Linux kernels.
2011 (__pthread_timedsuspend_new): New function. Timed suspension
2012 implementation for new Linux kernels.
2013 * restart.h (timedsuspend): New function. Call appropriate
2014 suspension function through __pthread_timedsuspend.
2015 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2017 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2019 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2021 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2023 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2024 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2026 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2027 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2029 2000-04-14 Andreas Jaeger <aj@suse.de>
2031 * weaks.c: Fix typo.
2033 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2034 2.2 for linuxthreads.
2036 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2038 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2039 (pthread_getcpuclockid): Fix typo.
2041 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2043 * Makefile (libpthread-routines): Add getcpuclockid.
2044 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2045 * sysdeps/pthread/getcpuclockid.c: New file.
2046 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2047 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2049 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2051 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2053 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2054 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2055 and pthread_spin_unlock.
2056 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2057 into pthread_spinlock_t. Change all uses.
2058 * spinlock.c: Implement pthread_spin_lock.
2059 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2060 alias for real name.
2061 Define pthread_spin_trylock, pthread_spin_init, and
2062 pthread_spin_destroy.
2063 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2064 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2065 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2066 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2067 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2068 and pthread_spin_unlock.
2069 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2070 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2071 * condvar.c: Likewise.
2072 * internals.h: Likewise.
2074 * manager.c: Likewise.
2075 * mutex.c: Likewise.
2076 * pthread.c: Likewise.
2077 * rwlock.c: Likewise.
2078 * semaphore.c: Likewise.
2079 * signals.c: Likewise.
2081 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2083 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2085 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2087 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2088 _POSIX_SHARED_MEMORY_OBJECTS.
2090 2000-04-11 Andreas Jaeger <aj@suse.de>
2092 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2093 (__compare_and_swap): Mark as modifying memory.
2095 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2097 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2099 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2100 Don't have the 'asm' __volatile__.
2102 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2104 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2105 * spinlock.c (__pthread_lock): Add memory barriers.
2106 (__pthread_unlock): Likewise.
2107 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2109 (RELEASE): Not needed anymore.
2110 (__compare_and_swap): Mark asm as modifying memory.
2111 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2113 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2114 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2115 (MEMORY_BARRIER): Define using stbar.
2116 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2118 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2119 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2120 Mike Burrows <m3b@pa.dec.com>.
2122 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2124 * signals.c (sigaction): Fix return value for the case SIG is one
2125 of the signals the implementation uses.
2126 Patch by Xavier.Leroy@inria.fr.
2128 2000-04-01 Andreas Jaeger <aj@suse.de>
2130 * attr.c: Use shlib-compat macros.
2131 * oldsemaphore.c: Likewise.
2132 * pthread.c: Likewise.
2133 * weaks.c: Likewise.
2135 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2137 * semaphore.c (sem_timedwait): New function.
2138 Patch by Carl Mailloux <carlm@oricom.ca>.
2139 * semaphore.h: Declare sem_timedwait.
2140 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2142 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2144 * sysdeps/pthread/Makefile: File removed.
2146 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2148 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2149 * internals.h (__pthread_reset_pthread_once): Add prototype.
2150 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2152 * manager.c (pthread_handle_create): Store ID of new thread before
2155 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2157 * attr.c: Use new macros from shlib-compat.h to define versions.
2158 * oldsemaphore.c: Likewise.
2159 * semaphore.c: Likewise.
2160 * weaks.c: Likewise.
2162 * pthread.c: Update for new SHLIB_COMPAT definition.
2164 * manager.c (__pthread_manager): Unmask debug signal.
2166 * pthread.c (pthread_initialize): Test for address of __dso_handle
2167 being NULL, not value. Use __on_exit, not on_exit.
2168 Patch by Andreas Jaeger <aj@suse.de>.
2170 * pthread.c: Use new macros from shlib-compat.h to define versions.
2172 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2174 * pthread.c (pthread_initialize): Instead of on_exit use
2175 __cxa_atexit if __dso_label is available to allow unloading the
2176 libpthread shared library.
2178 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2180 * condvar.c: Make tests for ownership of mutex less strict.
2182 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2184 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2185 current thread and return error if not.
2186 (pthread_cond_timedwait_relative_old): Likewise.
2187 (pthread_cond_timedwait_relative_new): Likewise.
2189 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2190 (pthread_once_cancelhandler): New function.
2191 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2193 2000-03-14 Andreas Jaeger <aj@suse.de>
2195 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2197 (pthread_handle_sigrestart_rt): Likewise.
2198 * signals.c (pthread_sighandler_rt): Likewise.
2200 2000-03-02 Andreas Jaeger <aj@suse.de>
2202 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2203 Reported by Sean Chen <sean.chen@turbolinux.com>.
2205 2000-02-28 Andreas Jaeger <aj@suse.de>
2207 * rwlock.c: Fix typo.
2209 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2211 * rwlock.c: Define __* variants of the functions and make old names
2213 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2214 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2216 2000-02-25 Andreas Jaeger <aj@suse.de>
2218 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2219 pwrite64, lseek64, open64, and __open64 with version 2.2.
2221 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2223 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2225 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2227 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2228 nanosleep does not work either. Get absolute time inside the
2230 (pthread_cond_timedwait_relative_new): Likewise.
2231 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2233 2000-02-13 Andreas Jaeger <aj@suse.de>
2235 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2236 (pthread_cond_timedwait_relative_old): Likewise.
2238 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2240 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2241 but keep the code around. A bug in the kernel prevent us from
2243 (pthread_cond_timedwait_relative_new): Likewise.
2244 (PR libc/1597 and libc/1598).
2246 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2248 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2249 loop around nanosleep calls instead of around most of the function
2250 (pthread_cond_timedwait_relative_new): Likewise.
2251 body. Got rid of backwards goto and one local.
2253 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2255 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2256 before every nanosleep call to account for time spent in the rest
2258 (pthread_cond_timedwait_relative_new): Likewise.
2259 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2261 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2263 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2264 from nanosleep call so that in case we restart we only wait for the
2266 (pthread_cond_timedwait_relative_new): Likewise.
2267 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2269 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2271 * manager.c (pthread_allocate_stack): Compute guard page address
2272 correctly. Patch by HJ Lu.
2274 * sysdeps/pthread/pthread.h: Define
2275 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2277 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2279 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2280 preference handling.
2281 (pthread_rwlockattr_setkind_np): Allow
2282 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2283 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2285 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2287 * internals.h (pthread_readlock_info): New structure.
2288 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2289 p_untracked_readlock_count.
2290 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2291 Add initializers for new fields.
2292 * manager.c (pthread_free): Free read/write lock lists.
2293 * queue.h (queue_is_empty): New function.
2294 * rwlock.c: Implement requirements about when readers should get
2296 * sysdeps/pthread/pthread.h
2297 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2298 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2299 Define this name as well.
2300 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2302 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2304 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2305 Adjust initializers for struct _pthread_descr_struct change.
2306 * internals.h (struct _pthread_descr_struct): Move new elements to
2309 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2311 Redesigned how cancellation unblocks a thread from internal
2312 cancellation points (sem_wait, pthread_join,
2313 pthread_cond_{wait,timedwait}).
2314 Cancellation won't eat a signal in any of these functions
2315 (*required* by POSIX and Single Unix Spec!).
2316 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2317 simultaneous condition variable signal (not required by POSIX
2318 or Single Unix Spec, but nice).
2319 * spinlock.c: __pthread_lock queues back any received restarts
2320 that don't belong to it instead of assuming ownership of lock
2321 upon any restart; fastlock can no longer be acquired by two threads
2323 * restart.h: Restarts queue even on kernels that don't have
2324 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2325 avoiding a rare race condition in pthread_cond_timedwait.
2327 1999-12-31 Andreas Jaeger <aj@suse.de>
2329 * internals.h: Remove duplicate prototype declarations.
2331 * weaks.c: Remove __THROW from prototypes since the file is not
2332 compiled by a C++ compiler.
2333 * internals.h: Likewise.
2335 1999-12-30 Andreas Jaeger <aj@suse.de>
2337 * sysdeps/pthread/pthread.h: Move internal functions to...
2338 * sysdeps/pthread/bits/libc-lock.h: ...here.
2340 1999-12-29 Andreas Jaeger <aj@suse.de>
2342 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2344 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2346 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2349 * manager.c (__pthread_start): Add one more cast to prevent
2350 warning on 64bit machines.
2352 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2354 * manager.c (pthread_handle_create): Set p_pid of new thread
2355 before calling the callback function to report a new thread.
2357 1999-12-20 Andreas Jaeger <aj@suse.de>
2359 * pthread.c (pthread_initialize): Move getrlimit call after
2362 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2364 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2365 pwrite64, lseek64, open64, and __open64.
2366 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2367 pwrite64, lseek64, open64, and __open64.
2369 * manager.c (pthread_allocate_stack): Correct computation of
2370 new_thread_bottom. Correct handling of stack size and when the
2371 rlimit method to guard for stack growth is used.
2372 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2373 minus one pagesize (not two).
2375 1999-12-03 Andreas Jaeger <aj@suse.de>
2377 * Versions: Add __res_state with version GLIBC_2.2.
2379 * errno.c (__res_state): New function to return thread specific
2382 * pthread.c (pthread_initialize): Initialize p_resp.
2383 (__pthread_reset_main_thread): Also set p_resp.
2385 * manager.c (pthread_handle_create): Initialize p_resp.
2387 * internals.h: Add thread specific resolver state.
2388 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2390 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2392 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2394 * sysdeps/i386/i686/pt-machine.h: Likewise.
2395 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2397 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2399 * manager.c (pthread_start_thread_event): Initialize p_pid already
2402 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2404 * internals.h: Add prototype for __pthread_manager_event.
2405 * manager.c (__pthread_manager_event): New function.
2406 (pthread_start_thread_event): Correct computation of self.
2407 Use INIT_THREAD_SELF.
2408 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2409 (__pthread_initialize_manager): Respect event flags also for creation
2410 of the manager thread.
2412 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2414 * pthread.c (__pthread_initialize_manager): Initialize
2415 __pthread_manager_thread.p_tid.
2417 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2419 * internals.h: Declare __pthread_last_event.
2420 * manager.c: Define __pthread_last_event.
2421 (pthread_handle_create): Set __pthread_last_event.
2422 (pthread_exited): Likewise.
2423 * join.c (pthread_exit): Likewise.
2425 * Makefile (libpthread-routines): Add events.
2426 * events.c: New file.
2427 * internals.h: Protect against multiple inclusion.
2428 Include thread_dbP.h header.
2429 (struct _pthread_descr_struct): Add new fields p_report_events and
2431 Declare event reporting functions.
2432 * join.c (pthread_exit): Signal event if this is wanted.
2433 * manager.c (__pthread_threads_events): New variable.
2434 (pthread_handle_create): Take new parameters with event information.
2435 Signal TD_CREATE event if wanted.
2436 (__pthread_manager): Adjust pthread_handle_create call.
2437 (pthread_start_thread_event): New function. Block until manager is
2438 finished and then call pthread_start_thread.
2439 (pthread_exited): Signal TD_REAP event if wanted.
2441 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2443 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2445 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2447 1999-10-25 Andreas Jaeger <aj@suse.de>
2449 * internals.h: Remove K&R compatibility.
2450 * no-tsd.c: Likewise.
2451 * semaphore.h: Likewise.
2452 * signals.c: Likewise.
2453 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2454 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2455 * weaks.c: Likewise.
2457 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2459 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2460 pthread_handle_sigcancel with functions that restore %gs from the
2461 signal context. For each signal handling function, two wrappers
2462 are required, one for a non-RT signal and one for a RT signal.
2463 * signal.c: For i386, add code to restore %gs from the signal
2464 context in pthread_sighandler and pthread_sighandler_rt.
2466 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2468 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2470 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2472 * pthread.c (__pthread_initial_thread): Pass argument to
2473 PTHREAD_START_ARGS_INITIALIZER.
2474 (__pthread_manager_thread): Likewise.
2476 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2477 initialize function.
2479 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2481 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2483 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2485 * internals.h: Correct return types for __libc_read and __libc_write.
2487 1999-10-09 Andreas Jaeger <aj@suse.de>
2489 * internals.h: Add __new_sem_post to get prototype in
2490 manager.c; include semaphore.h for needed types.
2492 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2494 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2495 directly instead of calling sem_post which should not be necessary
2496 but is faster and might help in some case to work around problems.
2497 Patch by khendricks@ivey.uwo.ca [libc/1382].
2499 1999-10-08 Andreas Schwab <schwab@suse.de>
2501 * sysdeps/pthread/Subdirs: New file.
2504 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2506 * Implies: New file.
2507 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2508 * manager.c (pthread_handle_create): Initialize p_startfct.
2509 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2511 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2513 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2514 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2515 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2517 * condvar.c (pthread_cond_timedwait_relative): Never return with
2518 EINTR. Patch by Andreas Schwab.
2520 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2522 * signals.c (sigaction): Correct last patch. Don't select
2523 pthread_sighandler_rt based on the signal number but instead of
2524 the SA_SIGINFO flag.
2526 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2528 * specific.c: Move definitions of struct pthread_key_struct and
2529 destr_function to ...
2530 * internals.h: ...here.
2532 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2534 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2535 this instead of pthread_handle_sigrestart if the signal is an RT
2538 * signals.c: Handle passing through of sighandler arguments also
2539 for real-time signals.
2541 1999-09-03 Andreas Schwab <schwab@suse.de>
2543 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2545 (__vfork): New function, alias vfork.
2546 * Versions: Export __fork, vfork, and __vfork in libpthread.
2548 1999-08-23 Andreas Schwab <schwab@suse.de>
2550 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2551 call to signal handler.
2553 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2555 * pthread.c (__pthread_reset_main_thread): Undo last change.
2556 (__pthread_kill_other_threads_np): Reset signal handlers for the
2557 signals we used in the thread implementation here.
2559 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2561 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2562 for the signals we used in the thread implementation [PR libc/1234].
2564 * Versions: Export __pthread_kill_other_threads_np from libpthread
2567 * signals.c: Pass sigcontext through wrapper to the user function.
2569 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2571 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2572 __libc_internal_tsd_set.
2574 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2576 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2579 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2581 * internals.h: Align _pthread_descr_struct to 32 bytes.
2582 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2585 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2587 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2590 1999-07-09 Cristian Gafton <gafton@redhat.com>
2592 * Makefile (libpthread-routines): Add oldsemaphore routine.
2593 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2594 sem_trywait, and sem_wait to GLIBC_2.1.
2595 * oldsemaphore.c: New file.
2596 * semaphore.c: Add default_symbol_versions for the changed functions.
2597 (__new_sem_init): Rename from sem_init.
2598 (__new_sem_post): Rename from sem_post.
2599 (__new_sem_wait): Rename from sem_wait.
2600 (__new_sem_trywait): Rename from sem_trywait.
2601 (__new_sem_getvalue): Rename from sem_getvalue.
2602 (__new_sem_destroy): Rename from sem_destroy.
2604 1999-06-23 Robey Pointer <robey@netscape.com>
2606 * internals.h: Added p_nextlock entry to separate queueing for a
2607 lock from queueing for a CV (sometimes a thread queues on a lock
2608 to serialize removing itself from a CV queue).
2609 * pthread.c: Added p_nextlock to initializers.
2610 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2612 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2614 * manager.c (pthread_handle_create): Free mmap region after stack
2615 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2617 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2619 * man/pthread_cond_init.man: Correct example.
2620 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2622 * linuxthreads.texi (Condition Variables): Likewise.
2624 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2626 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2627 casx not cas, also successful casx returns the old value in rd
2628 and not the new value.
2630 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2632 * manager.c: If pthread_create() is given a NULL attribute
2633 and the thread manager runs with a realtime policy, set the
2634 scheduling policy of the newly created thread back to SCHED_OTHER.
2635 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2636 initialize the schedpolicy field of new_thread->p_start_args
2637 to that of the calling thread.
2639 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2641 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2642 instruction does not allow memory element to use offset.
2644 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2646 * manager.c (pthread_allocate_stack): Optimize initialization of new
2649 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2650 Don't use initializer since it is all zeroes.
2651 (__libc_once_define): Likewise.
2653 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2655 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2656 doesn't exist anymore.
2657 * sysdeps/i386/Implies: Likewise.
2658 * sysdeps/m68k/Implies: Likewise.
2659 * sysdeps/mips/Implies: Likewise.
2660 * sysdeps/powerpc/Implies: Likewise.
2661 * sysdeps/sparc/sparc32/Implies: Likewise.
2662 * sysdeps/sparc/sparc64/Implies: Likewise.
2664 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2666 * sysdeps/alpha/bits/semaphore.h: Removed.
2667 * sysdeps/powerpc/bits/semaphore.h: Removed.
2668 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2669 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2670 * Makefile (headers): Remove bits/semaphore.h.
2672 * semaphore.h: Define _pthread_descr if necessary.
2673 Don't include limits.h. Define SEM_VALUE_MAX directly.
2675 (sem_t): Protect element names with leading __.
2676 Add declarations for sem_close, sem_open, and sem_unlink.
2677 * semaphore.c: Adjust all functions for new element names.
2678 Define sem_close, sem_open, and sem_unlink.
2679 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2681 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2684 1999-03-16 H.J. Lu <hjl@gnu.org>
2686 * specific.c (pthread_key_delete): Check th->p_terminated to see
2687 if the thread is running.
2689 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2690 Added to GLIBC_2.0 for libc.so.
2692 1999-02-12 H.J. Lu <hjl@gnu.org>
2694 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2695 __libc_allocate_rtsig): Added to GLIBC_2.1.
2697 * internals.h (DEFAULT_SIG_RESTART): Removed.
2698 (DEFAULT_SIG_CANCEL): Removed.
2700 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2701 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2702 (__pthread_sig_restart, __pthread_sig_cancel,
2703 __pthread_sig_debug): Initialized.
2704 (pthread_initialize): Call init_rtsigs () to initialize
2707 1999-02-03 H.J. Lu <hjl@gnu.org>
2709 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2710 Don't restart the thread which sent REQ_DEBUG.
2711 (pthread_start_thread): Check if __pthread_sig_debug > 0
2714 * pthread.c (__pthread_initialize_manager): Suspend ourself
2715 after sending __pthread_sig_debug to gdb instead of
2716 __pthread_sig_cancel.
2718 1999-01-24 H.J. Lu <hjl@gnu.org>
2720 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2721 from mask if __pthread_sig_debug > 0.
2722 (pthread_handle_create): Increment __pthread_handles_num.
2724 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2725 * pthread.c (__pthread_initialize_manager): Likewise.
2727 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2728 instead of __libc_allocate_rtsig (2).
2729 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2730 instead of __pthread_sig_cancel.
2731 (pthread_handle_sigdebug): Fix comments.
2733 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2735 * manager.c (pthread_allocate_stack): Set
2736 __pthread_nonstandard_stacks if user-specified stack is used.
2738 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2740 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2741 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2743 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2745 * pthread.c: Use a third signal __pthread_sig_debug distinct
2746 from __pthread_sig_cancel to notify gdb when a thread is
2748 * manager.c: Likewise.
2749 * internals.h: Likewise.
2750 * signals.c: The implementation of sigwait(s) assumed that
2751 all signals in s have signal handlers already attached.
2752 This is not required by the standard, so make it work
2753 also if some of the signals have no handlers.
2755 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2757 * linuxthreads.texi: Remove pointers from first @node. Move old
2758 @node spec inside comment.
2760 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2762 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2765 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2767 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2768 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2770 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2772 * manager.c: Threads now send __pthread_sig_cancel on termination.
2773 Change clone call and signal masks.
2774 * thread.c (pthread_handle_sigrestart): Remove special code for
2776 (pthread_handle_sigcancel): In manager thread call
2777 __pthread_manager_sighandler.
2778 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2779 * sysdeps/i386/i686/pt-machine.h: Likewise.
2780 Patches by Xavier Leroy.
2782 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2784 * spinlock.c (__pthread_unlock): Don't crash if called for an
2785 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2787 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2790 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2792 * Examples/ex3.c: Wait until all threads are started before
2793 searching for the number to avoid race condition on very fast
2796 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2798 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2799 declaration since it's not needed.
2801 * sysdeps/pthread/pthread.h: Move internal functions to ...
2802 * internals.h: ...here.
2804 1998-12-02 H.J. Lu <hjl@gnu.org>
2806 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2807 SIGRTMIN is defined.
2808 (__pthread_sig_cancel): Likewise.
2810 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2812 * wrapsyscall.c: Include <sys/mman.h> for msync,
2813 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2814 Correct msync declaration.
2816 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2818 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2819 __libc_tsd_set): New macros for new interface.
2820 * no-tsd.c: New file, provide uninitialized defns of
2821 __libc_internal_tsd_get and __libc_internal_tsd_set.
2822 * Makefile (routines): Add no-tsd.
2824 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2826 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2827 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2828 __libc_internal_tsd_set): Move decls to ...
2829 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2832 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2833 __libc_internal_tsd_set): Make these pointers to functions, not
2834 functions; remove #pragma weak decls for them.
2835 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2836 Define static functions and initialized pointers to them.
2838 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2840 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2841 (CFLAGS-specific.c): Likewise.
2842 (CFLAGS-pthread.c): Likewise.
2843 (CFLAGS-ptfork.c): Likewise.
2844 (CFLAGS-cancel.c): Likewise.
2845 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2846 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2848 * mutex.c (pthread_mutex_init): Define as strong symbol.
2849 (pthread_mutex_destroy): Likewise.
2850 (pthread_mutex_trylock): Likewise.
2851 (pthread_mutex_lock): Likewise.
2852 (pthread_mutex_unlock): Likewise.
2853 (pthread_mutexattr_init): Likewise.
2854 (pthread_mutexattr_destroy): Likewise.
2855 (pthread_once): Likewise.
2856 * ptfork.c (pthread_atfork): Likewise.
2857 * specific.c (pthread_key_create): Likewise.
2858 (pthread_setspecific): Likewise.
2859 (pthread_getspecific): Likewise.
2861 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2863 * linuxthreads.texi: Fix punctuation after xref.
2865 1998-11-10 H.J. Lu <hjl@gnu.org>
2867 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2868 if it is defined in <linux/limits.h>.
2870 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2872 * spinlock.h (__pthread_trylock): Define inline.
2873 (__pthread_lock): Add extra parameter to declaration. Declare
2874 using internal_function.
2875 (__pthread_unlock): Declare using internal_function.
2876 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2877 of local variable self. Avoid recomputing self. Define using
2879 (__pthread_trylock): Remove.
2880 (__pthread_unlock): Define using internal_function.
2881 * cancel.c: Adjust for __pthread_lock interface change. Use already
2882 computed self value is possible.
2883 * condvar.c: Likewise.
2885 * manager.c: Likewise.
2886 * mutex.c: Likewise.
2887 * pthread.c: Likewise.
2888 * rwlock.c: Likewise.
2889 * semaphore.c: Likewise.
2890 * signals.c: Likewise.
2892 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2894 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2895 __ to field names of the struct.
2896 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2898 (pthread_attr_t): Likewise.
2899 (pthread_cond_t): Likewise.
2900 (pthread_condattr_t): Likewise.
2901 (pthread_mutex_t): Likewise.
2902 (pthread_mutexattr_t): Likewise.
2903 (pthread_rwlock_t): Likewise.
2904 (pthread_rwlockattr_t): Likewise.
2905 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2906 * cancel.c: Likewise.
2907 * condvar.c: Likewise.
2908 * manager.c: Likewise.
2909 * mutex.c: Likewise.
2910 * pthread.c: Likewise.
2911 * ptlongjmp.c: Likewise.
2912 * rwlock.c: Likewise.
2913 * spinlock.c: Likewise.
2915 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2917 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2920 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2923 * Makefile (libpthread-routines): Add pt-machine.
2924 * pt-machine.c: New file.
2925 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2926 yet defined. Use PT_EI in extern inline definitions.
2927 * sysdeps/arm/pt-machine.h: Likewise.
2928 * sysdeps/i386/pt-machine.h: Likewise.
2929 * sysdeps/i386/i686/pt-machine.h: Likewise.
2930 * sysdeps/m68k/pt-machine.h: Likewise.
2931 * sysdeps/mips/pt-machine.h: Likewise.
2932 * sysdeps/powerpc/pt-machine.h: Likewise.
2933 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2934 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2936 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2938 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2941 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2943 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2945 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2947 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2949 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2952 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2954 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2955 array index overflow.
2957 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2959 * sysdeps/pthread/semaphore.h: New file.
2961 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2963 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2964 _LIBC_TSD_KEY_DL_ERROR.
2966 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2968 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2969 * sysdeps/i386/pt-machine.h: Likewise.
2970 Suggested by Roland McGrath.
2972 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2974 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2975 access thread data with non-constant offsets.
2976 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2979 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2980 THREAD_SETMEM_NC definitions.
2982 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2984 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2986 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2988 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2989 not already defined.
2990 (struct _pthread_descr_struct): Add p_self and p_nr field.
2991 * manager.c (__pthread_handles): Define second element to point
2993 (__pthread_handles_num): Initialize to 2.
2994 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2995 (pthread_start_thread): Likewise.
2996 (pthread_handle_create): Start search for free slot at entry 2.
2997 Initialize new fields p_self and p_nr.
2998 Call __clone with CLONE_PTRACE if available.
2999 (pthread_free): Call FREE_THREAD_SELF if available.
3000 * pthread.c (__pthread_initial_thread): Initialize new fields.
3001 (__pthread_manager_thread): Likewise.
3002 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3004 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3005 elements of the thread descriptor.
3006 * condvar.c: Likewise.
3007 * errno.c: Likewise.
3009 * manager.c: Likewise.
3010 * pthread.c: Likewise.
3011 * ptlongjmp.c: Likewise.
3012 * semaphore.c: Likewise.
3013 * signals.c: Likewise.
3014 * specific.c: Likewise.
3015 * spinlock.c: Likewise.
3017 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3019 * sysdeps/i386/useldt.h: New file.
3020 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3022 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3023 THREAD_SETMEM using __thread_self.
3024 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3026 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3028 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3029 turned out that we didn't need to queue after all.
3031 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3033 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3034 and wastes space; correct types.
3036 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3038 * signals.c (sigaction): Handle NULL argument.
3040 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3042 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3045 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3047 * Makefile (linuxthreads-version): Extract correct number from
3050 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3052 * Banner: Bump version number to 0.8
3053 * FAQ.html: Many updates, in particular w.r.t. debugging.
3054 * manager.c: Support for non-default stacksize for
3055 LinuxThreads-allocated stacks;
3056 don't use guard pages for stacks with default size, rely on
3057 rlimit(RLIMIT_STACK) instead (it's cheaper).
3059 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3060 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3061 * condvar.c: Likewise.
3062 * internals.h: Likewise.
3063 * restart.h: Likewise.
3064 * signals.c: Likewise.
3065 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3067 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3069 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3070 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3071 * Versions: Put __pthread_mutexattr_settype under version
3072 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3073 __pthread_mutexattr_gettype.
3075 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3077 * sysdeps/pthread/bits/libc-lock.h: Make
3078 __pthread_mutexattr_settype weak. Don't make
3079 __pthread_mutexattr_setkind_np weak.
3081 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3083 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3084 call can succeed here.
3086 * mutex.c: Define __pthread_mutexattr_settype and make
3087 __pthread_mutexattr_setkind_np an alias.
3088 Likewise for __pthread_mutexattr_gettype.
3090 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3092 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3095 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3097 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3099 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3101 * Examples/ex6.c: Include <unistd.h> for usleep.
3103 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3105 * Examples/ex4.c (main): Use exit, not pthread_exit.
3107 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3109 * Versions: Add __pthread_mutexattr_gettype and
3110 __pthread_mutexattr_settype.
3111 * lockfile.c: Use __pthread_mutexattr_settype instead of
3112 __pthread_mutexattr_setkind_np.
3113 * mutex.c: Define __pthread_mutexattr_gettype and
3114 __pthread_mutexattr_settype.
3116 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3117 __pthread_mutexattr_settype.
3118 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3119 Use __pthread_mutexattr_settype.
3121 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3123 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3124 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3125 pthread_mutexattr_settype.
3126 * sysdeps/pthread/pthread.h: Declare these functions.
3127 Move pthread_sigmask and pthread_kill declaration in separate header.
3128 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3130 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3132 * Makefile: Add rules to compile and run tests.
3133 * Examples/ex1.c: Little changes to fix warnings.
3134 * Examples/ex2.c: Likewise.
3135 * Examples/ex3.c: Likewise.
3136 * Examples/ex4.c: Likewise.
3137 * Examples/ex5.c: Likewise.
3138 * Examples/ex6.c: New file.
3140 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3142 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3144 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3146 * attr.c: Include <string.h>.
3148 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3150 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3151 * internals.h: Include limits.h.
3152 * manager.c: Use memcpy to copy sched_param.
3153 * ptfork.c: Include errno.h.
3154 * pthread.c: Likewise.
3155 * semaphore.c: Likewise.
3156 * specific.c: Likewise.
3157 * spinlock.h: Likewise.
3158 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3159 type definition to ...
3160 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3162 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3164 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3166 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3167 as macros as demanded in POSIX.1, Annex C.
3169 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3171 * internals.h (struct pthread_request): For free use pthread_t
3172 instead of pthread_descr.
3173 * join.c (pthread_join): Pass thread_id, not th to manager.
3174 (pthread_detach): Likewise.
3175 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3176 (pthread_exited): Remove detached queue code.
3177 (pthread_handle_free): Expect thread ID parameter and use it to
3178 validate the thread decsriptor. Don't use detached queue.
3179 Patches by Xavier Leroy.
3181 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3183 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3184 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3185 __pthread_atfork, __pthread_key_create, __pthread_once.
3186 * internals.h: Doc fix.
3187 * pthread.c (__pthread_initialize): Define again.
3189 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3191 * manager.c (pthread_exited): If thread is not detached put it on
3193 (pthread_handle_free): If thread is not on list with living threads
3194 search on list with detached threads.
3196 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3197 for new definition of pthread_rwlock_t.
3199 * spinlock.c: Correct test whether to compile
3200 __pthread_compare_and_swap or not.
3202 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3204 * attr.c: Finish user stack support. Change locking code to be safe
3205 in situations with different priorities.
3206 * cancel.c: Likewise.
3207 * condvar.c: Likewise.
3208 * internals.h: Likewise.
3210 * manager.c: Likewise.
3211 * mutex.c: Likewise.
3212 * pthread.c: Likewise.
3213 * ptlongjmp.c: Likewise.
3214 * queue.h: Likewise.
3215 * rwlock.c: Likewise.
3216 * semaphore.c: Likewise.
3217 * semaphore.h: Likewise.
3218 * signals.c: Likewise.
3219 * spinlock.c: Likewise.
3220 * spinlock.h: Likewise.
3221 * sysdeps/pthread/pthread.h: Likewise.
3222 Patches by Xavier Leroy.
3224 * sysdeps/i386/i686/pt-machine.h: New file.
3226 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3228 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3229 [sg]et_stackaddr prototypes always available.
3231 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3232 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3234 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3236 * manager.c (pthread_free): Undo patch from 980430.
3237 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3239 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3241 * manager.c: Define __pthread_manager_adjust_prio and use it to
3242 increase priority when needed.
3243 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3244 * mutex.c: Optimize mutexes to wake up only one thread.
3245 * pthread.c: Move PID of manager for global variable in structure
3247 Patches by Xavier Leroy.
3249 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3251 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3253 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3255 * attr.c: Correct typo.
3257 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3259 * manager.c (pthread_free): Unmap guard before the stack.
3260 Patch by Matthias Urlichs.
3262 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3264 * manager.c (pthread_free): Detect already free child.
3265 Patch by Xavier Leroy, reported by Matthias Urlichs.
3267 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3269 * Makefile (linuxthreads-version): Renamed back from
3272 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3274 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3277 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3279 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3280 * internals.h: Add definitions for new spinlock implementation.
3281 * ptlongjmp.c: New file.
3282 * spinlock.c: New file.
3283 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3284 new function __pthread_acquire to prevent deadlocks with thread
3285 with different priorities.
3286 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3288 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3290 * manager.c (__pthread_manager): Reduce first argument to select
3291 to include just the needed file descriptor.
3293 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3295 * manager.c: Fix last patch which caused core dumps.
3297 * pthread.c: Correctly handle missing SIGRTMIN.
3299 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3301 * libpthread.map: Add __libc_internal_tsd_get and
3302 __libc_internal_tsd_set. Add missing cancelable functions. Export
3303 libc internal versions of the cancelable functions.
3305 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3307 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3309 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3311 * attr.c: Implement pthread_attr_[gs]etguardsize,
3312 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3313 Change pthread_attr_init to have two interfaces.
3314 * internals.h (struct _pthread_descr_struct): Add new fields for
3316 * libpthread.map: Add names in GLIBC_2.1 section.
3317 * manager.c (pthread_handle_create): Implement guardsize and
3319 (pthread_free): Likewise.
3320 * pthread.c (pthread_create): Add new interface for changed
3322 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3323 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3326 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3328 * manager.c: Enable resetting of the thread scheduling policy
3329 to SCHED_OTHER when the parent thread has a different one.
3331 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3333 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3334 _POSIX_ASYNCHRONOUS_IO.
3336 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3338 * mutex.c: Implement new mutex types.
3340 * internals.h: Include <signal.h>.
3342 * libpthread.map: Add __erno_location and __h_errno_location.
3344 * errno.c: Return pointer to variable actually in use. This might
3345 not be the one in the thread structure.
3346 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3348 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3349 of manager thread structure.
3350 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3352 * pthread.c: Adapt initializer for thread structures.
3353 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3354 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3355 current thread to global variables.
3357 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3359 * rwlock.c: New file.
3360 * Makefile (libpthread-routines): Add rwlock.
3361 * sysdeps/pthread/pthread.h: Define data structures and declare
3363 * libpthread.map: Add new functions.
3365 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3367 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3368 * sysdeps/arm/Implies: likewise.
3369 * README: Document it.
3371 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3373 * signals.c: Remove unneeded initializer for sigwaited, saving a
3376 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3378 * semaphore.c (sem_init): Set sem_spinlock only if available.
3380 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3382 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3383 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3385 * Makefile: Update from LinuxThreads 0.7.
3386 * internals.h. Likewise.
3387 * manager.c: Likewise.
3388 * mutex.c: Likewise.
3389 * pthread.c: Likewise.
3390 * signals.c: Likewise.
3391 * specific.c: Likewise.
3392 * Examples/ex3.c: Likewise.
3394 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3396 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3399 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3401 * wrapsyscall.c: Add socket functions which are also cancelation
3404 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3406 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3407 New functions for fast thread specific data within libc.
3409 * internals.h: Add new array p_libc_specific to struct
3410 _pthread_descr_struct.
3412 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3414 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3416 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3417 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3419 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3421 * internals.h (struct _pthread_descr_struct): Add definitions for
3422 two-level specific key handling.
3423 * manager.c (pthread_handle_create): Initialize specific memory array.
3424 * specific.c: Implement two-level key handling.
3425 * weaks.c: Don't provide dummy key handling.
3426 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3427 Add definition of __libc_key_t.
3428 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3430 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3431 PTHREAD_DESTRUCTOR_ITERATIONS.
3433 * manager.c (pthread_handle_create): Compare mmap result with
3436 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3437 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3439 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3441 sysdeps/sparc -> sysdeps/sparc/sparc32
3442 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3444 * internals.h: Change definition of THREAD_SELF to be an expression,
3445 not a statement that did a return.
3446 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3447 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3448 Follow Solaris and use a "system reserved" register (%g6) to hold
3449 the thread descriptor.
3450 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3452 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3454 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3455 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3456 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3458 * semaphore.c: Include spinlock.h only when needed.
3460 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3461 keys for entries not in use.
3463 * weaks.c: Implement key handling functions for real.
3465 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3467 Initial sparc64-linux support:
3468 * sysdeps/sparc64/Implies: New file.
3469 * sysdeps/sparc64/pt-machine.h: Likewise.
3471 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3473 * semaphore.c: Include spinlock.h at correct place.
3476 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3478 The Great Bit File Move:
3479 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3480 * sysdeps/powerpc/semaphorebits.h: Likewise.
3481 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3482 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3483 * sysdeps/pthread/libc-lock.h: -> bits/
3484 * sysdeps/pthread/stdio-lock.h: Likewise.
3485 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3486 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3487 * semaphore.h: Likewise.
3488 * sysdeps/pthread/pthread.h: Likewise.
3490 * lockfile.c: <foo.h> -> <bits/foo.h>.
3491 * semaphore.h: Likewise.
3493 * Makefile: (headers): foo.h -> bits/foo.h.
3494 * sysdeps/pthread/Makefile: Likewise.
3496 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3498 * semaphore.c (sem_init): Set sem_spinlock only if available.
3500 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3503 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3505 Update from LinuxThreads 0.6.
3507 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3508 and __sched_get_priority_min instead of names without `__'.
3510 * manager.c: Rewrite large parts to implement opaque pthread_t.
3512 * cancel.c: Adapt for opaque pthread_t type.
3513 * condvar.c: Likewise.
3514 * errno.c: Likewise.
3516 * mutex.c: Likewise.
3517 * pthread.c: Likewise.
3518 * signals.c: Likewise.
3519 * specific.c: Likewise.
3520 * restart.h: Likewise.
3521 * queue.h: Likewise.
3522 * Examples/ex3.c: Likewise.
3523 * Examples/ex4.c: Likewise.
3524 * sysdeps/pthread/pthread.h: Likewise.
3526 * pthread.c: Accumulate time for all threads in thread manager.
3528 * semaphore.c: Implement fallback implementation for architectures
3529 sometimes missing compare-exchange operations.
3531 * cancel.c (pthread_cancel): Validate handle argument.
3532 * join.c (pthread_join): Likewise.
3533 (pthread_detach): Likewise.
3534 * signals.c (pthread_kill): Likewise.
3536 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3538 * queue.h (enqueue): Enqueue thread according to priority.
3540 * internals.c (struct pthread_start_args): New struct for passing
3541 args to cloning function.
3542 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3545 * Examples/Makefile (clean): Pass -f option to rm.
3547 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3548 and define TEST_FOR_COMPARE_AND_SWAP.
3549 * sysdeps/i386/i486/pt-machine.h: Removed.
3551 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3554 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3556 * restart.h (suspend): Clear p_signal before suspending.
3557 (suspend_with_cancellation): Likewise.
3558 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3560 * weaks.c: Make __pthread_key_create return 1.
3561 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3562 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3563 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3566 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3568 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3570 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3572 * sysdeps/powerpc/Implies: Added.
3573 * sysdeps/powerpc/pt-machine.h: Added.
3574 * sysdeps/powerpc/semaphorebits.h: Added.
3576 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3578 * pthread.c (__pthread_initial_thread): Correct
3580 (__pthread_manager_thread): Likewise.
3581 Reported by Andreas Jaeger.
3583 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3585 Since sigset_t no longer fits in a register, we can't pass in the
3586 thread's initial mask so easily. Take this opportunity to simplify
3587 the clone implementation by only accepting a single void* argument.
3589 * manager.c (__pthread_manager): Put thread vitals in the thread
3590 struct instead of as arguments through clone.
3591 (pthread_start_thread): Look for them there.
3592 * internals.h (struct _pthread): Add p_initial_fn,
3593 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3594 * pthread.c (pthread_initialize_manager): Revise clone invocation.