1 2002-04-05 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
4 * sysdeps/alpha/pt-machine.h: Likewise.
5 * sysdeps/arm/pt-machine.h: Likewise.
6 * sysdeps/cris/pt-machine.h: Likewise.
7 * sysdeps/hppa/pt-machine.h: Likewise.
8 * sysdeps/m68k/pt-machine.h: Likewise.
9 * sysdeps/mips/pt-machine.h: Likewise.
10 * sysdeps/powerpc/pt-machine.h: Likewise.
11 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
12 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
13 * sysdeps/sh/pt-machine.h: Likewise.
14 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
15 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
16 * sysdeps/x86_64/pt-machine.h: Likewise.
18 2002-04-05 Jakub Jelinek <jakub@redhat.com>
20 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
21 instead of pthread_mutexattr_setkind_np.
22 (pthread_mutexattr_gettype): Similarly.
23 * man/pthread_mutexattr_setkind_np.man: New.
24 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
26 2002-04-02 Ulrich Drepper <drepper@redhat.com>
28 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
30 2002-03-22 Jakub Jelinek <jakub@redhat.com>
32 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
34 2002-03-22 Ulrich Drepper <drepper@redhat.com>
36 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
38 2002-03-17 Andreas Jaeger <aj@suse.de>
40 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
42 * sysdeps/alpha/pt-machine.h: Likewise.
43 * sysdeps/arm/pt-machine.h: Likewise.
44 * sysdeps/cris/pt-machine.h: Likewise.
45 * sysdeps/hppa/pt-machine.h: Likewise.
46 * sysdeps/i386/i686/pt-machine.h: Likewise.
47 * sysdeps/ia64/pt-machine.h: Likewise.
48 * sysdeps/m68k/pt-machine.h: Likewise.
49 * sysdeps/mips/pt-machine.h: Likewise.
50 * sysdeps/powerpc/pt-machine.h: Likewise.
51 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
52 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
53 * sysdeps/sh/pt-machine.h: Likewise.
54 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
55 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
56 * sysdeps/x86_64/pt-machine.h: Likewise.
58 * internals.h: Move testandset and __compare_and_swap prototypes
61 2002-03-03 Andreas Jaeger <aj@suse.de>
63 * errno.c: Include resolv.h to avoid warning.
65 2002-02-27 Ulrich Drepper <drepper@redhat.com>
67 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
70 2002-02-23 Ulrich Drepper <drepper@redhat.com>
72 * attr.c (pthread_getattr_np): Don't take thread descriptor size
73 into account if USE_TLS.
74 * manager.c (pthread_handle_create): Free TLS data structures if call
75 failed. Pass correct stack to clone if USE_TLS.
76 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
77 * sysdeps/i386/i686/pt-machine.h: Likewise.
78 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
80 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
81 Add p_stackaddr element #if USE_TLS.
82 * internals.c: Include <tls.h>.
83 * manager.c: Integrate creating and handling of thread descriptor
85 * pthread.c: Likewise.
86 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
87 Include <linuxthreads/descr.h> only if TLS is really used.
89 (TLS_INIT_TP): Initialize self pointer.
91 2002-02-17 Andreas Schwab <schwab@suse.de>
93 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
96 2002-02-12 Ulrich Drepper <drepper@redhat.com>
98 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
99 (INSTALL_DTV): Adjust for being passed pointer to element with length.
101 2002-02-08 Ulrich Drepper <drepper@redhat.com>
103 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
105 2002-02-08 Richard Henderson <rth@redhat.com>
107 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
109 2002-02-08 Ulrich Drepper <drepper@redhat.com>
111 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
114 2002-02-07 H.J. Lu <hjl@gnu.org>
116 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
118 (__pthread_spin_lock): Remove ".set noreorder".
119 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
121 2002-02-05 H.J. Lu <hjl@gnu.org>
123 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
125 * sysdeps/mips/pt-machine.h (testandset): Likewise.
126 (__compare_and_swap): Likewise.
128 2002-02-07 Ulrich Drepper <drepper@redhat.com>
130 * internals.h: Move declarations/definitions of
131 __pthread_initial_thread_bos, __pthread_initial_thread,
132 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
133 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
134 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
136 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
137 Define THREAD_GETMEM accordingly.
139 2002-02-06 Ulrich Drepper <drepper@redhat.com>
141 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
143 * sysdeps/i386/tls.h: Define THREAD_DTV.
145 2002-02-04 Ulrich Drepper <drepper@redhat.com>
147 * internals.h: Move thread descriptor definition...
148 * descr.h.: ...here. New file.
149 * sysdeps/i386/tls.h: New file.
151 2002-02-01 H.J. Lu <hjl@gnu.org>
153 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
154 different register in the delayed slot. Use branch likely.
156 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
157 (__compare_and_swap): Return 0 only when failed to compare. Use
160 2002-02-01 Jakub Jelinek <jakub@redhat.com>
162 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
163 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
164 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
165 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
166 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
167 * sysdeps/sparc/sparc64/Versions: New file.
168 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
170 2002-01-31 Ulrich Drepper <drepper@redhat.com>
172 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
173 in SHARED code, use GL(dl_cpuclock_offset).
175 2002-01-28 Andreas Jaeger <aj@suse.de>
177 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
178 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
180 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
182 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
183 (CURRENT_STACK_FRAME): Remove duplicate definition.
184 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
186 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
188 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
191 2002-01-12 Andreas Schwab <schwab@suse.de>
193 * Makefile (test-srcs): Add tst-signal.
194 (tests): Run tst-signal.
195 (distribute): Add tst-signal.sh.
196 * tst-signal.c, tst-signal.sh: New files.
198 2002-01-14 Andreas Jaeger <aj@suse.de>
200 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
202 2002-01-11 Andreas Schwab <schwab@suse.de>
204 * signals.c (sighandler): Initialize all elements to SIG_ERR.
205 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
207 2002-01-06 Richard Henderson <rth@redhat.com>
209 * sysdeps/alpha/elf/pt-initfini.c: New file.
211 2001-12-29 Andreas Jaeger <aj@suse.de>
213 * Examples/ex9.c: Add noreturn attribute for thread.
214 * Examples/ex10.c: Likewise.
215 * Examples/ex13.c (thread_start): Likewise.
216 * Examples/ex15.c (worker): Likewise.
218 * Examples/ex18.c: Include unistd.h for prototype of sleep.
220 2001-12-14 Ulrich Drepper <drepper@redhat.com>
222 * man/pthread_atfork.man: Adjust description of mutex handling
223 after fork for current implementation.
224 * linuxthreads.texi: Likewise [PR libc/2519].
226 2001-12-13 Andreas Schwab <schwab@suse.de>
228 * specific.c (pthread_key_delete): Don't contact the thread
229 manager if no threads have been created yet.
231 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
233 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
234 qualifier to be safe.
236 2001-11-30 Andreas Schwab <schwab@suse.de>
238 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
239 that self is the manager thread, and initialize the thread
241 (thread_self_stack) [THREAD_SELF]: New function to find self via
243 * manager.c (pthread_handle_create): Don't block cancel signal any
246 2001-11-29 Andreas Jaeger <aj@suse.de>
248 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
250 (INIT_THREAD_SELF): New.
251 (THREAD_GETMEM): New.
253 (THREAD_SETMEM): New.
254 (THREAD_SETMEM_NC): New.
255 (FLOATING_STACKS): Define.
256 (ARCH_STACK_MAX_SIZE): Define.
258 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
260 Bugfix to pthread_key_delete. It was iterating over the thread
261 manager's linked list of threads, behind the thread manager's
262 back causing a race. The fix is to have the manager iterate over
263 the threads instead, using a new request type for doing so.
264 * internals.h (struct pthread_request): New manager request type
266 * manager.c (pthread_for_each_thread): New function.
267 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
268 * specific.c (struct pthread_key_delete_helper_args): New type.
269 (pthread_key_delete_helper): New static function.
270 (pthread_key_delete): Use the new thread manager
271 REQ_FOR_EACH_THREAD function to iterate over the threads and set
272 the delete key slot to a null value in each thread.
273 * Examples/ex18.c: New test.
274 * Makefile (tests): Add ex18.
276 2001-11-22 Wolfram Gloger <wg@malloc.de>
278 * pthread.c (pthread_onexit_process): Don't call free
279 after threads have been asynchronously terminated.
281 * manager.c (pthread_handle_exit): Surround cancellation
282 of threads with __flockfilelist()/__funlockfilelist().
284 2001-11-26 Andreas Schwab <schwab@suse.de>
286 * manager.c (pthread_handle_create): Start the child thread with
287 the cancel signal blocked, so that it does not handle it before
288 the thread register is set up. Save errno from failed clone call.
290 2001-11-15 Ulrich Drepper <drepper@redhat.com>
292 * sysdeps/i386/i686/Implies: Removed.
293 * sysdeps/i386/i686/Versions: New file.
295 2001-10-31 Andreas Jaeger <aj@suse.de>
297 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
299 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
301 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
302 to __linuxthreads_pthread_sizeof_descr to match name used by
303 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
304 linuxthreads_db/td_symbol_list.c.
306 2001-09-22 Andreas Jaeger <aj@suse.de>
308 * linuxthreads/tst-context.c: Avoid compile warning.
310 2001-09-20 Andreas Jaeger <aj@suse.de>
312 * shlib-versions: Add x86-64.
314 2001-09-19 Andreas Jaeger <aj@suse.de>
316 * sysdeps/x86_64/Makefile: New file.
317 * sysdeps/x86_64/pspinlock.c: New file.
318 * sysdeps/x86_64/pt-machine.h: New file.
320 2001-09-12 Jakub Jelinek <jakub@redhat.com>
322 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
324 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
326 2001-09-11 Ulrich Drepper <drepper@redhat.com>
327 Wolfram Gloger <wg@malloc.de>
329 * join.c: Protect all communications from and to manager with
331 * manager.c: Likewise.
332 * pthread.c: Likewise.
333 * smeaphore.c: Likewise.
335 2001-08-29 Ulrich Drepper <drepper@redhat.com>
337 * spinlock.c (__pthread_lock): Top max_count value with
338 MAX_ADAPTIVE_SPIN_COUNT.
339 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
341 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
344 2001-08-27 Jakub Jelinek <jakub@redhat.com>
346 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
347 non-opaque type if __USE_UNIX98.
349 2001-08-26 Jakub Jelinek <jakub@redhat.com>
351 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
352 non-opaque lock types also if _IO_MTSAFE_IO is defined.
354 2001-08-23 Roland McGrath <roland@frob.com>
356 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
357 new first argument, skip the cleanup handler if it's zero.
358 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
359 (__libc_lock_define_initialized_recursive): Use it.
360 * sysdeps/pthread/bits/stdio-lock.h: File removed.
361 The sysdeps/generic file from the main tree now suffices.
363 2001-08-22 Roland McGrath <roland@frob.com>
365 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
366 instead of <pthread.h>.
367 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
368 (_IO_lock_initializer): Add braces.
369 (_IO_lock_lock): Use __libc_lock_lock_recursive.
370 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
372 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
373 (__libc_lock_define_initialized_recursive): Use it.
374 (__libc_lock_init_recursive): Likewise.
375 (__libc_lock_fini_recursive): Likewise.
376 (__libc_lock_lock_recursive): Likewise.
377 (__libc_lock_trylock_recursive): Likewise.
378 (__libc_lock_unlock_recursive): Likewise.
379 (__libc_lock_define_recursive): New macro.
381 2001-08-14 Jakub Jelinek <jakub@redhat.com>
383 * lockfile.c (__pthread_provide_lockfile): New variable.
384 * pthread.c (__pthread_require_lockfile): New variable.
385 * cancel.c (__pthread_require_lockfile): New variable.
387 2001-07-31 Ulrich Drepper <drepper@redhat.com>
389 * tst-context.c (threadfct): Initialize context before calling
392 * Examples/ex17.c: Make sure test thread is around long enough.
394 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
396 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
398 2001-07-24 Ulrich Drepper <drepper@redhat.com>
400 * tst-context.c (main): Print explanation before bailing out
401 because context handling is not supported.
403 2001-07-23 Ulrich Drepper <drepper@redhat.com>
405 * Makefile (tests): Add tst-context.
406 * tst-context.c: New file.
408 * sysdeps/pthread/bits/stdio-lock.h: Define
409 _IO_cleanup_region_start_noarg.
411 2001-07-23 Jakub Jelinek <jakub@redhat.com>
413 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
414 (ARCH_STACK_MAX_SIZE): Define.
415 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
416 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
418 2001-07-19 Jakub Jelinek <jakub@redhat.com>
420 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
422 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
423 (ARCH_STACK_MAX_SIZE): Define.
424 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
425 NEED_SEPARATE_REGISTER_STACK.
427 2001-07-16 Andreas Schwab <schwab@suse.de>
429 * Makefile (before-compile): Don't add $(objpfx)crti.o.
430 (omit-deps): Add crti.
431 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
432 it is filtered out of the link command.
434 2001-07-16 Ulrich Drepper <drepper@redhat.com>
436 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
437 to find the right value for __pthread_initial_thread_bos, it's not
438 used. If not FLOATING_STACKS first run
439 __pthread_init_max_stacksize.
441 2001-06-16 H.J. Lu <hjl@gnu.org>
443 * internals.h: Include <stackinfo.h>.
445 * attr.c: Don't include <stackinfo.h> here.
446 * cancel.c: Likewise.
447 * manager.c: Likewise.
448 * pthread.c: Likewise.
449 * ptlongjmp.c: Likewise.
451 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
453 * attr.c: Make _STACK_GROWS_UP work.
454 * internals.h: Likewise.
455 * manager.c: Likewise.
456 * pthread.c: Likewise.
458 2001-06-15 H.J. Lu <hjl@gnu.org>
460 * pthread.c (__pthread_reset_main_thread): Fix a typo.
462 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
464 * semaphore.h: Use struct _pthread_fastlock as an element of
465 sem_t instead of an identical struct.
466 * rwlock.c: Remove casts.
467 * semaphore.c: Likewise.
469 2001-04-30 Alan Modra <amodra@one.net.au>
471 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
473 2001-05-25 Bruce Mitchener <bruce@cubik.org>
475 * linuxthreads.texi: Spelling corrections.
477 2001-05-25 Ulrich Drepper <drepper@redhat.com>
479 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
480 returning successfully.
481 Patch by Gene Cooperman <gene@ccs.neu.edu>.
483 2001-05-24 Ulrich Drepper <drepper@redhat.com>
485 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
486 serious work try once whether the lock is uncontested.
487 Remove duplicate reading of __status before loop.
488 Change suggested by Hans Boehm <hans_boehm@hp.com>.
490 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
491 (__pthread_alt_trylock): Likewise.
493 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
495 Memory barrier overhaul following line by line inspection.
496 * mutex.c (pthread_once): Missing memory barriers added.
497 * pthread.c (__pthread_wait_for_restart_signal,
498 __pthread_timedsuspend_new, __pthread_restart_new): Added
499 memory barriers ``just in case'' and for documentary value.
500 * spinlock.c (__pthread_release): New inline function for releasing
501 spinlock, to complement __pthread_acquire. Includes memory
502 barrier prior to assignment to spinlock, and __asm __volatile
503 dance to prevent reordering or optimization of the spinlock access.
504 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
505 __pthread_alt_timedlock, __pthread_alt_unlock,
506 __pthread_compare_and_swap): Updated to use new __pthread_release
507 instead of updating spinlock directly.
508 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
509 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
510 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
511 Memory barrier overhaul. Lots of missing memory barriers added,
512 a couple needless ones removed.
513 * spinlock.c (__pthread_compare_and_swap): testandset optimization
514 removed, just calls __pthread_acquire, which has the new read
515 barrier in it before its testandset.
517 2001-05-20 Roland McGrath <roland@frob.com>
519 * Makeconfig: New file, variables used to be in main libc Makeconfig.
521 2001-05-09 Geoff Keating <geoffk@redhat.com>
523 * sysdeps/powerpc/pt-machine.h
524 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
525 (__compare_and_swap): Remove memory barriers.
526 (__compare_and_swap_with_release_semantics): New function.
528 2001-04-24 Andreas Jaeger <aj@suse.de>
530 * wrapsyscall.c: send* and recv* return ssize_t.
532 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
533 mutex instead of double locking it.
534 Reported by Pierre Artaud <partaud@sodatec.com>.
536 2001-04-23 Ulrich Drepper <drepper@redhat.com>
538 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
539 using #ifdef whether the clock is available.
540 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
542 * sysdeps/ia64/Versions: New file.
544 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
545 have to call __gmon_start__ in the libpthread DSO.
546 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
548 * Makefile (libpthread-routines): Add ptclock_gettime and
550 * internals.h: Don't use cpuclock-init.h definitions, use
551 hp-timing.h definitions.
552 * pthread.c: Likewise.
553 * manager.c: Likewise.
554 * ptclock_gettime.c: New file.
555 * ptclock_settime.c: New file.
556 * internals.h: Fix parameter type for __pthread_clock_gettime and
557 __pthread_clock_settime.
559 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
560 * sysdeps/i386/i586/ptclock_settime.c: Removed.
561 * sysdeps/i386/i586/Makefile: Removed.
563 2001-04-22 Ulrich Drepper <drepper@redhat.com>
565 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
566 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
568 2001-04-21 Andreas Jaeger <aj@suse.de>
570 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
571 attribute, remove statements that will never be executed.
572 (thread_func): Remove mutex_unlock call since it's never executed.
573 (thread_func): Fix comment as suggested by Jakub Jelinek.
575 * manager.c (__pthread_manager): Add noreturn
577 (pthread_start_thread): Likewise, remove return statement.
578 (pthread_start_thread_event): Likewise.
579 Add noreturn attribute for pthread_handle_exit.
580 * weaks.c: Add noreturn attribute for pthread_exit.
582 * internals.h: Add __pthread_clock_gettime and
583 __pthread_clock_settime prototypes.
585 2001-04-21 Ulrich Drepper <drepper@redhat.com>
587 * internals.h: Include <cpuclock-init.h>.
588 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
589 CPUCLOCK_VARDEF is defined.
590 * pthread.c (__pthread_initialize_minimal): Initialize
591 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
592 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
593 for new thread to current CPU clock value.
595 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
597 * sysdeps/i386/i586/Makefile: New file.
598 * sysdeps/i386/i586/Versions: New file.
599 * sysdeps/i386/i586/ptclock_gettime.c: New file.
600 * sysdeps/i386/i586/ptclock_settime.c: New file.
601 * sysdeps/i386/i686/Implies: New file.
603 2001-04-18 Jakub Jelinek <jakub@redhat.com>
605 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
606 $generated, not $postclean-generated.
608 2001-04-18 Andreas Jaeger <aj@suse.de>
610 * Makefile (otherlibs): Added.
612 2001-04-18 Jakub Jelinek <jakub@redhat.com>
614 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
616 2001-04-16 Ulrich Drepper <drepper@redhat.com>
618 * signals.c (sigwait): NSIG is no signal number. Block all
619 signals while in signal handler for signals in SET.
620 Patch by Manfred Spraul <manfred@colorfullife.com>.
622 2001-04-12 Ulrich Drepper <drepper@redhat.com>
624 * tst-cancel.c: Disable most tests. Add new test where all
625 cleanup handlers must run.
626 * Makefile (tests): Add tst-cancel again.
628 * cancel.c (__pthread_perform_cleanup): Correct condition for
629 leaving cleanup loop early.
631 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
632 all the files which use CURRENT_STACK_FRAME.
633 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
634 __builtin_frame_address.
635 * sysdeps/i386/i686/pt-machine.h: Likewise.
637 2001-04-11 Ulrich Drepper <drepper@redhat.com>
639 * Makefile (tests): Comment out tst-cancel for now.
641 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
642 temporary file in object directory.
643 * Makefile: Don't allow inlining when compiling tst-cancel.c.
644 Pass $(objpfx) to tst-cancel.
646 2001-04-11 David S. Miller <davem@redhat.com>
648 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
649 up closer to user local variables so that new cleanup heuristics work.
650 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
652 2001-04-11 Ulrich Drepper <drepper@redhat.com>
654 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
656 (_pthread_cleanup_push_defer): Likewise.
658 * tst-cancel.c (main): Fix loop printing cleanup output.
660 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
662 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
664 (__pthread_spin_trylock): Likewise.
665 * sysdeps/sh/pt-machine.h (testandset): Likewise.
667 2001-04-10 Ulrich Drepper <drepper@redhat.com>
669 * join.c (pthread_exit): Move code to new function __pthread_do_exit
670 which takes an extra parameter with the current frame pointer.
671 Call new function with CURRENT_STACK_FRAME.
672 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
673 with the new parameter.
674 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
675 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
676 this parameter as the initial value the cleanup handler records are
677 compared against. No active cleanup handler record must have an
678 address lower than the previous one and the initial record must be
679 above (below on PA) the frame address passed in.
680 (pthread_setcancelstate): Call __pthread_do_exit instead of
682 (pthread_setcanceltype): Likewise.
683 (pthread_testcancel): Likewise.
684 (_pthread_cleanup_pop_restore): Likewise.
685 * condvar.c (pthread_cond_wait): Likewise.
686 (pthread_cond_timedwait_relative): Likewise.
687 * manager.c (pthread_start_thread): Likewise.
688 * oldsemaphore.c (__old_sem_wait): Likewise.
689 * pthread.c (pthread_handle_sigcancel): Likewise.
690 * semaphore.c (__new_sem_wait): Likewise.
691 (sem_timedwait): Likewise.
692 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
693 to limit the cleanup handlers which get run.
694 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
695 for __pthread_perform_cleanup.
697 * Makefile (tests): Add tst-cancel.
698 * tst-cancel.c: New file.
700 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
702 * sysdeps/cris/pt-machine.h: New file.
703 * sysdeps/cris/pspinlock.c: New file.
705 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
707 * shlib-versions: Add case for Linux on CRIS.
709 2001-03-26 Ulrich Drepper <drepper@redhat.com>
711 * attr.c (pthread_getattr_np): Correct computation of stack size
712 for machiens with register stack.
714 * Examples/ex17.c (main): Correct detection of failed mmap call.
716 2001-03-21 Jakub Jelinek <jakub@redhat.com>
718 * pthread.c (__pthread_initialize_manager): Fix a typo.
720 2001-03-21 Jakub Jelinek <jakub@redhat.com>
722 * attr.c (__pthread_attr_setstack): Fix alignment check.
723 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
724 * Makefile (tests): Add ex17 test.
725 * Examples/ex17.c: New test.
727 2001-03-20 Ulrich Drepper <drepper@redhat.com>
729 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
730 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
731 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
733 2001-03-18 Ulrich Drepper <drepper@redhat.com>
735 * Makefile: When generating DSO link with libc_nonshared.a.
737 2001-02-26 Jakub Jelinek <jakub@redhat.com>
739 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
741 2001-02-23 Jakub Jelinek <jakub@redhat.com>
743 * internals.h (__pthread_init_max_stacksize): New prototype.
744 * attr.c (__pthread_attr_setstacksize): Call
745 __pthread_init_max_stacksize if not yet initialized.
746 * pthread.c (__pthread_init_max_stacksize): New function.
747 (__pthread_initialize_manager): Call it.
748 Patch by <dtc@cmucl.cons.org>.
750 2001-03-16 Ulrich Drepper <drepper@redhat.com>
752 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
754 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
756 * shlib-versions: Add rule for Linux on 64 bit S/390.
757 * sysdeps/s390/s390-64/pt-machine.h: New file.
758 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
760 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
762 * sysdeps/s390/pt-machine.h: Move to...
763 * sysdeps/s390/s390-32/pt-machine.h: ...here.
764 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
766 2001-03-15 Ulrich Drepper <drepper@redhat.com>
768 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
769 * attr.c: Implement pthread_getattr_np.
770 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
771 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
772 * manager.c (pthread_handle_create): Initialize p_inheritsched.
774 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
776 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
779 2001-02-20 Hans Boehm <hans_boehm@hp.com>
781 * manager.c (manager_mask): Removed static vesion. Now always local
782 to __pthread_manager().
783 (manager_mask_all): Removed completely.
784 (__pthread_manager): Remove manager_mask_all initialization.
785 (pthread_handle_create): Remove code to set and reset signal mask
786 around __clone2() calls.
788 2001-02-17 Jakub Jelinek <jakub@redhat.com>
790 * spinlock.c (__pthread_lock): Force lock->__status to be read from
791 memory on every spin.
793 2001-02-10 Andreas Jaeger <aj@suse.de>
795 * Makefile (extra-objs): New.
797 2001-02-09 Jakub Jelinek <jakub@redhat.com>
799 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
800 __pthread_initialize_minimal prototype.
802 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
804 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
806 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
808 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
810 2001-02-06 Ulrich Drepper <drepper@redhat.com>
812 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
813 broken code. Patch by Jes Sorensen.
815 2001-02-06 Andreas Jaeger <aj@suse.de>
817 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
819 * internals.h: ...here.
821 2001-02-05 Jes Sorensen <jes@linuxcare.com>
823 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
825 2001-02-02 Ulrich Drepper <drepper@redhat.com>
827 * Versions: Remove __pthread_initialize_minimal.
829 2001-02-01 Ulrich Drepper <drepper@redhat.com>
831 * Makefile: Add rules to build crti.o and make it being used in
832 building libpthread.so.
833 * sysdeps/i386/Makefile: New file.
834 * sysdeps/pthread/pt-initfini.c: New file.
836 * pthread.c: Cleanups.
838 2001-01-28 Andreas Jaeger <aj@suse.de>
840 * oldsemaphore.c (__old_sem_init): Adjust for last change.
841 * sysdeps/pthread/bits/libc-lock.h: Likewise.
842 * spinlock.c: Likewise.
844 2001-01-28 Ulrich Drepper <drepper@redhat.com>
846 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
847 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
848 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
849 * pthread.c: Likewise.
850 * spinlock.h: Likewise.
851 * sysdeps/pthread/pthread.h: Likewise.
853 2001-01-26 Ulrich Drepper <drepper@redhat.com>
855 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
856 as struct __pthread_attr_s.
858 * semaphore.h (sem_t): Cleanup namespace, rename status and
861 2001-01-13 Jakub Jelinek <jakub@redhat.com>
863 * pthread.c (pthread_onexit_process): Clear
864 __pthread_manager_thread_bos after freeing it.
865 * Makefile (tests): Add ex16.
866 * Examples/ex16.c: New file.
868 2001-01-11 Jakub Jelinek <jakub@redhat.com>
870 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
872 * pthread.c (pthread_exit_process): Rename to...
873 (pthread_onexit_process): ...this.
874 (pthread_atexit_process, pthread_atexit_retcode): New.
875 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
876 and only if HAVE_Z_NODELETE is not defined.
877 (__pthread_initialize_manager): Register pthread_atexit_retcode
880 2001-01-11 Ulrich Drepper <drepper@redhat.com>
882 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
884 2001-01-11 Jakub Jelinek <jakub@redhat.com>
886 * Makefile (tests): Add ex15.
887 * Examples/ex15.c: New test.
889 2001-01-08 Ulrich Drepper <drepper@redhat.com>
891 * pthread.c (pthread_exit_process): Free memory allocated for
894 2000-12-31 Ulrich Drepper <drepper@redhat.com>
896 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
897 (pthread_free): Always unmap the stack. It's safe now that we don't
898 use MAP_FIXED to allocate stacks.
900 2000-12-31 Ulrich Drepper <drepper@redhat.com>
902 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
904 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
906 2000-11-15 Wolfram Gloger <wg@malloc.de>
908 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
909 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
911 2000-12-27 Andreas Jaeger <aj@suse.de>
913 * Examples/ex13.c: Make local functions static.
914 * ecmutex.c: Likewise.
915 * joinrace.c: Likewise.
916 * Examples/ex14.c: Likewise.
918 * Examples/ex2.c: Make local functions static; reformat.
919 * Examples/ex1.c: Likewise.
920 * Examples/ex4.c: Likewise.
921 * Examples/ex5.c: Likewise.
922 * Examples/ex7.c: Likewise.
924 * oldsemaphore.c: Add prototypes to shut up GCC.
925 * pt-machine.c: Likewise.
927 * weaks.c: Add prototype for pthread_exit.
929 * internals.h: Add some prototypes, format prototypes and add
931 Move __libc_waitpid prototype to include/sys/wait.h.
933 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
935 * specific.c: Likewise.
936 * ptfork.c: Likewise.
938 * lockfile.c: Include internals.h to get prototypes.
939 * events.c: Likewise.
940 * sysdeps/alpha/pspinlock.c: Likewise.
941 * sysdeps/arm/pspinlock.c: Likewise.
942 * sysdeps/hppa/pspinlock.c: Likewise.
943 * sysdeps/i386/pspinlock.c: Likewise.
944 * sysdeps/ia64/pspinlock.c: Likewise.
945 * sysdeps/m68k/pspinlock.c: Likewise.
946 * sysdeps/mips/pspinlock.c: Likewise.
947 * sysdeps/powerpc/pspinlock.c: Likewise.
948 * sysdeps/s390/pspinlock.c: Likewise.
949 * sysdeps/sh/pspinlock.c: Likewise.
950 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
951 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
952 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
954 2000-12-27 Ulrich Drepper <drepper@redhat.com>
956 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
957 (__pthread_attr_getstack): Return correct address.
958 Add warnings for using pthread_attr_getstackaddr and
959 pthread_attr_setstackaddr.
961 2000-12-26 Ulrich Drepper <drepper@redhat.com>
963 * Examples/ex6.c (test_thread): Make static.
964 * Examples/ex12.c (test_thread): Make static and add noreturn
967 2000-12-18 Jes Sorensen <jes@linuxcare.com>
969 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
970 and compare_and_swap_with_release_semantics returns int not long.
972 2000-12-17 Andreas Jaeger <aj@suse.de>
974 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
976 * sysdeps/arm/pt-machine.h (testandset): Likewise.
977 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
978 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
979 * sysdeps/sh/pt-machine.h (testandset): Likewise.
980 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
981 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
983 2000-12-17 Ulrich Drepper <drepper@redhat.com>
985 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
986 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
988 2000-12-17 Andreas Jaeger <aj@suse.de>
990 * internals.h: Add prototypes for testandset and
991 __compare_and_swap to shut up gcc warnings.
993 2000-12-06 Wolfram Gloger <wg@malloc.de>
995 * join.c (pthread_detach): Allow case where the thread has already
998 2000-12-05 Andreas Jaeger <aj@suse.de>
1000 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1001 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1002 (__compare_and_swap): Likewise.
1003 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1005 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1007 * Examples/ex3.c (main): Cast int to long before casting to void *.
1008 (search): Cast void * to long, not int.
1009 * Examples/ex8.c (main, thread): Similarly.
1010 * Examples/ex11.c (main): Similarly.
1011 * Examples/ex14.c (worker, do_test): Similarly.
1012 * ecmutex.c (worker, do_test): Similarly.
1013 (nlocks): Cast to int.
1015 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1017 * linuxthreads.texi: Add documentation for pthreads attributes
1018 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1019 patch. Document pthread_[sg]etconcurrency(). Mark
1020 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1022 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1024 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1026 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1027 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1029 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1031 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1032 not doing it right now.
1033 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1035 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1037 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1040 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1042 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1043 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1045 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1046 discussing mutexes. (As per the Unix98 name for the API.)
1047 Changes documentation for pthread_mutexattr_setkind_np() and
1048 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1049 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1050 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1051 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1052 Begins to introduce discussion of the ``timed'' mutex type. This
1053 discussion is currently incomplete.
1054 Patch by Bruce Mitchener <bruce@cubik.org>.
1056 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1057 Yutaka Niibe <gniibe@chroot.org>
1059 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1060 has restrictions, use register.
1062 2000-10-23 Andreas Schwab <schwab@suse.de>
1064 * Examples/ex14.c (TIMEOUT): Override default timeout.
1066 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1068 * specific.c: Protect tsd array modification in thread data
1069 structures by getting the thread lock in pthread_key_delete and
1070 __pthread_destroy_specifics.
1071 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1073 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1075 * sysdeps/pthread/bits/initspin.h: New file.
1076 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1077 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1078 (__pthread_alt_init_lock): Likewise.
1079 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1081 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1083 * oldsemaphore.c (__old_sem_init): Release lock with
1084 LT_SPINLOCK_INIT, not zero.
1085 * spinlock.c (__pthread_unlock): Likewise.
1086 (__pthread_alt_lock): Likewise.
1087 (__pthread_alt_timedlock): Likewise.
1088 (__pthread_alt_unlock): Likewise.
1089 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1090 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1091 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1092 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1094 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1096 * shlib-versions: Add version definitions for hppa-linux.
1098 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1100 * sysdeps/hppa/pspinlock.c: New file.
1101 * sysdeps/hppa/pt-machine.h: New file.
1102 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1104 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1106 * mutex.c (__pthread_mutex_destroy): Correct test of
1107 busy mutex for mutexes using alternate fastlocks.
1108 Patch by dtc@cmucl.cons.org.
1110 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1112 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1114 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1116 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1117 test for owner first.
1118 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1120 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1123 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1125 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1126 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1128 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1129 _POSIX_MONOTONIC_CLOCK.
1131 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1134 2000-09-20 Andreas Jaeger <aj@suse.de>
1136 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1137 "testrtsig.h" conditional.
1139 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1141 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1142 pthread_attr_setstack.
1143 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1144 pthread_attr_setstack.
1145 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1147 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1149 * Examples/ex14.c: New file.
1150 * Makefile (tests): Add ex14.
1152 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1153 mutex. Patch by dtc@cmucl.cons.org.
1155 * ecmutex.c: New file.
1156 * Makefile (tests): Add ecmutex.
1158 2000-09-04 H.J. Lu <hjl@gnu.org>
1160 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1161 instead of roundup to round up to the page size.
1163 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1165 * manager.c (pthread_exited): Correctly report event as TD_REAP
1166 instead of TD_DEATH. Fix comments.
1168 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1170 * spinlock.h (testandset): Add cast to avoid warning.
1171 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1173 2000-09-02 Andreas Jaeger <aj@suse.de>
1175 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1178 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1180 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1181 Fix typo in last patch (_mode -> _flags).
1183 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1184 Provide definition which respects _IO_USER_LOCK flag.
1186 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1188 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1191 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1193 * Makefile: Add rules to build and run unload.
1194 * unload.c: New file.
1196 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1198 * sysdeps/pthread/pthread.h
1199 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1200 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1202 2000-08-24 Andreas Jaeger <aj@suse.de>
1204 * Examples/ex13.c: Include <string.h> for strerror prototype and
1205 <stdlib.h> for abort prototype.
1206 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1207 (thread_start): Remove unused variable err.
1208 (main): Silence GCC warnings.
1210 2000-08-22 Andreas Jaeger <aj@suse.de>
1212 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1214 * Makefile (tests): Add ex13.
1216 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1218 * semaphore.h: Add restrict where required by AGd4.
1219 * sysdeps/pthread/pthread.h: Likewise.
1220 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1222 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1224 * Makefile (tests): Add ex12. Add rule to build it.
1225 * Examples/ex12.c: New file.
1227 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1230 even though the implementation is not quite complete (but it reports
1231 it). Define _POSIX_MESSAGE_PASSING to -1.
1232 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1234 2000-08-12 Andreas Jaeger <aj@suse.de>
1236 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1238 (__compare_and_swap): Likewise.
1239 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1241 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1243 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1244 p_h_errnop correctly and not to NULL.
1246 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1248 * Banner: Bump version number to 0.9.
1250 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1252 * Makefile (tests): Add tststack. Add rule to build the program.
1253 * tststack.c: New file.
1255 * internals.h: Declare __pthread_max_stacksize.
1256 * pthread.c (__pthread_max_stacksize): New variable.
1257 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1259 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1260 (pthread_allocate_stack): Allow kernel to choose stack address if
1261 FLOATING_STACKS. This also handles variable-sized stacks.
1262 Always allocate stack and guardpage together. Use mprotect to
1263 change guardpage access.
1264 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1265 ARCH_STACK_MAX_SIZE.
1267 * attr.c (__pthread_attr_setstacksize): Also test value against
1270 * manager.c (__pthread_nonstandard_stacks): Define only if
1271 THREAD_SELF is not defined.
1272 (pthread_allocate_stack): Always initialize gardaddr to a correct
1274 (pthread_handle_create): Unmap thread with one call.
1275 (pthread_free): Remove test for initial thread before removing stack.
1276 Unmap stack with one call.
1278 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1279 1 to avoid removing the stack.
1281 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1283 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1284 load of spin lock to prime the cache before the atomic compare and
1285 exchange operation (cmpxchg4). This avoids the spinning on the
1286 cmpxchg4 instruction and reduces movement of the cache line back
1287 and forth between the processors (explanation by Asis K. Mallick
1288 from Intel). This basically makes the implementation operate the
1289 same as the Linux kernel implementation.
1291 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1292 * sysdeps/ia64/pspinlock.c: New file.
1294 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1296 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1297 * spinlock.h: ...here. Remove locking.
1298 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1300 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1301 (rwlock_rd_extricate_func): Don't determine self, let
1302 __pthread_lock do it.
1303 (rwlock_wr_extricate_func): Likewise.
1304 (rwlock_have_already): Optimize *pself handling a bit.
1306 * mutex.c: Use __builtin_expect.
1307 * pthread.c: Likewise.
1309 2000-08-02 Andreas Jaeger <aj@suse.de>
1311 * sysdeps/s390/pspinlock.c: New file.
1312 * sysdeps/s390/pt-machine.h: New file.
1313 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1315 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1317 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1319 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1321 2000-07-26 Andreas Jaeger <aj@suse.de>
1323 * pthread.c: Initialize p_sem_avail.
1325 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1327 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1328 * semaphore.c: Handle spurious wakeups.
1330 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1331 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1333 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1334 (__pthread_wait_for_restart): Likewise.
1336 * condvar.c (pthread_cond_wait): Also check whether thread is
1337 cancelable before aborting loop.
1338 (pthread_cond_timedwait): Likewise.
1340 * signals.c (pthread_sighandler): Remove special code to restrore
1342 (pthread_sighandler_t): Likewise.
1344 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1346 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1347 * pthread.c: Include <resolv.h>.
1348 (_res): Undefine. Add extern declaration.
1350 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1352 * pthread.c (__pthread_initial_thread): Update initializer.
1353 (__pthread_manager_thread): Likewise.
1354 (pthread_initialize): Move setrlimit call to...
1355 (__pthread_initialize_manager): ...here.
1356 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1358 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1359 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1361 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1363 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1364 __compare_and_swap to define testandset.
1365 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1366 Define IMPLEMENT_TAS_WITH_CAS.
1368 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1370 * Makefile: Pass -z nodelete to linker for libpthread.so
1371 generation if it understand this option.
1373 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1375 * manager.c (pthread_handle_create): Remove initialization of
1376 new_thread->p_res._sock.
1378 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1380 Bugfixes to the variant of the code for machines with no compare
1383 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1384 node was not being properly enqueued, due to failing to update
1385 the lock->__status field.
1387 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1388 being set inappropriately, causing the suspend function to be called
1389 with a null self pointer and crash.
1391 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1393 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1394 compare&swap is available.
1396 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1399 * pthread.c (pthread_initialize): Don't use sysconf to determine
1400 whether the machine has more than one processor.
1402 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1403 removed thread_self calls.
1405 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1407 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1408 __compare_and_swap to compare_and_swap in code which assumes
1409 compare swap is available.
1411 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1413 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1414 bug whereby thr field of waitnode structure would not be correctly
1415 set unless a null self pointer is passed to the functions.
1416 Eliminated redundant calls to thread_self().
1418 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1420 * pthread.c (__pthread_initialize_manager): Lock
1421 __pthread_manager_thread.p_lock before calling clone.
1423 2000-05-05 H.J. Lu <hjl@gnu.org>
1425 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1426 have acquire semantics.
1427 (__compare_and_swap_with_release_semantics): New inline
1429 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1431 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1433 * manager.c: Fix the problem with signals at startup.
1434 Change the way that thread stacks are allocated on IA64.
1435 Clean up some of the guard page allocation stuff.
1437 1999-12-19 H.J. Lu <hjl@gnu.org>
1439 * internals.h (page_roundup): New.
1440 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1442 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1443 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1446 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1448 * manager.c (pthread_allocate_stack): Unmap the stack top
1449 if failed to map the stack bottom.
1451 (pthread_free): Fix the guard page.
1453 * pthread.c (pthread_initialize): Set rlimit correctly for
1454 NEED_SEPARATE_REGISTER_STACK.
1456 1999-12-16 H.J. Lu <hjl@gnu.org>
1458 * pthread.c (__pthread_initialize_manager): Pass
1459 __pthread_manager_thread_bos instead of
1460 __pthread_manager_thread_tos to __clone2.
1462 1999-12-16 H.J. Lu <hjl@gnu.org>
1464 * manager.c (pthread_allocate_stack): Correct the calculation
1465 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1468 1999-12-13 H.J. Lu <hjl@gnu.org>
1470 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1471 bit after setting ar.ccv.
1473 1999-12-12 H.J. Lu <hjl@gnu.org>
1475 * manager.c (pthread_allocate_stack): Make the starting
1476 address of the stack bottom page aligned. FIXME: it may
1477 need changes in other places.
1478 (pthread_handle_create): Likewise.
1480 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1482 * manager.c (pthread_allocate_stack): Handle
1483 NEED_SEPARATE_REGISTER_STACK.
1484 (pthread_handle_create): Likewise.
1485 * pthread.c (__pthread_initialize_manager): Likewise.
1487 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1489 1999-12-02 H.J. Lu <hjl@gnu.org>
1491 * sysdeps/ia64/pt-machine.h: New.
1493 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1495 * wrapsyscall.c: Mark non-__ protected names as weak.
1498 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1500 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1502 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1504 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1505 Add tests also to new alternative spinlock implementation.
1506 * spinlock.h: Likewise.
1507 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1509 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1511 * Version: Export __sigaction.
1512 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1514 * pthread.c: Use __libc_sigaction instead of __sigaction.
1516 * condvar.c: Implement pthread_condattr_getpshared and
1517 pthread_condattr_setpshared.
1518 * mutex.c: Implement pthread_mutexattr_getpshared and
1519 pthread_mutexattr_setpshared.
1520 * Versions: Export new functions.
1521 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1523 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1524 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1527 2000-07-04 Greg McGary <greg@mcgary.org>
1529 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1530 pragmas. Include bp-sym.h only if _LIBC.
1532 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1534 * spinlock.c (__pthread_unlock): Properly place write barrier.
1535 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1537 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1539 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1540 faster on SMP systems. No more emulation of compare&swap for adaptive
1542 * spinlock.h: Likewise.
1543 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1544 Replace fast with adaptive mutex.
1545 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1546 * condvar.c: Likewise.
1547 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1548 * internals.h: Declare __pthread_smp_kernel.
1549 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1550 _pthread_fastlock structure.
1551 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1553 * pthread.c: Remove initialization to zero from global variables.
1555 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1557 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1559 2000-06-28 Greg McGary <greg@mcgary.org>
1561 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1562 pthread functions that have pointers in their return+arg signatures.
1564 2000-06-27 Greg McGary <greg@mcgary.org>
1566 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1567 extern declarations of pthread functions that have pointers in
1568 their return+arg signatures.
1570 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1572 * Makefile (tests): Add ex11. Add rules to build it.
1573 * Examples/ex11.c: New file.
1574 * rwlock.c: Fix complete braindamaged previous try to implement
1577 * spinlock.c: Pretty print.
1579 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1581 * Makefile (tests): Add ex10. Add rules to build it.
1582 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1583 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1584 * condvar.c (pthread_cond_wait): Allow mutex of kind
1585 PTHREAD_MUTEX_TIMED_NP.
1586 (pthread_cond_timedwait_relative): Likewise.
1587 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1588 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1589 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1590 (__pthread_mutex_lock): Use __pthread_alt_lock for
1591 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1592 (__pthread_mutex_timedlock): New function.
1593 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1594 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1595 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1596 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1597 * spinlock.c: Implement alternate fastlocks.
1598 * spinlock.h: Add prototypes.
1599 * Examples/ex10.c: New file.
1600 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1601 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1603 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1604 (__pthread_rwlock_timedrdlock): New function.
1605 (__pthread_rwlock_timedwrlock): New function.
1606 Use laternate fastlock function everywhere.
1608 2000-06-21 Andreas Jaeger <aj@suse.de>
1610 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1613 * join.c: Include <stdlib.h> for exit prototype.
1615 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1617 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1619 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1620 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1622 * Makefile (libpthread-routines): Add barrier.
1623 (tests): Add ex9. Add rule to build ex9.
1624 * Versions: Export barrier functions.
1625 * barrier.c: New file.
1626 * Examples/ex9.c: New file.
1627 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1628 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1629 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1631 2000-06-19 H.J. Lu <hjl@gnu.org>
1633 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1634 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1635 (compare_and_swap_with_release_semantics): New. Default to
1636 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1639 * spinlock.c (__pthread_unlock): Call
1640 compare_and_swap_with_release_semantics () instead of
1641 compare_and_swap ().
1643 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1645 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1647 * sysdeps/pthread/timer_delete.c: Likewise.
1648 * sysdeps/pthread/timer_getoverr.c: Likewise.
1649 * sysdeps/pthread/timer_gettime.c: Likewise.
1650 * sysdeps/pthread/timer_settime.c: Likewise.
1652 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1654 Timer nodes are now reference counted, and can be marked
1655 as deleted. This allows for the safe release of the global mutex
1656 in the middle without losing the timer being operated on.
1658 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1659 member is now an enum with three values, so that an intermediate
1660 state can be represented (deleted but not free for reuse yet).
1661 New refcount member added.
1662 * sysdeps/pthread/timer_routines.c: Likewise.
1664 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1665 timer_valid): New inline functions added.
1667 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1668 restructured, recursive deadlock bug fixed.
1670 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1671 timer_addref to ensure that timer won't be deleted while mutex is not
1672 held. Also uses timer_invalid to perform validation of timer handle.
1673 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1674 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1676 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1678 * shlib-versions: Add entry for SH.
1679 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1681 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1683 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1684 tightened up some critical regions and micro-optimized some list
1687 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1688 Returns int value now to indicate whether timer was queued at head.
1689 * sysdeps/pthread/posix-timer.h: Likewise.
1690 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1691 new return value from __timer_thread_queue_timer to avoid waking
1692 up timer thread unnecessarily.
1694 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1695 inuse flag, because this requires mutex to be held. Callers updated
1696 to do the check when they have the mutex.
1697 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1699 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1700 regions: avoids making system calls while holding timer mutex, and
1701 a few computations were moved outside of the mutex as well.
1702 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1704 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1705 to list_unlink_ip, meaning idempotent. Pointer manipulation
1706 changed to get better better code out of gcc.
1707 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1708 version of list_unlink added here.
1709 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1710 function in all places: idempotent one for timers, non-idempotent
1711 one for thread nodes.
1712 * sysdeps/pthread/timer_settime: Likewise.
1713 * sysdeps/pthread/timer_routines.c: Likewise.
1715 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1717 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1718 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1720 * sysdeps/pthread/Makefile: Remove tests definition.
1722 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1723 Yutaka Niibe <gniibe@chroot.org>
1725 * sysdeps/sh/pspinlock.c: New file.
1726 * sysdeps/sh/pt-machine.h: New file.
1728 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1730 * Makefile (tests): Add joinrace.
1732 * Examples/ex6.c: Test return value of pthread_join.
1734 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1736 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1737 (__pthread_spin_trylock): Implement.
1738 (__pthread_spin_unlock): Implement.
1739 (__pthread_spin_init): Implement.
1740 (__pthread_spin_destroy): Implement.
1742 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1744 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1745 really append the entry.
1747 2000-06-10 Andreas Jaeger <aj@suse.de>
1749 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1751 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1753 * sysdeps/pthread/timer_create.c: Thread matching now done on
1754 clock type as well as thread attributes.
1755 There are individual global signal-delivering threads for
1756 different clock types.
1757 * sysdeps/pthread/posix-timer.h: Likewise.
1758 * sysdeps/pthread/timer_routines.c: Likewise.
1760 * sysdeps/pthread/timer_routines.c: Thread allocation and
1761 deallocation function now remembers to put thread on active
1762 list and remove from active list.
1763 Thus now the feature of binding multiple timers
1764 to a single thread actually works.
1766 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1768 * pthread.c (__pthread_create_2_1): Optimize a bit.
1770 * internals.h (invalid_handle): Also test for p_terminated != 0.
1771 (nonexisting_handle): New function. Same as old invalid_handle.
1772 * join.c (pthread_join): Use nonexisting_handle instead of
1773 invalid_handle to test for acceptable thread handle.
1774 * manager.c (pthread_handle_free): Likewise.
1775 * joinrace.c: New file.
1776 Reported by Permaine Cheung <pcheung@cygnus.com>.
1778 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1780 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1781 Correct handling of matching variable.
1783 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1786 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1787 Be prepared for empty timer list.
1789 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1790 CPUTIME clock ID. Add support for thread clocks.
1792 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1793 subtraction were switched.
1795 * sysdeps/pthread/timer_routines.c (init_module): Use
1796 THREAD_MAXNODES threads.
1798 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1799 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1800 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1801 with sigqueueinfo is this system call is available.
1803 * sysdeps/pthread/timer_create.c (timer_create): Allow
1804 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1806 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1808 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1810 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1812 * sysdeps/pthread/posix-timer.h: New file.
1813 * sysdeps/pthread/timer_create.c: New file.
1814 * sysdeps/pthread/timer_delete.c: New file.
1815 * sysdeps/pthread/timer_getoverr.c: New file.
1816 * sysdeps/pthread/timer_gettime.c: New file.
1817 * sysdeps/pthread/timer_routines.c: New file.
1818 * sysdeps/pthread/timer_settime.c: New file.
1819 * sysdeps/pthread/tst-timer.c: New file.
1821 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1823 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1824 LINK_MAX definitions if necessary.
1826 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1828 Added missing fork time handling of global libio lock.
1830 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1831 not just the individual stream locks. Rewritten to use new
1832 iterator interface provided by libio rather than accessing
1835 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1836 which lock and unlock the stream list using the new interface
1838 * internals.h: Likewise.
1840 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1841 and __funlockfilelist in the parent after the fork.
1842 Child still calls __fresetlockfiles as before.
1844 * linuxthreads.texi: Now explains what happens to streams at
1845 fork time. Also whole new section on forking and thread added.
1846 Definition of pthread_atfork moved out of Miscellaneous Functions
1847 to this new section.
1849 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1851 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1852 Add missing register.
1853 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1855 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1857 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1858 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1859 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1861 2000-05-31 Andreas Jaeger <aj@suse.de>
1863 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1865 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1867 * spinlock.c (__pthread_lock): Remove ASSERT.
1869 * Makefile (tests): Add ex8.
1870 * Examples/ex8.c: New file.
1872 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1874 Bugfix: The pthread_atfork mechanism now takes care of its
1875 own internal mutex at fork time.
1877 * ptfork.c (__fork): Revised so that the mutex is held across
1878 the fork operation and while the handlers are called, and so that
1879 the child resets the mutex.
1881 * linuxthreads.texi: Updated pthread_atfork documentation to make
1882 it clear that fork and pthread_atfork can't be reentered from
1883 atfork handlers, that pthread_atfork and fork are mutually atomic,
1884 and that the handlers are inherited by the child process.
1886 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1888 * Makefile (libpthread-routines): Add pspinlock.
1889 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1890 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1891 * condvar.c: Likewise.
1892 * internals.h: Likewise.
1894 * manager.c: Likewise.
1895 * mutex.c: Likewise.
1896 * pthread.c: Likewise.
1897 * rwlock.c: Likewise.
1898 * semaphore.c: Likewise.
1899 * signals.c: Likewise.
1900 * spinlock.h: Likewise.
1901 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1902 * sysdeps/alpha/pspinlock.c: New file.
1903 * sysdeps/arm/pspinlock.c: New file.
1904 * sysdeps/i386/pspinlock.c: New file.
1905 * sysdeps/m68k/pspinlock.c: New file.
1906 * sysdeps/mips/pspinlock.c: New file.
1907 * sysdeps/powerpc/pspinlock.c: New file.
1908 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1909 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1910 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1911 back to _pthread_fastlock. Define new pthread_spinlock_t.
1913 2000-05-24 Andreas Jaeger <aj@suse.de>
1915 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1917 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1919 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1921 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1923 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1925 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1927 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1928 object state is represented with additional bits which distinguish
1929 whether that state was set up in the current process, or
1930 in an ancestor process. If that state was set in an ancestor,
1931 it means that a fork happened while thread was executing the init
1932 function. In that case, the state is reset to NEVER.
1933 * mutex.c (__pthread_once_fork_prepare): New function.
1934 (__pthread_once_fork_child): Likewise
1935 (__pthread_once_fork_parent): Likewise
1936 (__pthread_reset_pthread_once): Removed.
1937 * ptfork.c (__fork): Call new handlers in mutex.c.
1938 * internals.h: Declarations of new mutex.c functions added.
1939 Declaration of removed function deleted.
1940 * linuxthreads.texi: Updated documentation about pthread_once
1941 to clarify what happens under cancellation and forking.
1943 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1945 * internals.h: New thread manager request type, REQ_KICK.
1946 * join.c (pthread_exit): main thread now calls exit() instead
1947 of _exit() in order to proper process cleanup.
1948 * manager.c (__pthread_manager): Do not terminate manager
1949 after unblocking main thread; wait for main thread's
1950 REQ_PROCESS_EXIT request instead.
1951 Also, added REQ_KICK case to handle new request; this just does
1953 * manager.c (pthread_exited): Do not terminate manager after
1954 unblocking main thread.
1955 * manager.c (__pthread_manager_sighandler): If the main thread
1956 is waiting for all other threads to die, send a REQ_KICK into
1957 the thread manager request pipe to get it to clean out the threads
1958 and unblock the main thread as soon as possible. This fixes
1959 the 2000 millisecond hang on shutdown bug.
1960 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1961 including the main one call pthread_exit(), or implicitly do so.
1962 * Makefile (tests): Add ex7.
1964 2000-05-05 Andreas Jaeger <aj@suse.de>
1966 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1967 (pthread_getcpuclockid): Correct test for ourselves.
1969 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1971 * internals.h (struct _pthread_descr_struct): Reorganization.
1972 Allocate room for 16 pointers at head of the structure for future
1973 thread-local data handling. Move p_self member in this area.
1974 * manager.c (pthread_handle_create): Adjust use of p_self.
1975 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1976 * pthread.c (__pthread_initial_thread): Adjust initialization.
1977 (__pthread_manager_thread): Likewise.
1979 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1981 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1982 for eventmask larger than 1 word.
1984 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1986 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1987 * pthread.c (__pthread_initialize_minimal): New function. Perform
1988 minimal initialization.
1989 (pthread_initialize): Remove this code here.
1990 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1991 are working around the problem in glibc.
1993 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1995 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1996 now. First gcc must be fixed (more concrete: libgcc).
1998 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2000 * pthread.c: Remove special treatement for interrupt handlers on x86.
2001 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2002 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2004 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2006 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2008 * join.c (pthread_exit): Set p_terminated after reporting the
2009 termination event instead of before.
2011 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2013 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2016 2000-04-18 Andreas Jaeger <aj@suse.de>
2018 * Versions: Use ld instead of ld.so.
2020 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2022 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2023 Remove the typedef keyword.
2025 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2027 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2029 (READ_MEMORY_BARRIER): Define.
2030 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2032 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2035 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2037 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2038 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2039 use thread_handle().
2041 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2043 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2044 if fast mutex is used. Don't initialize `already_canceled' twice.
2045 Correctly test for return value of timedsuspend.
2047 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2048 therefore don't need the _rt versions of the signal handlers.
2050 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2052 * pthread.c (pthread_yield): New function.
2053 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2054 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2055 * internals.h: Declare __pthread_yield.
2057 * pthread.c (pthread_initialize): Avoid a bit more code if
2058 realtime signals are known to exist.
2060 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2061 to dynamically detect RT signals and avoid generating compatibility
2062 functions with old kernel.
2063 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2064 __pthread_restart_new directly.
2065 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2066 __pthread_wait_for_restart_signal directly.
2067 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2068 __pthread_timedsuspend_new directly.
2070 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2072 * condvar.c: Remove all the special code to handle cond_timedwait.
2073 Use timedsuspend instead.
2074 * internals.h: Declare __pthread_timedsuspend_old,
2075 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2076 Remove declaration of __pthread_init_condvar.
2077 * pthread.c: Define __pthread_timedsuspend variable.
2078 (__pthread_timedsuspend_old): New function. Timed suspension
2079 implementation for old Linux kernels.
2080 (__pthread_timedsuspend_new): New function. Timed suspension
2081 implementation for new Linux kernels.
2082 * restart.h (timedsuspend): New function. Call appropriate
2083 suspension function through __pthread_timedsuspend.
2084 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2086 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2088 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2090 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2092 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2093 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2095 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2096 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2098 2000-04-14 Andreas Jaeger <aj@suse.de>
2100 * weaks.c: Fix typo.
2102 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2103 2.2 for linuxthreads.
2105 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2107 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2108 (pthread_getcpuclockid): Fix typo.
2110 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2112 * Makefile (libpthread-routines): Add getcpuclockid.
2113 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2114 * sysdeps/pthread/getcpuclockid.c: New file.
2115 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2116 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2118 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2120 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2122 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2123 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2124 and pthread_spin_unlock.
2125 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2126 into pthread_spinlock_t. Change all uses.
2127 * spinlock.c: Implement pthread_spin_lock.
2128 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2129 alias for real name.
2130 Define pthread_spin_trylock, pthread_spin_init, and
2131 pthread_spin_destroy.
2132 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2133 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2134 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2135 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2136 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2137 and pthread_spin_unlock.
2138 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2139 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2140 * condvar.c: Likewise.
2141 * internals.h: Likewise.
2143 * manager.c: Likewise.
2144 * mutex.c: Likewise.
2145 * pthread.c: Likewise.
2146 * rwlock.c: Likewise.
2147 * semaphore.c: Likewise.
2148 * signals.c: Likewise.
2150 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2152 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2154 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2156 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2157 _POSIX_SHARED_MEMORY_OBJECTS.
2159 2000-04-11 Andreas Jaeger <aj@suse.de>
2161 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2162 (__compare_and_swap): Mark as modifying memory.
2164 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2166 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2168 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2169 Don't have the 'asm' __volatile__.
2171 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2173 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2174 * spinlock.c (__pthread_lock): Add memory barriers.
2175 (__pthread_unlock): Likewise.
2176 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2178 (RELEASE): Not needed anymore.
2179 (__compare_and_swap): Mark asm as modifying memory.
2180 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2182 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2183 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2184 (MEMORY_BARRIER): Define using stbar.
2185 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2187 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2188 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2189 Mike Burrows <m3b@pa.dec.com>.
2191 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2193 * signals.c (sigaction): Fix return value for the case SIG is one
2194 of the signals the implementation uses.
2195 Patch by Xavier.Leroy@inria.fr.
2197 2000-04-01 Andreas Jaeger <aj@suse.de>
2199 * attr.c: Use shlib-compat macros.
2200 * oldsemaphore.c: Likewise.
2201 * pthread.c: Likewise.
2202 * weaks.c: Likewise.
2204 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2206 * semaphore.c (sem_timedwait): New function.
2207 Patch by Carl Mailloux <carlm@oricom.ca>.
2208 * semaphore.h: Declare sem_timedwait.
2209 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2211 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2213 * sysdeps/pthread/Makefile: File removed.
2215 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2217 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2218 * internals.h (__pthread_reset_pthread_once): Add prototype.
2219 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2221 * manager.c (pthread_handle_create): Store ID of new thread before
2224 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2226 * attr.c: Use new macros from shlib-compat.h to define versions.
2227 * oldsemaphore.c: Likewise.
2228 * semaphore.c: Likewise.
2229 * weaks.c: Likewise.
2231 * pthread.c: Update for new SHLIB_COMPAT definition.
2233 * manager.c (__pthread_manager): Unmask debug signal.
2235 * pthread.c (pthread_initialize): Test for address of __dso_handle
2236 being NULL, not value. Use __on_exit, not on_exit.
2237 Patch by Andreas Jaeger <aj@suse.de>.
2239 * pthread.c: Use new macros from shlib-compat.h to define versions.
2241 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2243 * pthread.c (pthread_initialize): Instead of on_exit use
2244 __cxa_atexit if __dso_label is available to allow unloading the
2245 libpthread shared library.
2247 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2249 * condvar.c: Make tests for ownership of mutex less strict.
2251 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2253 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2254 current thread and return error if not.
2255 (pthread_cond_timedwait_relative_old): Likewise.
2256 (pthread_cond_timedwait_relative_new): Likewise.
2258 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2259 (pthread_once_cancelhandler): New function.
2260 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2262 2000-03-14 Andreas Jaeger <aj@suse.de>
2264 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2266 (pthread_handle_sigrestart_rt): Likewise.
2267 * signals.c (pthread_sighandler_rt): Likewise.
2269 2000-03-02 Andreas Jaeger <aj@suse.de>
2271 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2272 Reported by Sean Chen <sean.chen@turbolinux.com>.
2274 2000-02-28 Andreas Jaeger <aj@suse.de>
2276 * rwlock.c: Fix typo.
2278 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2280 * rwlock.c: Define __* variants of the functions and make old names
2282 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2283 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2285 2000-02-25 Andreas Jaeger <aj@suse.de>
2287 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2288 pwrite64, lseek64, open64, and __open64 with version 2.2.
2290 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2292 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2294 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2296 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2297 nanosleep does not work either. Get absolute time inside the
2299 (pthread_cond_timedwait_relative_new): Likewise.
2300 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2302 2000-02-13 Andreas Jaeger <aj@suse.de>
2304 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2305 (pthread_cond_timedwait_relative_old): Likewise.
2307 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2309 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2310 but keep the code around. A bug in the kernel prevent us from
2312 (pthread_cond_timedwait_relative_new): Likewise.
2313 (PR libc/1597 and libc/1598).
2315 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2317 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2318 loop around nanosleep calls instead of around most of the function
2319 (pthread_cond_timedwait_relative_new): Likewise.
2320 body. Got rid of backwards goto and one local.
2322 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2324 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2325 before every nanosleep call to account for time spent in the rest
2327 (pthread_cond_timedwait_relative_new): Likewise.
2328 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2330 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2332 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2333 from nanosleep call so that in case we restart we only wait for the
2335 (pthread_cond_timedwait_relative_new): Likewise.
2336 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2338 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2340 * manager.c (pthread_allocate_stack): Compute guard page address
2341 correctly. Patch by HJ Lu.
2343 * sysdeps/pthread/pthread.h: Define
2344 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2346 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2348 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2349 preference handling.
2350 (pthread_rwlockattr_setkind_np): Allow
2351 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2352 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2354 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2356 * internals.h (pthread_readlock_info): New structure.
2357 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2358 p_untracked_readlock_count.
2359 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2360 Add initializers for new fields.
2361 * manager.c (pthread_free): Free read/write lock lists.
2362 * queue.h (queue_is_empty): New function.
2363 * rwlock.c: Implement requirements about when readers should get
2365 * sysdeps/pthread/pthread.h
2366 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2367 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2368 Define this name as well.
2369 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2371 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2373 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2374 Adjust initializers for struct _pthread_descr_struct change.
2375 * internals.h (struct _pthread_descr_struct): Move new elements to
2378 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2380 Redesigned how cancellation unblocks a thread from internal
2381 cancellation points (sem_wait, pthread_join,
2382 pthread_cond_{wait,timedwait}).
2383 Cancellation won't eat a signal in any of these functions
2384 (*required* by POSIX and Single Unix Spec!).
2385 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2386 simultaneous condition variable signal (not required by POSIX
2387 or Single Unix Spec, but nice).
2388 * spinlock.c: __pthread_lock queues back any received restarts
2389 that don't belong to it instead of assuming ownership of lock
2390 upon any restart; fastlock can no longer be acquired by two threads
2392 * restart.h: Restarts queue even on kernels that don't have
2393 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2394 avoiding a rare race condition in pthread_cond_timedwait.
2396 1999-12-31 Andreas Jaeger <aj@suse.de>
2398 * internals.h: Remove duplicate prototype declarations.
2400 * weaks.c: Remove __THROW from prototypes since the file is not
2401 compiled by a C++ compiler.
2402 * internals.h: Likewise.
2404 1999-12-30 Andreas Jaeger <aj@suse.de>
2406 * sysdeps/pthread/pthread.h: Move internal functions to...
2407 * sysdeps/pthread/bits/libc-lock.h: ...here.
2409 1999-12-29 Andreas Jaeger <aj@suse.de>
2411 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2413 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2415 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2418 * manager.c (__pthread_start): Add one more cast to prevent
2419 warning on 64bit machines.
2421 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2423 * manager.c (pthread_handle_create): Set p_pid of new thread
2424 before calling the callback function to report a new thread.
2426 1999-12-20 Andreas Jaeger <aj@suse.de>
2428 * pthread.c (pthread_initialize): Move getrlimit call after
2431 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2433 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2434 pwrite64, lseek64, open64, and __open64.
2435 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2436 pwrite64, lseek64, open64, and __open64.
2438 * manager.c (pthread_allocate_stack): Correct computation of
2439 new_thread_bottom. Correct handling of stack size and when the
2440 rlimit method to guard for stack growth is used.
2441 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2442 minus one pagesize (not two).
2444 1999-12-03 Andreas Jaeger <aj@suse.de>
2446 * Versions: Add __res_state with version GLIBC_2.2.
2448 * errno.c (__res_state): New function to return thread specific
2451 * pthread.c (pthread_initialize): Initialize p_resp.
2452 (__pthread_reset_main_thread): Also set p_resp.
2454 * manager.c (pthread_handle_create): Initialize p_resp.
2456 * internals.h: Add thread specific resolver state.
2457 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2459 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2461 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2463 * sysdeps/i386/i686/pt-machine.h: Likewise.
2464 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2466 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2468 * manager.c (pthread_start_thread_event): Initialize p_pid already
2471 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2473 * internals.h: Add prototype for __pthread_manager_event.
2474 * manager.c (__pthread_manager_event): New function.
2475 (pthread_start_thread_event): Correct computation of self.
2476 Use INIT_THREAD_SELF.
2477 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2478 (__pthread_initialize_manager): Respect event flags also for creation
2479 of the manager thread.
2481 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2483 * pthread.c (__pthread_initialize_manager): Initialize
2484 __pthread_manager_thread.p_tid.
2486 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2488 * internals.h: Declare __pthread_last_event.
2489 * manager.c: Define __pthread_last_event.
2490 (pthread_handle_create): Set __pthread_last_event.
2491 (pthread_exited): Likewise.
2492 * join.c (pthread_exit): Likewise.
2494 * Makefile (libpthread-routines): Add events.
2495 * events.c: New file.
2496 * internals.h: Protect against multiple inclusion.
2497 Include thread_dbP.h header.
2498 (struct _pthread_descr_struct): Add new fields p_report_events and
2500 Declare event reporting functions.
2501 * join.c (pthread_exit): Signal event if this is wanted.
2502 * manager.c (__pthread_threads_events): New variable.
2503 (pthread_handle_create): Take new parameters with event information.
2504 Signal TD_CREATE event if wanted.
2505 (__pthread_manager): Adjust pthread_handle_create call.
2506 (pthread_start_thread_event): New function. Block until manager is
2507 finished and then call pthread_start_thread.
2508 (pthread_exited): Signal TD_REAP event if wanted.
2510 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2512 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2514 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2516 1999-10-25 Andreas Jaeger <aj@suse.de>
2518 * internals.h: Remove K&R compatibility.
2519 * no-tsd.c: Likewise.
2520 * semaphore.h: Likewise.
2521 * signals.c: Likewise.
2522 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2523 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2524 * weaks.c: Likewise.
2526 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2528 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2529 pthread_handle_sigcancel with functions that restore %gs from the
2530 signal context. For each signal handling function, two wrappers
2531 are required, one for a non-RT signal and one for a RT signal.
2532 * signal.c: For i386, add code to restore %gs from the signal
2533 context in pthread_sighandler and pthread_sighandler_rt.
2535 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2537 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2539 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2541 * pthread.c (__pthread_initial_thread): Pass argument to
2542 PTHREAD_START_ARGS_INITIALIZER.
2543 (__pthread_manager_thread): Likewise.
2545 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2546 initialize function.
2548 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2550 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2552 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2554 * internals.h: Correct return types for __libc_read and __libc_write.
2556 1999-10-09 Andreas Jaeger <aj@suse.de>
2558 * internals.h: Add __new_sem_post to get prototype in
2559 manager.c; include semaphore.h for needed types.
2561 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2563 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2564 directly instead of calling sem_post which should not be necessary
2565 but is faster and might help in some case to work around problems.
2566 Patch by khendricks@ivey.uwo.ca [libc/1382].
2568 1999-10-08 Andreas Schwab <schwab@suse.de>
2570 * sysdeps/pthread/Subdirs: New file.
2573 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2575 * Implies: New file.
2576 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2577 * manager.c (pthread_handle_create): Initialize p_startfct.
2578 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2580 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2582 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2583 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2584 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2586 * condvar.c (pthread_cond_timedwait_relative): Never return with
2587 EINTR. Patch by Andreas Schwab.
2589 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2591 * signals.c (sigaction): Correct last patch. Don't select
2592 pthread_sighandler_rt based on the signal number but instead of
2593 the SA_SIGINFO flag.
2595 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2597 * specific.c: Move definitions of struct pthread_key_struct and
2598 destr_function to ...
2599 * internals.h: ...here.
2601 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2603 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2604 this instead of pthread_handle_sigrestart if the signal is an RT
2607 * signals.c: Handle passing through of sighandler arguments also
2608 for real-time signals.
2610 1999-09-03 Andreas Schwab <schwab@suse.de>
2612 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2614 (__vfork): New function, alias vfork.
2615 * Versions: Export __fork, vfork, and __vfork in libpthread.
2617 1999-08-23 Andreas Schwab <schwab@suse.de>
2619 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2620 call to signal handler.
2622 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2624 * pthread.c (__pthread_reset_main_thread): Undo last change.
2625 (__pthread_kill_other_threads_np): Reset signal handlers for the
2626 signals we used in the thread implementation here.
2628 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2630 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2631 for the signals we used in the thread implementation [PR libc/1234].
2633 * Versions: Export __pthread_kill_other_threads_np from libpthread
2636 * signals.c: Pass sigcontext through wrapper to the user function.
2638 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2640 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2641 __libc_internal_tsd_set.
2643 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2645 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2648 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2650 * internals.h: Align _pthread_descr_struct to 32 bytes.
2651 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2654 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2656 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2659 1999-07-09 Cristian Gafton <gafton@redhat.com>
2661 * Makefile (libpthread-routines): Add oldsemaphore routine.
2662 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2663 sem_trywait, and sem_wait to GLIBC_2.1.
2664 * oldsemaphore.c: New file.
2665 * semaphore.c: Add default_symbol_versions for the changed functions.
2666 (__new_sem_init): Rename from sem_init.
2667 (__new_sem_post): Rename from sem_post.
2668 (__new_sem_wait): Rename from sem_wait.
2669 (__new_sem_trywait): Rename from sem_trywait.
2670 (__new_sem_getvalue): Rename from sem_getvalue.
2671 (__new_sem_destroy): Rename from sem_destroy.
2673 1999-06-23 Robey Pointer <robey@netscape.com>
2675 * internals.h: Added p_nextlock entry to separate queueing for a
2676 lock from queueing for a CV (sometimes a thread queues on a lock
2677 to serialize removing itself from a CV queue).
2678 * pthread.c: Added p_nextlock to initializers.
2679 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2681 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2683 * manager.c (pthread_handle_create): Free mmap region after stack
2684 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2686 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2688 * man/pthread_cond_init.man: Correct example.
2689 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2691 * linuxthreads.texi (Condition Variables): Likewise.
2693 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2695 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2696 casx not cas, also successful casx returns the old value in rd
2697 and not the new value.
2699 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2701 * manager.c: If pthread_create() is given a NULL attribute
2702 and the thread manager runs with a realtime policy, set the
2703 scheduling policy of the newly created thread back to SCHED_OTHER.
2704 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2705 initialize the schedpolicy field of new_thread->p_start_args
2706 to that of the calling thread.
2708 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2710 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2711 instruction does not allow memory element to use offset.
2713 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2715 * manager.c (pthread_allocate_stack): Optimize initialization of new
2718 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2719 Don't use initializer since it is all zeroes.
2720 (__libc_once_define): Likewise.
2722 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2724 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2725 doesn't exist anymore.
2726 * sysdeps/i386/Implies: Likewise.
2727 * sysdeps/m68k/Implies: Likewise.
2728 * sysdeps/mips/Implies: Likewise.
2729 * sysdeps/powerpc/Implies: Likewise.
2730 * sysdeps/sparc/sparc32/Implies: Likewise.
2731 * sysdeps/sparc/sparc64/Implies: Likewise.
2733 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2735 * sysdeps/alpha/bits/semaphore.h: Removed.
2736 * sysdeps/powerpc/bits/semaphore.h: Removed.
2737 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2738 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2739 * Makefile (headers): Remove bits/semaphore.h.
2741 * semaphore.h: Define _pthread_descr if necessary.
2742 Don't include limits.h. Define SEM_VALUE_MAX directly.
2744 (sem_t): Protect element names with leading __.
2745 Add declarations for sem_close, sem_open, and sem_unlink.
2746 * semaphore.c: Adjust all functions for new element names.
2747 Define sem_close, sem_open, and sem_unlink.
2748 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2750 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2753 1999-03-16 H.J. Lu <hjl@gnu.org>
2755 * specific.c (pthread_key_delete): Check th->p_terminated to see
2756 if the thread is running.
2758 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2759 Added to GLIBC_2.0 for libc.so.
2761 1999-02-12 H.J. Lu <hjl@gnu.org>
2763 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2764 __libc_allocate_rtsig): Added to GLIBC_2.1.
2766 * internals.h (DEFAULT_SIG_RESTART): Removed.
2767 (DEFAULT_SIG_CANCEL): Removed.
2769 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2770 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2771 (__pthread_sig_restart, __pthread_sig_cancel,
2772 __pthread_sig_debug): Initialized.
2773 (pthread_initialize): Call init_rtsigs () to initialize
2776 1999-02-03 H.J. Lu <hjl@gnu.org>
2778 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2779 Don't restart the thread which sent REQ_DEBUG.
2780 (pthread_start_thread): Check if __pthread_sig_debug > 0
2783 * pthread.c (__pthread_initialize_manager): Suspend ourself
2784 after sending __pthread_sig_debug to gdb instead of
2785 __pthread_sig_cancel.
2787 1999-01-24 H.J. Lu <hjl@gnu.org>
2789 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2790 from mask if __pthread_sig_debug > 0.
2791 (pthread_handle_create): Increment __pthread_handles_num.
2793 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2794 * pthread.c (__pthread_initialize_manager): Likewise.
2796 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2797 instead of __libc_allocate_rtsig (2).
2798 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2799 instead of __pthread_sig_cancel.
2800 (pthread_handle_sigdebug): Fix comments.
2802 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2804 * manager.c (pthread_allocate_stack): Set
2805 __pthread_nonstandard_stacks if user-specified stack is used.
2807 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2809 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2810 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2812 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2814 * pthread.c: Use a third signal __pthread_sig_debug distinct
2815 from __pthread_sig_cancel to notify gdb when a thread is
2817 * manager.c: Likewise.
2818 * internals.h: Likewise.
2819 * signals.c: The implementation of sigwait(s) assumed that
2820 all signals in s have signal handlers already attached.
2821 This is not required by the standard, so make it work
2822 also if some of the signals have no handlers.
2824 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2826 * linuxthreads.texi: Remove pointers from first @node. Move old
2827 @node spec inside comment.
2829 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2831 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2834 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2836 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2837 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2839 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2841 * manager.c: Threads now send __pthread_sig_cancel on termination.
2842 Change clone call and signal masks.
2843 * thread.c (pthread_handle_sigrestart): Remove special code for
2845 (pthread_handle_sigcancel): In manager thread call
2846 __pthread_manager_sighandler.
2847 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2848 * sysdeps/i386/i686/pt-machine.h: Likewise.
2849 Patches by Xavier Leroy.
2851 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2853 * spinlock.c (__pthread_unlock): Don't crash if called for an
2854 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2856 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2859 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2861 * Examples/ex3.c: Wait until all threads are started before
2862 searching for the number to avoid race condition on very fast
2865 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2867 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2868 declaration since it's not needed.
2870 * sysdeps/pthread/pthread.h: Move internal functions to ...
2871 * internals.h: ...here.
2873 1998-12-02 H.J. Lu <hjl@gnu.org>
2875 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2876 SIGRTMIN is defined.
2877 (__pthread_sig_cancel): Likewise.
2879 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2881 * wrapsyscall.c: Include <sys/mman.h> for msync,
2882 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2883 Correct msync declaration.
2885 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2887 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2888 __libc_tsd_set): New macros for new interface.
2889 * no-tsd.c: New file, provide uninitialized defns of
2890 __libc_internal_tsd_get and __libc_internal_tsd_set.
2891 * Makefile (routines): Add no-tsd.
2893 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2895 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2896 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2897 __libc_internal_tsd_set): Move decls to ...
2898 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2901 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2902 __libc_internal_tsd_set): Make these pointers to functions, not
2903 functions; remove #pragma weak decls for them.
2904 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2905 Define static functions and initialized pointers to them.
2907 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2909 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2910 (CFLAGS-specific.c): Likewise.
2911 (CFLAGS-pthread.c): Likewise.
2912 (CFLAGS-ptfork.c): Likewise.
2913 (CFLAGS-cancel.c): Likewise.
2914 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2915 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2917 * mutex.c (pthread_mutex_init): Define as strong symbol.
2918 (pthread_mutex_destroy): Likewise.
2919 (pthread_mutex_trylock): Likewise.
2920 (pthread_mutex_lock): Likewise.
2921 (pthread_mutex_unlock): Likewise.
2922 (pthread_mutexattr_init): Likewise.
2923 (pthread_mutexattr_destroy): Likewise.
2924 (pthread_once): Likewise.
2925 * ptfork.c (pthread_atfork): Likewise.
2926 * specific.c (pthread_key_create): Likewise.
2927 (pthread_setspecific): Likewise.
2928 (pthread_getspecific): Likewise.
2930 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2932 * linuxthreads.texi: Fix punctuation after xref.
2934 1998-11-10 H.J. Lu <hjl@gnu.org>
2936 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2937 if it is defined in <linux/limits.h>.
2939 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2941 * spinlock.h (__pthread_trylock): Define inline.
2942 (__pthread_lock): Add extra parameter to declaration. Declare
2943 using internal_function.
2944 (__pthread_unlock): Declare using internal_function.
2945 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2946 of local variable self. Avoid recomputing self. Define using
2948 (__pthread_trylock): Remove.
2949 (__pthread_unlock): Define using internal_function.
2950 * cancel.c: Adjust for __pthread_lock interface change. Use already
2951 computed self value is possible.
2952 * condvar.c: Likewise.
2954 * manager.c: Likewise.
2955 * mutex.c: Likewise.
2956 * pthread.c: Likewise.
2957 * rwlock.c: Likewise.
2958 * semaphore.c: Likewise.
2959 * signals.c: Likewise.
2961 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2963 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2964 __ to field names of the struct.
2965 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2967 (pthread_attr_t): Likewise.
2968 (pthread_cond_t): Likewise.
2969 (pthread_condattr_t): Likewise.
2970 (pthread_mutex_t): Likewise.
2971 (pthread_mutexattr_t): Likewise.
2972 (pthread_rwlock_t): Likewise.
2973 (pthread_rwlockattr_t): Likewise.
2974 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2975 * cancel.c: Likewise.
2976 * condvar.c: Likewise.
2977 * manager.c: Likewise.
2978 * mutex.c: Likewise.
2979 * pthread.c: Likewise.
2980 * ptlongjmp.c: Likewise.
2981 * rwlock.c: Likewise.
2982 * spinlock.c: Likewise.
2984 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2986 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2989 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2992 * Makefile (libpthread-routines): Add pt-machine.
2993 * pt-machine.c: New file.
2994 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2995 yet defined. Use PT_EI in extern inline definitions.
2996 * sysdeps/arm/pt-machine.h: Likewise.
2997 * sysdeps/i386/pt-machine.h: Likewise.
2998 * sysdeps/i386/i686/pt-machine.h: Likewise.
2999 * sysdeps/m68k/pt-machine.h: Likewise.
3000 * sysdeps/mips/pt-machine.h: Likewise.
3001 * sysdeps/powerpc/pt-machine.h: Likewise.
3002 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3003 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3005 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3007 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3010 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3012 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3014 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3016 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3018 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3021 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3023 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3024 array index overflow.
3026 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3028 * sysdeps/pthread/semaphore.h: New file.
3030 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3032 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3033 _LIBC_TSD_KEY_DL_ERROR.
3035 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3037 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3038 * sysdeps/i386/pt-machine.h: Likewise.
3039 Suggested by Roland McGrath.
3041 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3043 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3044 access thread data with non-constant offsets.
3045 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3048 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3049 THREAD_SETMEM_NC definitions.
3051 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3053 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3055 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3057 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3058 not already defined.
3059 (struct _pthread_descr_struct): Add p_self and p_nr field.
3060 * manager.c (__pthread_handles): Define second element to point
3062 (__pthread_handles_num): Initialize to 2.
3063 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3064 (pthread_start_thread): Likewise.
3065 (pthread_handle_create): Start search for free slot at entry 2.
3066 Initialize new fields p_self and p_nr.
3067 Call __clone with CLONE_PTRACE if available.
3068 (pthread_free): Call FREE_THREAD_SELF if available.
3069 * pthread.c (__pthread_initial_thread): Initialize new fields.
3070 (__pthread_manager_thread): Likewise.
3071 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3073 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3074 elements of the thread descriptor.
3075 * condvar.c: Likewise.
3076 * errno.c: Likewise.
3078 * manager.c: Likewise.
3079 * pthread.c: Likewise.
3080 * ptlongjmp.c: Likewise.
3081 * semaphore.c: Likewise.
3082 * signals.c: Likewise.
3083 * specific.c: Likewise.
3084 * spinlock.c: Likewise.
3086 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3088 * sysdeps/i386/useldt.h: New file.
3089 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3091 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3092 THREAD_SETMEM using __thread_self.
3093 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3095 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3097 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3098 turned out that we didn't need to queue after all.
3100 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3102 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3103 and wastes space; correct types.
3105 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3107 * signals.c (sigaction): Handle NULL argument.
3109 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3111 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3114 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3116 * Makefile (linuxthreads-version): Extract correct number from
3119 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3121 * Banner: Bump version number to 0.8
3122 * FAQ.html: Many updates, in particular w.r.t. debugging.
3123 * manager.c: Support for non-default stacksize for
3124 LinuxThreads-allocated stacks;
3125 don't use guard pages for stacks with default size, rely on
3126 rlimit(RLIMIT_STACK) instead (it's cheaper).
3128 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3129 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3130 * condvar.c: Likewise.
3131 * internals.h: Likewise.
3132 * restart.h: Likewise.
3133 * signals.c: Likewise.
3134 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3136 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3138 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3139 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3140 * Versions: Put __pthread_mutexattr_settype under version
3141 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3142 __pthread_mutexattr_gettype.
3144 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3146 * sysdeps/pthread/bits/libc-lock.h: Make
3147 __pthread_mutexattr_settype weak. Don't make
3148 __pthread_mutexattr_setkind_np weak.
3150 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3152 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3153 call can succeed here.
3155 * mutex.c: Define __pthread_mutexattr_settype and make
3156 __pthread_mutexattr_setkind_np an alias.
3157 Likewise for __pthread_mutexattr_gettype.
3159 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3161 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3164 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3166 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3168 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3170 * Examples/ex6.c: Include <unistd.h> for usleep.
3172 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3174 * Examples/ex4.c (main): Use exit, not pthread_exit.
3176 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3178 * Versions: Add __pthread_mutexattr_gettype and
3179 __pthread_mutexattr_settype.
3180 * lockfile.c: Use __pthread_mutexattr_settype instead of
3181 __pthread_mutexattr_setkind_np.
3182 * mutex.c: Define __pthread_mutexattr_gettype and
3183 __pthread_mutexattr_settype.
3185 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3186 __pthread_mutexattr_settype.
3187 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3188 Use __pthread_mutexattr_settype.
3190 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3192 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3193 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3194 pthread_mutexattr_settype.
3195 * sysdeps/pthread/pthread.h: Declare these functions.
3196 Move pthread_sigmask and pthread_kill declaration in separate header.
3197 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3199 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3201 * Makefile: Add rules to compile and run tests.
3202 * Examples/ex1.c: Little changes to fix warnings.
3203 * Examples/ex2.c: Likewise.
3204 * Examples/ex3.c: Likewise.
3205 * Examples/ex4.c: Likewise.
3206 * Examples/ex5.c: Likewise.
3207 * Examples/ex6.c: New file.
3209 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3211 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3213 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3215 * attr.c: Include <string.h>.
3217 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3219 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3220 * internals.h: Include limits.h.
3221 * manager.c: Use memcpy to copy sched_param.
3222 * ptfork.c: Include errno.h.
3223 * pthread.c: Likewise.
3224 * semaphore.c: Likewise.
3225 * specific.c: Likewise.
3226 * spinlock.h: Likewise.
3227 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3228 type definition to ...
3229 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3231 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3233 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3235 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3236 as macros as demanded in POSIX.1, Annex C.
3238 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3240 * internals.h (struct pthread_request): For free use pthread_t
3241 instead of pthread_descr.
3242 * join.c (pthread_join): Pass thread_id, not th to manager.
3243 (pthread_detach): Likewise.
3244 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3245 (pthread_exited): Remove detached queue code.
3246 (pthread_handle_free): Expect thread ID parameter and use it to
3247 validate the thread decsriptor. Don't use detached queue.
3248 Patches by Xavier Leroy.
3250 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3252 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3253 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3254 __pthread_atfork, __pthread_key_create, __pthread_once.
3255 * internals.h: Doc fix.
3256 * pthread.c (__pthread_initialize): Define again.
3258 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3260 * manager.c (pthread_exited): If thread is not detached put it on
3262 (pthread_handle_free): If thread is not on list with living threads
3263 search on list with detached threads.
3265 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3266 for new definition of pthread_rwlock_t.
3268 * spinlock.c: Correct test whether to compile
3269 __pthread_compare_and_swap or not.
3271 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3273 * attr.c: Finish user stack support. Change locking code to be safe
3274 in situations with different priorities.
3275 * cancel.c: Likewise.
3276 * condvar.c: Likewise.
3277 * internals.h: Likewise.
3279 * manager.c: Likewise.
3280 * mutex.c: Likewise.
3281 * pthread.c: Likewise.
3282 * ptlongjmp.c: Likewise.
3283 * queue.h: Likewise.
3284 * rwlock.c: Likewise.
3285 * semaphore.c: Likewise.
3286 * semaphore.h: Likewise.
3287 * signals.c: Likewise.
3288 * spinlock.c: Likewise.
3289 * spinlock.h: Likewise.
3290 * sysdeps/pthread/pthread.h: Likewise.
3291 Patches by Xavier Leroy.
3293 * sysdeps/i386/i686/pt-machine.h: New file.
3295 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3297 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3298 [sg]et_stackaddr prototypes always available.
3300 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3301 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3303 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3305 * manager.c (pthread_free): Undo patch from 980430.
3306 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3308 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3310 * manager.c: Define __pthread_manager_adjust_prio and use it to
3311 increase priority when needed.
3312 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3313 * mutex.c: Optimize mutexes to wake up only one thread.
3314 * pthread.c: Move PID of manager for global variable in structure
3316 Patches by Xavier Leroy.
3318 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3320 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3322 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3324 * attr.c: Correct typo.
3326 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3328 * manager.c (pthread_free): Unmap guard before the stack.
3329 Patch by Matthias Urlichs.
3331 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3333 * manager.c (pthread_free): Detect already free child.
3334 Patch by Xavier Leroy, reported by Matthias Urlichs.
3336 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3338 * Makefile (linuxthreads-version): Renamed back from
3341 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3343 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3346 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3348 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3349 * internals.h: Add definitions for new spinlock implementation.
3350 * ptlongjmp.c: New file.
3351 * spinlock.c: New file.
3352 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3353 new function __pthread_acquire to prevent deadlocks with thread
3354 with different priorities.
3355 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3357 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3359 * manager.c (__pthread_manager): Reduce first argument to select
3360 to include just the needed file descriptor.
3362 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3364 * manager.c: Fix last patch which caused core dumps.
3366 * pthread.c: Correctly handle missing SIGRTMIN.
3368 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3370 * libpthread.map: Add __libc_internal_tsd_get and
3371 __libc_internal_tsd_set. Add missing cancelable functions. Export
3372 libc internal versions of the cancelable functions.
3374 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3376 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3378 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3380 * attr.c: Implement pthread_attr_[gs]etguardsize,
3381 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3382 Change pthread_attr_init to have two interfaces.
3383 * internals.h (struct _pthread_descr_struct): Add new fields for
3385 * libpthread.map: Add names in GLIBC_2.1 section.
3386 * manager.c (pthread_handle_create): Implement guardsize and
3388 (pthread_free): Likewise.
3389 * pthread.c (pthread_create): Add new interface for changed
3391 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3392 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3395 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3397 * manager.c: Enable resetting of the thread scheduling policy
3398 to SCHED_OTHER when the parent thread has a different one.
3400 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3402 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3403 _POSIX_ASYNCHRONOUS_IO.
3405 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3407 * mutex.c: Implement new mutex types.
3409 * internals.h: Include <signal.h>.
3411 * libpthread.map: Add __erno_location and __h_errno_location.
3413 * errno.c: Return pointer to variable actually in use. This might
3414 not be the one in the thread structure.
3415 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3417 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3418 of manager thread structure.
3419 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3421 * pthread.c: Adapt initializer for thread structures.
3422 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3423 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3424 current thread to global variables.
3426 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3428 * rwlock.c: New file.
3429 * Makefile (libpthread-routines): Add rwlock.
3430 * sysdeps/pthread/pthread.h: Define data structures and declare
3432 * libpthread.map: Add new functions.
3434 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3436 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3437 * sysdeps/arm/Implies: likewise.
3438 * README: Document it.
3440 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3442 * signals.c: Remove unneeded initializer for sigwaited, saving a
3445 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3447 * semaphore.c (sem_init): Set sem_spinlock only if available.
3449 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3451 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3452 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3454 * Makefile: Update from LinuxThreads 0.7.
3455 * internals.h. Likewise.
3456 * manager.c: Likewise.
3457 * mutex.c: Likewise.
3458 * pthread.c: Likewise.
3459 * signals.c: Likewise.
3460 * specific.c: Likewise.
3461 * Examples/ex3.c: Likewise.
3463 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3465 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3468 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3470 * wrapsyscall.c: Add socket functions which are also cancelation
3473 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3475 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3476 New functions for fast thread specific data within libc.
3478 * internals.h: Add new array p_libc_specific to struct
3479 _pthread_descr_struct.
3481 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3483 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3485 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3486 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3488 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3490 * internals.h (struct _pthread_descr_struct): Add definitions for
3491 two-level specific key handling.
3492 * manager.c (pthread_handle_create): Initialize specific memory array.
3493 * specific.c: Implement two-level key handling.
3494 * weaks.c: Don't provide dummy key handling.
3495 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3496 Add definition of __libc_key_t.
3497 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3499 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3500 PTHREAD_DESTRUCTOR_ITERATIONS.
3502 * manager.c (pthread_handle_create): Compare mmap result with
3505 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3506 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3508 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3510 sysdeps/sparc -> sysdeps/sparc/sparc32
3511 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3513 * internals.h: Change definition of THREAD_SELF to be an expression,
3514 not a statement that did a return.
3515 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3516 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3517 Follow Solaris and use a "system reserved" register (%g6) to hold
3518 the thread descriptor.
3519 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3521 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3523 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3524 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3525 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3527 * semaphore.c: Include spinlock.h only when needed.
3529 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3530 keys for entries not in use.
3532 * weaks.c: Implement key handling functions for real.
3534 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3536 Initial sparc64-linux support:
3537 * sysdeps/sparc64/Implies: New file.
3538 * sysdeps/sparc64/pt-machine.h: Likewise.
3540 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3542 * semaphore.c: Include spinlock.h at correct place.
3545 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3547 The Great Bit File Move:
3548 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3549 * sysdeps/powerpc/semaphorebits.h: Likewise.
3550 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3551 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3552 * sysdeps/pthread/libc-lock.h: -> bits/
3553 * sysdeps/pthread/stdio-lock.h: Likewise.
3554 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3555 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3556 * semaphore.h: Likewise.
3557 * sysdeps/pthread/pthread.h: Likewise.
3559 * lockfile.c: <foo.h> -> <bits/foo.h>.
3560 * semaphore.h: Likewise.
3562 * Makefile: (headers): foo.h -> bits/foo.h.
3563 * sysdeps/pthread/Makefile: Likewise.
3565 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3567 * semaphore.c (sem_init): Set sem_spinlock only if available.
3569 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3572 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3574 Update from LinuxThreads 0.6.
3576 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3577 and __sched_get_priority_min instead of names without `__'.
3579 * manager.c: Rewrite large parts to implement opaque pthread_t.
3581 * cancel.c: Adapt for opaque pthread_t type.
3582 * condvar.c: Likewise.
3583 * errno.c: Likewise.
3585 * mutex.c: Likewise.
3586 * pthread.c: Likewise.
3587 * signals.c: Likewise.
3588 * specific.c: Likewise.
3589 * restart.h: Likewise.
3590 * queue.h: Likewise.
3591 * Examples/ex3.c: Likewise.
3592 * Examples/ex4.c: Likewise.
3593 * sysdeps/pthread/pthread.h: Likewise.
3595 * pthread.c: Accumulate time for all threads in thread manager.
3597 * semaphore.c: Implement fallback implementation for architectures
3598 sometimes missing compare-exchange operations.
3600 * cancel.c (pthread_cancel): Validate handle argument.
3601 * join.c (pthread_join): Likewise.
3602 (pthread_detach): Likewise.
3603 * signals.c (pthread_kill): Likewise.
3605 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3607 * queue.h (enqueue): Enqueue thread according to priority.
3609 * internals.c (struct pthread_start_args): New struct for passing
3610 args to cloning function.
3611 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3614 * Examples/Makefile (clean): Pass -f option to rm.
3616 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3617 and define TEST_FOR_COMPARE_AND_SWAP.
3618 * sysdeps/i386/i486/pt-machine.h: Removed.
3620 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3623 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3625 * restart.h (suspend): Clear p_signal before suspending.
3626 (suspend_with_cancellation): Likewise.
3627 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3629 * weaks.c: Make __pthread_key_create return 1.
3630 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3631 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3632 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3635 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3637 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3639 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3641 * sysdeps/powerpc/Implies: Added.
3642 * sysdeps/powerpc/pt-machine.h: Added.
3643 * sysdeps/powerpc/semaphorebits.h: Added.
3645 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3647 * pthread.c (__pthread_initial_thread): Correct
3649 (__pthread_manager_thread): Likewise.
3650 Reported by Andreas Jaeger.
3652 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3654 Since sigset_t no longer fits in a register, we can't pass in the
3655 thread's initial mask so easily. Take this opportunity to simplify
3656 the clone implementation by only accepting a single void* argument.
3658 * manager.c (__pthread_manager): Put thread vitals in the thread
3659 struct instead of as arguments through clone.
3660 (pthread_start_thread): Look for them there.
3661 * internals.h (struct _pthread): Add p_initial_fn,
3662 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3663 * pthread.c (pthread_initialize_manager): Revise clone invocation.