1 2002-07-19 Ulrich Drepper <drepper@redhat.com>
3 * errno.c (__errno_location): Don't define unless !USE_TLS
5 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
6 * sysdeps/i386/tls.h: Likewise.
7 * sysdeps/i386/useldt.h: Likewise.
8 * sysdeps/i386/i686/pt-machine.h: Likewise.
10 2002-07-02 H.J. Lu <hjl@gnu.org>
12 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
14 * sysdeps/mips/pt-machine.h: Likewise.
16 2002-07-14 Ulrich Drepper <drepper@redhat.com>
18 * manager.c (pthread_handle_create): Initialize self-reference in
21 2002-07-01 Jakub Jelinek <jakub@redhat.com>
23 * Examples/ex9.c (main): Remove unused th variable.
25 2002-07-10 Ulrich Drepper <drepper@redhat.com>
27 * wrapsyscall.c: Add __nanosleep alias.
28 * Versions (GLIBC_2.2.6): Add __nanosleep.
29 * bug-sleep.c: New file.
30 * Makefile (tests): Add bug-sleep.
32 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
34 * Examples/ex9.c (main): Use list of children and join them.
35 (thread): Do not call exit.
37 2002-06-20 Ulrich Drepper <drepper@redhat.com>
39 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
40 Unconditionally use the code using spinlock. Use __pthread_release
42 (wait_node_free): Likewise.
43 (__pthread_acquire, __pthread_release): Unconditionally define.
45 2002-06-07 Jakub Jelinek <jakub@redhat.com>
47 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
49 2002-05-24 Ulrich Drepper <drepper@redhat.com>
51 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
53 2002-05-21 Ulrich Drepper <drepper@redhat.com>
55 * sysdeps/pthread/pthread.h (pthread_create): Rename first
57 (pthread_cancel): Likewise.
58 * internals.h (__pthread_create_2_1): Likewise.
59 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
61 2002-05-20 Ulrich Drepper <drepper@redhat.com>
63 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
64 Patch by Glen Nakamura <gen@flex.com>.
66 2002-05-03 Ulrich Drepper <drepper@redhat.com>
68 * signals.c: Move sighandler functions to...
69 * sighandler.c: ...here. New file.
70 * signals.c: Move signal handler related type definitions to...
71 * internals.h: ...here. Add prototypes for signal handlers.
72 * Makefile (libpthread-routines): Add sighandler.
73 (CFLAGS-sighandler.c): Add $(exceptions).
75 2002-04-30 Jakub Jelinek <jakub@redhat.com>
77 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
79 2002-04-08 Ulrich Drepper <drepper@redhat.com>
81 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
82 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
83 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
84 based on previous one and not on current time. Count overruns.
85 Patch by Eric F. Sorton <eric@cctcorp.com>.
87 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
89 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
91 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
92 if it isn't defined yet.
93 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
94 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
96 * sysdeps/sh/tls.h: New file.
98 2002-04-08 Jakub Jelinek <jakub@redhat.com>
100 * manager.c (__pthread_manager_event): Use self instead of arg
101 for INIT_THREAD_SELF.
102 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
103 _pthread_descr_struct) instead of sizeof (*descr).
105 2002-04-05 Ulrich Drepper <drepper@redhat.com>
107 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
108 * sysdeps/alpha/pt-machine.h: Likewise.
109 * sysdeps/arm/pt-machine.h: Likewise.
110 * sysdeps/cris/pt-machine.h: Likewise.
111 * sysdeps/hppa/pt-machine.h: Likewise.
112 * sysdeps/m68k/pt-machine.h: Likewise.
113 * sysdeps/mips/pt-machine.h: Likewise.
114 * sysdeps/powerpc/pt-machine.h: Likewise.
115 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
116 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
117 * sysdeps/sh/pt-machine.h: Likewise.
118 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
119 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
120 * sysdeps/x86_64/pt-machine.h: Likewise.
122 2002-04-05 Jakub Jelinek <jakub@redhat.com>
124 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
125 instead of pthread_mutexattr_setkind_np.
126 (pthread_mutexattr_gettype): Similarly.
127 * man/pthread_mutexattr_setkind_np.man: New.
128 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
130 2002-04-02 Ulrich Drepper <drepper@redhat.com>
132 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
134 2002-03-22 Jakub Jelinek <jakub@redhat.com>
136 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
138 2002-03-22 Ulrich Drepper <drepper@redhat.com>
140 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
142 2002-03-17 Andreas Jaeger <aj@suse.de>
144 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
146 * sysdeps/alpha/pt-machine.h: Likewise.
147 * sysdeps/arm/pt-machine.h: Likewise.
148 * sysdeps/cris/pt-machine.h: Likewise.
149 * sysdeps/hppa/pt-machine.h: Likewise.
150 * sysdeps/i386/i686/pt-machine.h: Likewise.
151 * sysdeps/ia64/pt-machine.h: Likewise.
152 * sysdeps/m68k/pt-machine.h: Likewise.
153 * sysdeps/mips/pt-machine.h: Likewise.
154 * sysdeps/powerpc/pt-machine.h: Likewise.
155 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
156 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
157 * sysdeps/sh/pt-machine.h: Likewise.
158 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
159 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
160 * sysdeps/x86_64/pt-machine.h: Likewise.
162 * internals.h: Move testandset and __compare_and_swap prototypes
165 2002-03-03 Andreas Jaeger <aj@suse.de>
167 * errno.c: Include resolv.h to avoid warning.
169 2002-02-27 Ulrich Drepper <drepper@redhat.com>
171 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
174 2002-02-23 Ulrich Drepper <drepper@redhat.com>
176 * attr.c (pthread_getattr_np): Don't take thread descriptor size
177 into account if USE_TLS.
178 * manager.c (pthread_handle_create): Free TLS data structures if call
179 failed. Pass correct stack to clone if USE_TLS.
180 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
181 * sysdeps/i386/i686/pt-machine.h: Likewise.
182 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
184 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
185 Add p_stackaddr element #if USE_TLS.
186 * internals.c: Include <tls.h>.
187 * manager.c: Integrate creating and handling of thread descriptor
189 * pthread.c: Likewise.
190 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
191 Include <linuxthreads/descr.h> only if TLS is really used.
192 (GET_DTV): New macro.
193 (TLS_INIT_TP): Initialize self pointer.
195 2002-02-17 Andreas Schwab <schwab@suse.de>
197 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
200 2002-02-12 Ulrich Drepper <drepper@redhat.com>
202 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
203 (INSTALL_DTV): Adjust for being passed pointer to element with length.
205 2002-02-08 Ulrich Drepper <drepper@redhat.com>
207 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
209 2002-02-08 Richard Henderson <rth@redhat.com>
211 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
213 2002-02-08 Ulrich Drepper <drepper@redhat.com>
215 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
218 2002-02-07 H.J. Lu <hjl@gnu.org>
220 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
222 (__pthread_spin_lock): Remove ".set noreorder".
223 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
225 2002-02-05 H.J. Lu <hjl@gnu.org>
227 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
229 * sysdeps/mips/pt-machine.h (testandset): Likewise.
230 (__compare_and_swap): Likewise.
232 2002-02-07 Ulrich Drepper <drepper@redhat.com>
234 * internals.h: Move declarations/definitions of
235 __pthread_initial_thread_bos, __pthread_initial_thread,
236 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
237 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
238 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
240 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
241 Define THREAD_GETMEM accordingly.
243 2002-02-06 Ulrich Drepper <drepper@redhat.com>
245 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
247 * sysdeps/i386/tls.h: Define THREAD_DTV.
249 2002-02-04 Ulrich Drepper <drepper@redhat.com>
251 * internals.h: Move thread descriptor definition...
252 * descr.h.: ...here. New file.
253 * sysdeps/i386/tls.h: New file.
255 2002-02-01 H.J. Lu <hjl@gnu.org>
257 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
258 different register in the delayed slot. Use branch likely.
260 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
261 (__compare_and_swap): Return 0 only when failed to compare. Use
264 2002-02-01 Jakub Jelinek <jakub@redhat.com>
266 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
267 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
268 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
269 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
270 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
271 * sysdeps/sparc/sparc64/Versions: New file.
272 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
274 2002-01-31 Ulrich Drepper <drepper@redhat.com>
276 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
277 in SHARED code, use GL(dl_cpuclock_offset).
279 2002-01-28 Andreas Jaeger <aj@suse.de>
281 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
282 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
284 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
286 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
287 (CURRENT_STACK_FRAME): Remove duplicate definition.
288 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
290 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
292 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
295 2002-01-12 Andreas Schwab <schwab@suse.de>
297 * Makefile (test-srcs): Add tst-signal.
298 (tests): Run tst-signal.
299 (distribute): Add tst-signal.sh.
300 * tst-signal.c, tst-signal.sh: New files.
302 2002-01-14 Andreas Jaeger <aj@suse.de>
304 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
306 2002-01-11 Andreas Schwab <schwab@suse.de>
308 * signals.c (sighandler): Initialize all elements to SIG_ERR.
309 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
311 2002-01-06 Richard Henderson <rth@redhat.com>
313 * sysdeps/alpha/elf/pt-initfini.c: New file.
315 2001-12-29 Andreas Jaeger <aj@suse.de>
317 * Examples/ex9.c: Add noreturn attribute for thread.
318 * Examples/ex10.c: Likewise.
319 * Examples/ex13.c (thread_start): Likewise.
320 * Examples/ex15.c (worker): Likewise.
322 * Examples/ex18.c: Include unistd.h for prototype of sleep.
324 2001-12-14 Ulrich Drepper <drepper@redhat.com>
326 * man/pthread_atfork.man: Adjust description of mutex handling
327 after fork for current implementation.
328 * linuxthreads.texi: Likewise [PR libc/2519].
330 2001-12-13 Andreas Schwab <schwab@suse.de>
332 * specific.c (pthread_key_delete): Don't contact the thread
333 manager if no threads have been created yet.
335 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
337 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
338 qualifier to be safe.
340 2001-11-30 Andreas Schwab <schwab@suse.de>
342 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
343 that self is the manager thread, and initialize the thread
345 (thread_self_stack) [THREAD_SELF]: New function to find self via
347 * manager.c (pthread_handle_create): Don't block cancel signal any
350 2001-11-29 Andreas Jaeger <aj@suse.de>
352 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
354 (INIT_THREAD_SELF): New.
355 (THREAD_GETMEM): New.
357 (THREAD_SETMEM): New.
358 (THREAD_SETMEM_NC): New.
359 (FLOATING_STACKS): Define.
360 (ARCH_STACK_MAX_SIZE): Define.
362 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
364 Bugfix to pthread_key_delete. It was iterating over the thread
365 manager's linked list of threads, behind the thread manager's
366 back causing a race. The fix is to have the manager iterate over
367 the threads instead, using a new request type for doing so.
368 * internals.h (struct pthread_request): New manager request type
370 * manager.c (pthread_for_each_thread): New function.
371 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
372 * specific.c (struct pthread_key_delete_helper_args): New type.
373 (pthread_key_delete_helper): New static function.
374 (pthread_key_delete): Use the new thread manager
375 REQ_FOR_EACH_THREAD function to iterate over the threads and set
376 the delete key slot to a null value in each thread.
377 * Examples/ex18.c: New test.
378 * Makefile (tests): Add ex18.
380 2001-11-22 Wolfram Gloger <wg@malloc.de>
382 * pthread.c (pthread_onexit_process): Don't call free
383 after threads have been asynchronously terminated.
385 * manager.c (pthread_handle_exit): Surround cancellation
386 of threads with __flockfilelist()/__funlockfilelist().
388 2001-11-26 Andreas Schwab <schwab@suse.de>
390 * manager.c (pthread_handle_create): Start the child thread with
391 the cancel signal blocked, so that it does not handle it before
392 the thread register is set up. Save errno from failed clone call.
394 2001-11-15 Ulrich Drepper <drepper@redhat.com>
396 * sysdeps/i386/i686/Implies: Removed.
397 * sysdeps/i386/i686/Versions: New file.
399 2001-10-31 Andreas Jaeger <aj@suse.de>
401 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
403 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
405 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
406 to __linuxthreads_pthread_sizeof_descr to match name used by
407 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
408 linuxthreads_db/td_symbol_list.c.
410 2001-09-22 Andreas Jaeger <aj@suse.de>
412 * linuxthreads/tst-context.c: Avoid compile warning.
414 2001-09-20 Andreas Jaeger <aj@suse.de>
416 * shlib-versions: Add x86-64.
418 2001-09-19 Andreas Jaeger <aj@suse.de>
420 * sysdeps/x86_64/Makefile: New file.
421 * sysdeps/x86_64/pspinlock.c: New file.
422 * sysdeps/x86_64/pt-machine.h: New file.
424 2001-09-12 Jakub Jelinek <jakub@redhat.com>
426 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
428 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
430 2001-09-11 Ulrich Drepper <drepper@redhat.com>
431 Wolfram Gloger <wg@malloc.de>
433 * join.c: Protect all communications from and to manager with
435 * manager.c: Likewise.
436 * pthread.c: Likewise.
437 * smeaphore.c: Likewise.
439 2001-08-29 Ulrich Drepper <drepper@redhat.com>
441 * spinlock.c (__pthread_lock): Top max_count value with
442 MAX_ADAPTIVE_SPIN_COUNT.
443 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
445 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
448 2001-08-27 Jakub Jelinek <jakub@redhat.com>
450 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
451 non-opaque type if __USE_UNIX98.
453 2001-08-26 Jakub Jelinek <jakub@redhat.com>
455 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
456 non-opaque lock types also if _IO_MTSAFE_IO is defined.
458 2001-08-23 Roland McGrath <roland@frob.com>
460 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
461 new first argument, skip the cleanup handler if it's zero.
462 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
463 (__libc_lock_define_initialized_recursive): Use it.
464 * sysdeps/pthread/bits/stdio-lock.h: File removed.
465 The sysdeps/generic file from the main tree now suffices.
467 2001-08-22 Roland McGrath <roland@frob.com>
469 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
470 instead of <pthread.h>.
471 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
472 (_IO_lock_initializer): Add braces.
473 (_IO_lock_lock): Use __libc_lock_lock_recursive.
474 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
476 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
477 (__libc_lock_define_initialized_recursive): Use it.
478 (__libc_lock_init_recursive): Likewise.
479 (__libc_lock_fini_recursive): Likewise.
480 (__libc_lock_lock_recursive): Likewise.
481 (__libc_lock_trylock_recursive): Likewise.
482 (__libc_lock_unlock_recursive): Likewise.
483 (__libc_lock_define_recursive): New macro.
485 2001-08-14 Jakub Jelinek <jakub@redhat.com>
487 * lockfile.c (__pthread_provide_lockfile): New variable.
488 * pthread.c (__pthread_require_lockfile): New variable.
489 * cancel.c (__pthread_require_lockfile): New variable.
491 2001-07-31 Ulrich Drepper <drepper@redhat.com>
493 * tst-context.c (threadfct): Initialize context before calling
496 * Examples/ex17.c: Make sure test thread is around long enough.
498 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
500 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
502 2001-07-24 Ulrich Drepper <drepper@redhat.com>
504 * tst-context.c (main): Print explanation before bailing out
505 because context handling is not supported.
507 2001-07-23 Ulrich Drepper <drepper@redhat.com>
509 * Makefile (tests): Add tst-context.
510 * tst-context.c: New file.
512 * sysdeps/pthread/bits/stdio-lock.h: Define
513 _IO_cleanup_region_start_noarg.
515 2001-07-23 Jakub Jelinek <jakub@redhat.com>
517 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
518 (ARCH_STACK_MAX_SIZE): Define.
519 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
520 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
522 2001-07-19 Jakub Jelinek <jakub@redhat.com>
524 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
526 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
527 (ARCH_STACK_MAX_SIZE): Define.
528 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
529 NEED_SEPARATE_REGISTER_STACK.
531 2001-07-16 Andreas Schwab <schwab@suse.de>
533 * Makefile (before-compile): Don't add $(objpfx)crti.o.
534 (omit-deps): Add crti.
535 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
536 it is filtered out of the link command.
538 2001-07-16 Ulrich Drepper <drepper@redhat.com>
540 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
541 to find the right value for __pthread_initial_thread_bos, it's not
542 used. If not FLOATING_STACKS first run
543 __pthread_init_max_stacksize.
545 2001-06-16 H.J. Lu <hjl@gnu.org>
547 * internals.h: Include <stackinfo.h>.
549 * attr.c: Don't include <stackinfo.h> here.
550 * cancel.c: Likewise.
551 * manager.c: Likewise.
552 * pthread.c: Likewise.
553 * ptlongjmp.c: Likewise.
555 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
557 * attr.c: Make _STACK_GROWS_UP work.
558 * internals.h: Likewise.
559 * manager.c: Likewise.
560 * pthread.c: Likewise.
562 2001-06-15 H.J. Lu <hjl@gnu.org>
564 * pthread.c (__pthread_reset_main_thread): Fix a typo.
566 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
568 * semaphore.h: Use struct _pthread_fastlock as an element of
569 sem_t instead of an identical struct.
570 * rwlock.c: Remove casts.
571 * semaphore.c: Likewise.
573 2001-04-30 Alan Modra <amodra@one.net.au>
575 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
577 2001-05-25 Bruce Mitchener <bruce@cubik.org>
579 * linuxthreads.texi: Spelling corrections.
581 2001-05-25 Ulrich Drepper <drepper@redhat.com>
583 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
584 returning successfully.
585 Patch by Gene Cooperman <gene@ccs.neu.edu>.
587 2001-05-24 Ulrich Drepper <drepper@redhat.com>
589 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
590 serious work try once whether the lock is uncontested.
591 Remove duplicate reading of __status before loop.
592 Change suggested by Hans Boehm <hans_boehm@hp.com>.
594 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
595 (__pthread_alt_trylock): Likewise.
597 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
599 Memory barrier overhaul following line by line inspection.
600 * mutex.c (pthread_once): Missing memory barriers added.
601 * pthread.c (__pthread_wait_for_restart_signal,
602 __pthread_timedsuspend_new, __pthread_restart_new): Added
603 memory barriers ``just in case'' and for documentary value.
604 * spinlock.c (__pthread_release): New inline function for releasing
605 spinlock, to complement __pthread_acquire. Includes memory
606 barrier prior to assignment to spinlock, and __asm __volatile
607 dance to prevent reordering or optimization of the spinlock access.
608 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
609 __pthread_alt_timedlock, __pthread_alt_unlock,
610 __pthread_compare_and_swap): Updated to use new __pthread_release
611 instead of updating spinlock directly.
612 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
613 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
614 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
615 Memory barrier overhaul. Lots of missing memory barriers added,
616 a couple needless ones removed.
617 * spinlock.c (__pthread_compare_and_swap): testandset optimization
618 removed, just calls __pthread_acquire, which has the new read
619 barrier in it before its testandset.
621 2001-05-20 Roland McGrath <roland@frob.com>
623 * Makeconfig: New file, variables used to be in main libc Makeconfig.
625 2001-05-09 Geoff Keating <geoffk@redhat.com>
627 * sysdeps/powerpc/pt-machine.h
628 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
629 (__compare_and_swap): Remove memory barriers.
630 (__compare_and_swap_with_release_semantics): New function.
632 2001-04-24 Andreas Jaeger <aj@suse.de>
634 * wrapsyscall.c: send* and recv* return ssize_t.
636 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
637 mutex instead of double locking it.
638 Reported by Pierre Artaud <partaud@sodatec.com>.
640 2001-04-23 Ulrich Drepper <drepper@redhat.com>
642 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
643 using #ifdef whether the clock is available.
644 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
646 * sysdeps/ia64/Versions: New file.
648 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
649 have to call __gmon_start__ in the libpthread DSO.
650 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
652 * Makefile (libpthread-routines): Add ptclock_gettime and
654 * internals.h: Don't use cpuclock-init.h definitions, use
655 hp-timing.h definitions.
656 * pthread.c: Likewise.
657 * manager.c: Likewise.
658 * ptclock_gettime.c: New file.
659 * ptclock_settime.c: New file.
660 * internals.h: Fix parameter type for __pthread_clock_gettime and
661 __pthread_clock_settime.
663 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
664 * sysdeps/i386/i586/ptclock_settime.c: Removed.
665 * sysdeps/i386/i586/Makefile: Removed.
667 2001-04-22 Ulrich Drepper <drepper@redhat.com>
669 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
670 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
672 2001-04-21 Andreas Jaeger <aj@suse.de>
674 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
675 attribute, remove statements that will never be executed.
676 (thread_func): Remove mutex_unlock call since it's never executed.
677 (thread_func): Fix comment as suggested by Jakub Jelinek.
679 * manager.c (__pthread_manager): Add noreturn
681 (pthread_start_thread): Likewise, remove return statement.
682 (pthread_start_thread_event): Likewise.
683 Add noreturn attribute for pthread_handle_exit.
684 * weaks.c: Add noreturn attribute for pthread_exit.
686 * internals.h: Add __pthread_clock_gettime and
687 __pthread_clock_settime prototypes.
689 2001-04-21 Ulrich Drepper <drepper@redhat.com>
691 * internals.h: Include <cpuclock-init.h>.
692 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
693 CPUCLOCK_VARDEF is defined.
694 * pthread.c (__pthread_initialize_minimal): Initialize
695 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
696 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
697 for new thread to current CPU clock value.
699 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
701 * sysdeps/i386/i586/Makefile: New file.
702 * sysdeps/i386/i586/Versions: New file.
703 * sysdeps/i386/i586/ptclock_gettime.c: New file.
704 * sysdeps/i386/i586/ptclock_settime.c: New file.
705 * sysdeps/i386/i686/Implies: New file.
707 2001-04-18 Jakub Jelinek <jakub@redhat.com>
709 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
710 $generated, not $postclean-generated.
712 2001-04-18 Andreas Jaeger <aj@suse.de>
714 * Makefile (otherlibs): Added.
716 2001-04-18 Jakub Jelinek <jakub@redhat.com>
718 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
720 2001-04-16 Ulrich Drepper <drepper@redhat.com>
722 * signals.c (sigwait): NSIG is no signal number. Block all
723 signals while in signal handler for signals in SET.
724 Patch by Manfred Spraul <manfred@colorfullife.com>.
726 2001-04-12 Ulrich Drepper <drepper@redhat.com>
728 * tst-cancel.c: Disable most tests. Add new test where all
729 cleanup handlers must run.
730 * Makefile (tests): Add tst-cancel again.
732 * cancel.c (__pthread_perform_cleanup): Correct condition for
733 leaving cleanup loop early.
735 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
736 all the files which use CURRENT_STACK_FRAME.
737 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
738 __builtin_frame_address.
739 * sysdeps/i386/i686/pt-machine.h: Likewise.
741 2001-04-11 Ulrich Drepper <drepper@redhat.com>
743 * Makefile (tests): Comment out tst-cancel for now.
745 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
746 temporary file in object directory.
747 * Makefile: Don't allow inlining when compiling tst-cancel.c.
748 Pass $(objpfx) to tst-cancel.
750 2001-04-11 David S. Miller <davem@redhat.com>
752 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
753 up closer to user local variables so that new cleanup heuristics work.
754 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
756 2001-04-11 Ulrich Drepper <drepper@redhat.com>
758 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
760 (_pthread_cleanup_push_defer): Likewise.
762 * tst-cancel.c (main): Fix loop printing cleanup output.
764 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
766 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
768 (__pthread_spin_trylock): Likewise.
769 * sysdeps/sh/pt-machine.h (testandset): Likewise.
771 2001-04-10 Ulrich Drepper <drepper@redhat.com>
773 * join.c (pthread_exit): Move code to new function __pthread_do_exit
774 which takes an extra parameter with the current frame pointer.
775 Call new function with CURRENT_STACK_FRAME.
776 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
777 with the new parameter.
778 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
779 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
780 this parameter as the initial value the cleanup handler records are
781 compared against. No active cleanup handler record must have an
782 address lower than the previous one and the initial record must be
783 above (below on PA) the frame address passed in.
784 (pthread_setcancelstate): Call __pthread_do_exit instead of
786 (pthread_setcanceltype): Likewise.
787 (pthread_testcancel): Likewise.
788 (_pthread_cleanup_pop_restore): Likewise.
789 * condvar.c (pthread_cond_wait): Likewise.
790 (pthread_cond_timedwait_relative): Likewise.
791 * manager.c (pthread_start_thread): Likewise.
792 * oldsemaphore.c (__old_sem_wait): Likewise.
793 * pthread.c (pthread_handle_sigcancel): Likewise.
794 * semaphore.c (__new_sem_wait): Likewise.
795 (sem_timedwait): Likewise.
796 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
797 to limit the cleanup handlers which get run.
798 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
799 for __pthread_perform_cleanup.
801 * Makefile (tests): Add tst-cancel.
802 * tst-cancel.c: New file.
804 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
806 * sysdeps/cris/pt-machine.h: New file.
807 * sysdeps/cris/pspinlock.c: New file.
809 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
811 * shlib-versions: Add case for Linux on CRIS.
813 2001-03-26 Ulrich Drepper <drepper@redhat.com>
815 * attr.c (pthread_getattr_np): Correct computation of stack size
816 for machiens with register stack.
818 * Examples/ex17.c (main): Correct detection of failed mmap call.
820 2001-03-21 Jakub Jelinek <jakub@redhat.com>
822 * pthread.c (__pthread_initialize_manager): Fix a typo.
824 2001-03-21 Jakub Jelinek <jakub@redhat.com>
826 * attr.c (__pthread_attr_setstack): Fix alignment check.
827 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
828 * Makefile (tests): Add ex17 test.
829 * Examples/ex17.c: New test.
831 2001-03-20 Ulrich Drepper <drepper@redhat.com>
833 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
834 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
835 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
837 2001-03-18 Ulrich Drepper <drepper@redhat.com>
839 * Makefile: When generating DSO link with libc_nonshared.a.
841 2001-02-26 Jakub Jelinek <jakub@redhat.com>
843 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
845 2001-02-23 Jakub Jelinek <jakub@redhat.com>
847 * internals.h (__pthread_init_max_stacksize): New prototype.
848 * attr.c (__pthread_attr_setstacksize): Call
849 __pthread_init_max_stacksize if not yet initialized.
850 * pthread.c (__pthread_init_max_stacksize): New function.
851 (__pthread_initialize_manager): Call it.
852 Patch by <dtc@cmucl.cons.org>.
854 2001-03-16 Ulrich Drepper <drepper@redhat.com>
856 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
858 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
860 * shlib-versions: Add rule for Linux on 64 bit S/390.
861 * sysdeps/s390/s390-64/pt-machine.h: New file.
862 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
864 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
866 * sysdeps/s390/pt-machine.h: Move to...
867 * sysdeps/s390/s390-32/pt-machine.h: ...here.
868 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
870 2001-03-15 Ulrich Drepper <drepper@redhat.com>
872 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
873 * attr.c: Implement pthread_getattr_np.
874 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
875 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
876 * manager.c (pthread_handle_create): Initialize p_inheritsched.
878 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
880 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
883 2001-02-20 Hans Boehm <hans_boehm@hp.com>
885 * manager.c (manager_mask): Removed static vesion. Now always local
886 to __pthread_manager().
887 (manager_mask_all): Removed completely.
888 (__pthread_manager): Remove manager_mask_all initialization.
889 (pthread_handle_create): Remove code to set and reset signal mask
890 around __clone2() calls.
892 2001-02-17 Jakub Jelinek <jakub@redhat.com>
894 * spinlock.c (__pthread_lock): Force lock->__status to be read from
895 memory on every spin.
897 2001-02-10 Andreas Jaeger <aj@suse.de>
899 * Makefile (extra-objs): New.
901 2001-02-09 Jakub Jelinek <jakub@redhat.com>
903 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
904 __pthread_initialize_minimal prototype.
906 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
908 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
910 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
912 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
914 2001-02-06 Ulrich Drepper <drepper@redhat.com>
916 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
917 broken code. Patch by Jes Sorensen.
919 2001-02-06 Andreas Jaeger <aj@suse.de>
921 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
923 * internals.h: ...here.
925 2001-02-05 Jes Sorensen <jes@linuxcare.com>
927 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
929 2001-02-02 Ulrich Drepper <drepper@redhat.com>
931 * Versions: Remove __pthread_initialize_minimal.
933 2001-02-01 Ulrich Drepper <drepper@redhat.com>
935 * Makefile: Add rules to build crti.o and make it being used in
936 building libpthread.so.
937 * sysdeps/i386/Makefile: New file.
938 * sysdeps/pthread/pt-initfini.c: New file.
940 * pthread.c: Cleanups.
942 2001-01-28 Andreas Jaeger <aj@suse.de>
944 * oldsemaphore.c (__old_sem_init): Adjust for last change.
945 * sysdeps/pthread/bits/libc-lock.h: Likewise.
946 * spinlock.c: Likewise.
948 2001-01-28 Ulrich Drepper <drepper@redhat.com>
950 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
951 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
952 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
953 * pthread.c: Likewise.
954 * spinlock.h: Likewise.
955 * sysdeps/pthread/pthread.h: Likewise.
957 2001-01-26 Ulrich Drepper <drepper@redhat.com>
959 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
960 as struct __pthread_attr_s.
962 * semaphore.h (sem_t): Cleanup namespace, rename status and
965 2001-01-13 Jakub Jelinek <jakub@redhat.com>
967 * pthread.c (pthread_onexit_process): Clear
968 __pthread_manager_thread_bos after freeing it.
969 * Makefile (tests): Add ex16.
970 * Examples/ex16.c: New file.
972 2001-01-11 Jakub Jelinek <jakub@redhat.com>
974 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
976 * pthread.c (pthread_exit_process): Rename to...
977 (pthread_onexit_process): ...this.
978 (pthread_atexit_process, pthread_atexit_retcode): New.
979 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
980 and only if HAVE_Z_NODELETE is not defined.
981 (__pthread_initialize_manager): Register pthread_atexit_retcode
984 2001-01-11 Ulrich Drepper <drepper@redhat.com>
986 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
988 2001-01-11 Jakub Jelinek <jakub@redhat.com>
990 * Makefile (tests): Add ex15.
991 * Examples/ex15.c: New test.
993 2001-01-08 Ulrich Drepper <drepper@redhat.com>
995 * pthread.c (pthread_exit_process): Free memory allocated for
998 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1000 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1001 (pthread_free): Always unmap the stack. It's safe now that we don't
1002 use MAP_FIXED to allocate stacks.
1004 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1006 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1008 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1010 2000-11-15 Wolfram Gloger <wg@malloc.de>
1012 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1013 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1015 2000-12-27 Andreas Jaeger <aj@suse.de>
1017 * Examples/ex13.c: Make local functions static.
1018 * ecmutex.c: Likewise.
1019 * joinrace.c: Likewise.
1020 * Examples/ex14.c: Likewise.
1022 * Examples/ex2.c: Make local functions static; reformat.
1023 * Examples/ex1.c: Likewise.
1024 * Examples/ex4.c: Likewise.
1025 * Examples/ex5.c: Likewise.
1026 * Examples/ex7.c: Likewise.
1028 * oldsemaphore.c: Add prototypes to shut up GCC.
1029 * pt-machine.c: Likewise.
1031 * weaks.c: Add prototype for pthread_exit.
1033 * internals.h: Add some prototypes, format prototypes and add
1035 Move __libc_waitpid prototype to include/sys/wait.h.
1037 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1038 * mutex.c: Likewise.
1039 * specific.c: Likewise.
1040 * ptfork.c: Likewise.
1042 * lockfile.c: Include internals.h to get prototypes.
1043 * events.c: Likewise.
1044 * sysdeps/alpha/pspinlock.c: Likewise.
1045 * sysdeps/arm/pspinlock.c: Likewise.
1046 * sysdeps/hppa/pspinlock.c: Likewise.
1047 * sysdeps/i386/pspinlock.c: Likewise.
1048 * sysdeps/ia64/pspinlock.c: Likewise.
1049 * sysdeps/m68k/pspinlock.c: Likewise.
1050 * sysdeps/mips/pspinlock.c: Likewise.
1051 * sysdeps/powerpc/pspinlock.c: Likewise.
1052 * sysdeps/s390/pspinlock.c: Likewise.
1053 * sysdeps/sh/pspinlock.c: Likewise.
1054 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1055 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1056 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1058 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1060 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1061 (__pthread_attr_getstack): Return correct address.
1062 Add warnings for using pthread_attr_getstackaddr and
1063 pthread_attr_setstackaddr.
1065 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1067 * Examples/ex6.c (test_thread): Make static.
1068 * Examples/ex12.c (test_thread): Make static and add noreturn
1071 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1073 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1074 and compare_and_swap_with_release_semantics returns int not long.
1076 2000-12-17 Andreas Jaeger <aj@suse.de>
1078 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1080 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1081 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1082 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1083 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1084 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1085 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1087 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1089 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1090 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1092 2000-12-17 Andreas Jaeger <aj@suse.de>
1094 * internals.h: Add prototypes for testandset and
1095 __compare_and_swap to shut up gcc warnings.
1097 2000-12-06 Wolfram Gloger <wg@malloc.de>
1099 * join.c (pthread_detach): Allow case where the thread has already
1102 2000-12-05 Andreas Jaeger <aj@suse.de>
1104 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1105 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1106 (__compare_and_swap): Likewise.
1107 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1109 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1111 * Examples/ex3.c (main): Cast int to long before casting to void *.
1112 (search): Cast void * to long, not int.
1113 * Examples/ex8.c (main, thread): Similarly.
1114 * Examples/ex11.c (main): Similarly.
1115 * Examples/ex14.c (worker, do_test): Similarly.
1116 * ecmutex.c (worker, do_test): Similarly.
1117 (nlocks): Cast to int.
1119 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1121 * linuxthreads.texi: Add documentation for pthreads attributes
1122 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1123 patch. Document pthread_[sg]etconcurrency(). Mark
1124 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1126 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1128 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1130 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1131 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1133 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1135 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1136 not doing it right now.
1137 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1139 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1141 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1144 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1146 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1147 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1149 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1150 discussing mutexes. (As per the Unix98 name for the API.)
1151 Changes documentation for pthread_mutexattr_setkind_np() and
1152 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1153 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1154 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1155 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1156 Begins to introduce discussion of the ``timed'' mutex type. This
1157 discussion is currently incomplete.
1158 Patch by Bruce Mitchener <bruce@cubik.org>.
1160 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1161 Yutaka Niibe <gniibe@chroot.org>
1163 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1164 has restrictions, use register.
1166 2000-10-23 Andreas Schwab <schwab@suse.de>
1168 * Examples/ex14.c (TIMEOUT): Override default timeout.
1170 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1172 * specific.c: Protect tsd array modification in thread data
1173 structures by getting the thread lock in pthread_key_delete and
1174 __pthread_destroy_specifics.
1175 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1177 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1179 * sysdeps/pthread/bits/initspin.h: New file.
1180 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1181 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1182 (__pthread_alt_init_lock): Likewise.
1183 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1185 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1187 * oldsemaphore.c (__old_sem_init): Release lock with
1188 LT_SPINLOCK_INIT, not zero.
1189 * spinlock.c (__pthread_unlock): Likewise.
1190 (__pthread_alt_lock): Likewise.
1191 (__pthread_alt_timedlock): Likewise.
1192 (__pthread_alt_unlock): Likewise.
1193 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1194 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1195 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1196 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1198 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1200 * shlib-versions: Add version definitions for hppa-linux.
1202 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1204 * sysdeps/hppa/pspinlock.c: New file.
1205 * sysdeps/hppa/pt-machine.h: New file.
1206 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1208 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1210 * mutex.c (__pthread_mutex_destroy): Correct test of
1211 busy mutex for mutexes using alternate fastlocks.
1212 Patch by dtc@cmucl.cons.org.
1214 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1216 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1218 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1220 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1221 test for owner first.
1222 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1224 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1227 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1229 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1230 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1232 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1233 _POSIX_MONOTONIC_CLOCK.
1235 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1238 2000-09-20 Andreas Jaeger <aj@suse.de>
1240 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1241 "testrtsig.h" conditional.
1243 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1245 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1246 pthread_attr_setstack.
1247 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1248 pthread_attr_setstack.
1249 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1251 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1253 * Examples/ex14.c: New file.
1254 * Makefile (tests): Add ex14.
1256 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1257 mutex. Patch by dtc@cmucl.cons.org.
1259 * ecmutex.c: New file.
1260 * Makefile (tests): Add ecmutex.
1262 2000-09-04 H.J. Lu <hjl@gnu.org>
1264 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1265 instead of roundup to round up to the page size.
1267 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1269 * manager.c (pthread_exited): Correctly report event as TD_REAP
1270 instead of TD_DEATH. Fix comments.
1272 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1274 * spinlock.h (testandset): Add cast to avoid warning.
1275 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1277 2000-09-02 Andreas Jaeger <aj@suse.de>
1279 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1282 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1284 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1285 Fix typo in last patch (_mode -> _flags).
1287 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1288 Provide definition which respects _IO_USER_LOCK flag.
1290 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1292 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1295 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1297 * Makefile: Add rules to build and run unload.
1298 * unload.c: New file.
1300 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1302 * sysdeps/pthread/pthread.h
1303 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1304 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1306 2000-08-24 Andreas Jaeger <aj@suse.de>
1308 * Examples/ex13.c: Include <string.h> for strerror prototype and
1309 <stdlib.h> for abort prototype.
1310 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1311 (thread_start): Remove unused variable err.
1312 (main): Silence GCC warnings.
1314 2000-08-22 Andreas Jaeger <aj@suse.de>
1316 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1318 * Makefile (tests): Add ex13.
1320 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1322 * semaphore.h: Add restrict where required by AGd4.
1323 * sysdeps/pthread/pthread.h: Likewise.
1324 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1326 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1328 * Makefile (tests): Add ex12. Add rule to build it.
1329 * Examples/ex12.c: New file.
1331 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1333 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1334 even though the implementation is not quite complete (but it reports
1335 it). Define _POSIX_MESSAGE_PASSING to -1.
1336 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1338 2000-08-12 Andreas Jaeger <aj@suse.de>
1340 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1342 (__compare_and_swap): Likewise.
1343 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1345 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1347 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1348 p_h_errnop correctly and not to NULL.
1350 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1352 * Banner: Bump version number to 0.9.
1354 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1356 * Makefile (tests): Add tststack. Add rule to build the program.
1357 * tststack.c: New file.
1359 * internals.h: Declare __pthread_max_stacksize.
1360 * pthread.c (__pthread_max_stacksize): New variable.
1361 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1363 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1364 (pthread_allocate_stack): Allow kernel to choose stack address if
1365 FLOATING_STACKS. This also handles variable-sized stacks.
1366 Always allocate stack and guardpage together. Use mprotect to
1367 change guardpage access.
1368 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1369 ARCH_STACK_MAX_SIZE.
1371 * attr.c (__pthread_attr_setstacksize): Also test value against
1374 * manager.c (__pthread_nonstandard_stacks): Define only if
1375 THREAD_SELF is not defined.
1376 (pthread_allocate_stack): Always initialize gardaddr to a correct
1378 (pthread_handle_create): Unmap thread with one call.
1379 (pthread_free): Remove test for initial thread before removing stack.
1380 Unmap stack with one call.
1382 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1383 1 to avoid removing the stack.
1385 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1387 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1388 load of spin lock to prime the cache before the atomic compare and
1389 exchange operation (cmpxchg4). This avoids the spinning on the
1390 cmpxchg4 instruction and reduces movement of the cache line back
1391 and forth between the processors (explanation by Asis K. Mallick
1392 from Intel). This basically makes the implementation operate the
1393 same as the Linux kernel implementation.
1395 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1396 * sysdeps/ia64/pspinlock.c: New file.
1398 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1400 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1401 * spinlock.h: ...here. Remove locking.
1402 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1404 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1405 (rwlock_rd_extricate_func): Don't determine self, let
1406 __pthread_lock do it.
1407 (rwlock_wr_extricate_func): Likewise.
1408 (rwlock_have_already): Optimize *pself handling a bit.
1410 * mutex.c: Use __builtin_expect.
1411 * pthread.c: Likewise.
1413 2000-08-02 Andreas Jaeger <aj@suse.de>
1415 * sysdeps/s390/pspinlock.c: New file.
1416 * sysdeps/s390/pt-machine.h: New file.
1417 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1419 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1421 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1423 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1425 2000-07-26 Andreas Jaeger <aj@suse.de>
1427 * pthread.c: Initialize p_sem_avail.
1429 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1431 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1432 * semaphore.c: Handle spurious wakeups.
1434 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1435 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1437 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1438 (__pthread_wait_for_restart): Likewise.
1440 * condvar.c (pthread_cond_wait): Also check whether thread is
1441 cancelable before aborting loop.
1442 (pthread_cond_timedwait): Likewise.
1444 * signals.c (pthread_sighandler): Remove special code to restrore
1446 (pthread_sighandler_t): Likewise.
1448 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1450 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1451 * pthread.c: Include <resolv.h>.
1452 (_res): Undefine. Add extern declaration.
1454 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1456 * pthread.c (__pthread_initial_thread): Update initializer.
1457 (__pthread_manager_thread): Likewise.
1458 (pthread_initialize): Move setrlimit call to...
1459 (__pthread_initialize_manager): ...here.
1460 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1462 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1463 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1465 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1467 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1468 __compare_and_swap to define testandset.
1469 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1470 Define IMPLEMENT_TAS_WITH_CAS.
1472 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1474 * Makefile: Pass -z nodelete to linker for libpthread.so
1475 generation if it understand this option.
1477 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1479 * manager.c (pthread_handle_create): Remove initialization of
1480 new_thread->p_res._sock.
1482 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1484 Bugfixes to the variant of the code for machines with no compare
1487 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1488 node was not being properly enqueued, due to failing to update
1489 the lock->__status field.
1491 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1492 being set inappropriately, causing the suspend function to be called
1493 with a null self pointer and crash.
1495 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1497 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1498 compare&swap is available.
1500 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1503 * pthread.c (pthread_initialize): Don't use sysconf to determine
1504 whether the machine has more than one processor.
1506 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1507 removed thread_self calls.
1509 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1511 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1512 __compare_and_swap to compare_and_swap in code which assumes
1513 compare swap is available.
1515 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1517 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1518 bug whereby thr field of waitnode structure would not be correctly
1519 set unless a null self pointer is passed to the functions.
1520 Eliminated redundant calls to thread_self().
1522 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1524 * pthread.c (__pthread_initialize_manager): Lock
1525 __pthread_manager_thread.p_lock before calling clone.
1527 2000-05-05 H.J. Lu <hjl@gnu.org>
1529 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1530 have acquire semantics.
1531 (__compare_and_swap_with_release_semantics): New inline
1533 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1535 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1537 * manager.c: Fix the problem with signals at startup.
1538 Change the way that thread stacks are allocated on IA64.
1539 Clean up some of the guard page allocation stuff.
1541 1999-12-19 H.J. Lu <hjl@gnu.org>
1543 * internals.h (page_roundup): New.
1544 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1546 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1547 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1550 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1552 * manager.c (pthread_allocate_stack): Unmap the stack top
1553 if failed to map the stack bottom.
1555 (pthread_free): Fix the guard page.
1557 * pthread.c (pthread_initialize): Set rlimit correctly for
1558 NEED_SEPARATE_REGISTER_STACK.
1560 1999-12-16 H.J. Lu <hjl@gnu.org>
1562 * pthread.c (__pthread_initialize_manager): Pass
1563 __pthread_manager_thread_bos instead of
1564 __pthread_manager_thread_tos to __clone2.
1566 1999-12-16 H.J. Lu <hjl@gnu.org>
1568 * manager.c (pthread_allocate_stack): Correct the calculation
1569 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1572 1999-12-13 H.J. Lu <hjl@gnu.org>
1574 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1575 bit after setting ar.ccv.
1577 1999-12-12 H.J. Lu <hjl@gnu.org>
1579 * manager.c (pthread_allocate_stack): Make the starting
1580 address of the stack bottom page aligned. FIXME: it may
1581 need changes in other places.
1582 (pthread_handle_create): Likewise.
1584 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1586 * manager.c (pthread_allocate_stack): Handle
1587 NEED_SEPARATE_REGISTER_STACK.
1588 (pthread_handle_create): Likewise.
1589 * pthread.c (__pthread_initialize_manager): Likewise.
1591 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1593 1999-12-02 H.J. Lu <hjl@gnu.org>
1595 * sysdeps/ia64/pt-machine.h: New.
1597 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1599 * wrapsyscall.c: Mark non-__ protected names as weak.
1602 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1604 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1606 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1608 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1609 Add tests also to new alternative spinlock implementation.
1610 * spinlock.h: Likewise.
1611 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1613 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1615 * Version: Export __sigaction.
1616 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1618 * pthread.c: Use __libc_sigaction instead of __sigaction.
1620 * condvar.c: Implement pthread_condattr_getpshared and
1621 pthread_condattr_setpshared.
1622 * mutex.c: Implement pthread_mutexattr_getpshared and
1623 pthread_mutexattr_setpshared.
1624 * Versions: Export new functions.
1625 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1627 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1628 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1631 2000-07-04 Greg McGary <greg@mcgary.org>
1633 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1634 pragmas. Include bp-sym.h only if _LIBC.
1636 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1638 * spinlock.c (__pthread_unlock): Properly place write barrier.
1639 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1641 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1643 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1644 faster on SMP systems. No more emulation of compare&swap for adaptive
1646 * spinlock.h: Likewise.
1647 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1648 Replace fast with adaptive mutex.
1649 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1650 * condvar.c: Likewise.
1651 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1652 * internals.h: Declare __pthread_smp_kernel.
1653 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1654 _pthread_fastlock structure.
1655 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1657 * pthread.c: Remove initialization to zero from global variables.
1659 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1661 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1663 2000-06-28 Greg McGary <greg@mcgary.org>
1665 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1666 pthread functions that have pointers in their return+arg signatures.
1668 2000-06-27 Greg McGary <greg@mcgary.org>
1670 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1671 extern declarations of pthread functions that have pointers in
1672 their return+arg signatures.
1674 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1676 * Makefile (tests): Add ex11. Add rules to build it.
1677 * Examples/ex11.c: New file.
1678 * rwlock.c: Fix complete braindamaged previous try to implement
1681 * spinlock.c: Pretty print.
1683 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1685 * Makefile (tests): Add ex10. Add rules to build it.
1686 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1687 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1688 * condvar.c (pthread_cond_wait): Allow mutex of kind
1689 PTHREAD_MUTEX_TIMED_NP.
1690 (pthread_cond_timedwait_relative): Likewise.
1691 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1692 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1693 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1694 (__pthread_mutex_lock): Use __pthread_alt_lock for
1695 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1696 (__pthread_mutex_timedlock): New function.
1697 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1698 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1699 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1700 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1701 * spinlock.c: Implement alternate fastlocks.
1702 * spinlock.h: Add prototypes.
1703 * Examples/ex10.c: New file.
1704 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1705 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1707 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1708 (__pthread_rwlock_timedrdlock): New function.
1709 (__pthread_rwlock_timedwrlock): New function.
1710 Use laternate fastlock function everywhere.
1712 2000-06-21 Andreas Jaeger <aj@suse.de>
1714 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1717 * join.c: Include <stdlib.h> for exit prototype.
1719 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1721 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1723 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1724 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1726 * Makefile (libpthread-routines): Add barrier.
1727 (tests): Add ex9. Add rule to build ex9.
1728 * Versions: Export barrier functions.
1729 * barrier.c: New file.
1730 * Examples/ex9.c: New file.
1731 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1732 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1733 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1735 2000-06-19 H.J. Lu <hjl@gnu.org>
1737 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1738 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1739 (compare_and_swap_with_release_semantics): New. Default to
1740 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1743 * spinlock.c (__pthread_unlock): Call
1744 compare_and_swap_with_release_semantics () instead of
1745 compare_and_swap ().
1747 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1749 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1751 * sysdeps/pthread/timer_delete.c: Likewise.
1752 * sysdeps/pthread/timer_getoverr.c: Likewise.
1753 * sysdeps/pthread/timer_gettime.c: Likewise.
1754 * sysdeps/pthread/timer_settime.c: Likewise.
1756 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1758 Timer nodes are now reference counted, and can be marked
1759 as deleted. This allows for the safe release of the global mutex
1760 in the middle without losing the timer being operated on.
1762 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1763 member is now an enum with three values, so that an intermediate
1764 state can be represented (deleted but not free for reuse yet).
1765 New refcount member added.
1766 * sysdeps/pthread/timer_routines.c: Likewise.
1768 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1769 timer_valid): New inline functions added.
1771 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1772 restructured, recursive deadlock bug fixed.
1774 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1775 timer_addref to ensure that timer won't be deleted while mutex is not
1776 held. Also uses timer_invalid to perform validation of timer handle.
1777 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1778 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1780 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1782 * shlib-versions: Add entry for SH.
1783 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1785 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1787 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1788 tightened up some critical regions and micro-optimized some list
1791 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1792 Returns int value now to indicate whether timer was queued at head.
1793 * sysdeps/pthread/posix-timer.h: Likewise.
1794 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1795 new return value from __timer_thread_queue_timer to avoid waking
1796 up timer thread unnecessarily.
1798 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1799 inuse flag, because this requires mutex to be held. Callers updated
1800 to do the check when they have the mutex.
1801 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1803 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1804 regions: avoids making system calls while holding timer mutex, and
1805 a few computations were moved outside of the mutex as well.
1806 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1808 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1809 to list_unlink_ip, meaning idempotent. Pointer manipulation
1810 changed to get better better code out of gcc.
1811 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1812 version of list_unlink added here.
1813 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1814 function in all places: idempotent one for timers, non-idempotent
1815 one for thread nodes.
1816 * sysdeps/pthread/timer_settime: Likewise.
1817 * sysdeps/pthread/timer_routines.c: Likewise.
1819 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1821 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1822 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1824 * sysdeps/pthread/Makefile: Remove tests definition.
1826 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1827 Yutaka Niibe <gniibe@chroot.org>
1829 * sysdeps/sh/pspinlock.c: New file.
1830 * sysdeps/sh/pt-machine.h: New file.
1832 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1834 * Makefile (tests): Add joinrace.
1836 * Examples/ex6.c: Test return value of pthread_join.
1838 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1840 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1841 (__pthread_spin_trylock): Implement.
1842 (__pthread_spin_unlock): Implement.
1843 (__pthread_spin_init): Implement.
1844 (__pthread_spin_destroy): Implement.
1846 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1848 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1849 really append the entry.
1851 2000-06-10 Andreas Jaeger <aj@suse.de>
1853 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1855 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1857 * sysdeps/pthread/timer_create.c: Thread matching now done on
1858 clock type as well as thread attributes.
1859 There are individual global signal-delivering threads for
1860 different clock types.
1861 * sysdeps/pthread/posix-timer.h: Likewise.
1862 * sysdeps/pthread/timer_routines.c: Likewise.
1864 * sysdeps/pthread/timer_routines.c: Thread allocation and
1865 deallocation function now remembers to put thread on active
1866 list and remove from active list.
1867 Thus now the feature of binding multiple timers
1868 to a single thread actually works.
1870 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1872 * pthread.c (__pthread_create_2_1): Optimize a bit.
1874 * internals.h (invalid_handle): Also test for p_terminated != 0.
1875 (nonexisting_handle): New function. Same as old invalid_handle.
1876 * join.c (pthread_join): Use nonexisting_handle instead of
1877 invalid_handle to test for acceptable thread handle.
1878 * manager.c (pthread_handle_free): Likewise.
1879 * joinrace.c: New file.
1880 Reported by Permaine Cheung <pcheung@cygnus.com>.
1882 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1884 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1885 Correct handling of matching variable.
1887 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1890 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1891 Be prepared for empty timer list.
1893 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1894 CPUTIME clock ID. Add support for thread clocks.
1896 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1897 subtraction were switched.
1899 * sysdeps/pthread/timer_routines.c (init_module): Use
1900 THREAD_MAXNODES threads.
1902 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1903 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1904 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1905 with sigqueueinfo is this system call is available.
1907 * sysdeps/pthread/timer_create.c (timer_create): Allow
1908 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1910 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1912 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1914 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1916 * sysdeps/pthread/posix-timer.h: New file.
1917 * sysdeps/pthread/timer_create.c: New file.
1918 * sysdeps/pthread/timer_delete.c: New file.
1919 * sysdeps/pthread/timer_getoverr.c: New file.
1920 * sysdeps/pthread/timer_gettime.c: New file.
1921 * sysdeps/pthread/timer_routines.c: New file.
1922 * sysdeps/pthread/timer_settime.c: New file.
1923 * sysdeps/pthread/tst-timer.c: New file.
1925 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1928 LINK_MAX definitions if necessary.
1930 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1932 Added missing fork time handling of global libio lock.
1934 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1935 not just the individual stream locks. Rewritten to use new
1936 iterator interface provided by libio rather than accessing
1939 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1940 which lock and unlock the stream list using the new interface
1942 * internals.h: Likewise.
1944 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1945 and __funlockfilelist in the parent after the fork.
1946 Child still calls __fresetlockfiles as before.
1948 * linuxthreads.texi: Now explains what happens to streams at
1949 fork time. Also whole new section on forking and thread added.
1950 Definition of pthread_atfork moved out of Miscellaneous Functions
1951 to this new section.
1953 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1955 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1956 Add missing register.
1957 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1959 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1961 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1962 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1963 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1965 2000-05-31 Andreas Jaeger <aj@suse.de>
1967 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1969 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1971 * spinlock.c (__pthread_lock): Remove ASSERT.
1973 * Makefile (tests): Add ex8.
1974 * Examples/ex8.c: New file.
1976 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1978 Bugfix: The pthread_atfork mechanism now takes care of its
1979 own internal mutex at fork time.
1981 * ptfork.c (__fork): Revised so that the mutex is held across
1982 the fork operation and while the handlers are called, and so that
1983 the child resets the mutex.
1985 * linuxthreads.texi: Updated pthread_atfork documentation to make
1986 it clear that fork and pthread_atfork can't be reentered from
1987 atfork handlers, that pthread_atfork and fork are mutually atomic,
1988 and that the handlers are inherited by the child process.
1990 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1992 * Makefile (libpthread-routines): Add pspinlock.
1993 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1994 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1995 * condvar.c: Likewise.
1996 * internals.h: Likewise.
1998 * manager.c: Likewise.
1999 * mutex.c: Likewise.
2000 * pthread.c: Likewise.
2001 * rwlock.c: Likewise.
2002 * semaphore.c: Likewise.
2003 * signals.c: Likewise.
2004 * spinlock.h: Likewise.
2005 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2006 * sysdeps/alpha/pspinlock.c: New file.
2007 * sysdeps/arm/pspinlock.c: New file.
2008 * sysdeps/i386/pspinlock.c: New file.
2009 * sysdeps/m68k/pspinlock.c: New file.
2010 * sysdeps/mips/pspinlock.c: New file.
2011 * sysdeps/powerpc/pspinlock.c: New file.
2012 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2013 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2014 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2015 back to _pthread_fastlock. Define new pthread_spinlock_t.
2017 2000-05-24 Andreas Jaeger <aj@suse.de>
2019 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2021 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2023 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2025 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2027 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2029 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2031 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2032 object state is represented with additional bits which distinguish
2033 whether that state was set up in the current process, or
2034 in an ancestor process. If that state was set in an ancestor,
2035 it means that a fork happened while thread was executing the init
2036 function. In that case, the state is reset to NEVER.
2037 * mutex.c (__pthread_once_fork_prepare): New function.
2038 (__pthread_once_fork_child): Likewise
2039 (__pthread_once_fork_parent): Likewise
2040 (__pthread_reset_pthread_once): Removed.
2041 * ptfork.c (__fork): Call new handlers in mutex.c.
2042 * internals.h: Declarations of new mutex.c functions added.
2043 Declaration of removed function deleted.
2044 * linuxthreads.texi: Updated documentation about pthread_once
2045 to clarify what happens under cancellation and forking.
2047 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2049 * internals.h: New thread manager request type, REQ_KICK.
2050 * join.c (pthread_exit): main thread now calls exit() instead
2051 of _exit() in order to proper process cleanup.
2052 * manager.c (__pthread_manager): Do not terminate manager
2053 after unblocking main thread; wait for main thread's
2054 REQ_PROCESS_EXIT request instead.
2055 Also, added REQ_KICK case to handle new request; this just does
2057 * manager.c (pthread_exited): Do not terminate manager after
2058 unblocking main thread.
2059 * manager.c (__pthread_manager_sighandler): If the main thread
2060 is waiting for all other threads to die, send a REQ_KICK into
2061 the thread manager request pipe to get it to clean out the threads
2062 and unblock the main thread as soon as possible. This fixes
2063 the 2000 millisecond hang on shutdown bug.
2064 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2065 including the main one call pthread_exit(), or implicitly do so.
2066 * Makefile (tests): Add ex7.
2068 2000-05-05 Andreas Jaeger <aj@suse.de>
2070 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2071 (pthread_getcpuclockid): Correct test for ourselves.
2073 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2075 * internals.h (struct _pthread_descr_struct): Reorganization.
2076 Allocate room for 16 pointers at head of the structure for future
2077 thread-local data handling. Move p_self member in this area.
2078 * manager.c (pthread_handle_create): Adjust use of p_self.
2079 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2080 * pthread.c (__pthread_initial_thread): Adjust initialization.
2081 (__pthread_manager_thread): Likewise.
2083 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2085 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2086 for eventmask larger than 1 word.
2088 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2090 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2091 * pthread.c (__pthread_initialize_minimal): New function. Perform
2092 minimal initialization.
2093 (pthread_initialize): Remove this code here.
2094 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2095 are working around the problem in glibc.
2097 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2099 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2100 now. First gcc must be fixed (more concrete: libgcc).
2102 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2104 * pthread.c: Remove special treatement for interrupt handlers on x86.
2105 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2106 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2108 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2110 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2112 * join.c (pthread_exit): Set p_terminated after reporting the
2113 termination event instead of before.
2115 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2117 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2120 2000-04-18 Andreas Jaeger <aj@suse.de>
2122 * Versions: Use ld instead of ld.so.
2124 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2126 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2127 Remove the typedef keyword.
2129 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2131 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2133 (READ_MEMORY_BARRIER): Define.
2134 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2136 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2139 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2141 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2142 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2143 use thread_handle().
2145 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2147 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2148 if fast mutex is used. Don't initialize `already_canceled' twice.
2149 Correctly test for return value of timedsuspend.
2151 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2152 therefore don't need the _rt versions of the signal handlers.
2154 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2156 * pthread.c (pthread_yield): New function.
2157 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2158 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2159 * internals.h: Declare __pthread_yield.
2161 * pthread.c (pthread_initialize): Avoid a bit more code if
2162 realtime signals are known to exist.
2164 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2165 to dynamically detect RT signals and avoid generating compatibility
2166 functions with old kernel.
2167 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2168 __pthread_restart_new directly.
2169 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2170 __pthread_wait_for_restart_signal directly.
2171 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2172 __pthread_timedsuspend_new directly.
2174 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2176 * condvar.c: Remove all the special code to handle cond_timedwait.
2177 Use timedsuspend instead.
2178 * internals.h: Declare __pthread_timedsuspend_old,
2179 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2180 Remove declaration of __pthread_init_condvar.
2181 * pthread.c: Define __pthread_timedsuspend variable.
2182 (__pthread_timedsuspend_old): New function. Timed suspension
2183 implementation for old Linux kernels.
2184 (__pthread_timedsuspend_new): New function. Timed suspension
2185 implementation for new Linux kernels.
2186 * restart.h (timedsuspend): New function. Call appropriate
2187 suspension function through __pthread_timedsuspend.
2188 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2190 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2192 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2194 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2196 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2197 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2199 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2200 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2202 2000-04-14 Andreas Jaeger <aj@suse.de>
2204 * weaks.c: Fix typo.
2206 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2207 2.2 for linuxthreads.
2209 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2211 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2212 (pthread_getcpuclockid): Fix typo.
2214 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2216 * Makefile (libpthread-routines): Add getcpuclockid.
2217 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2218 * sysdeps/pthread/getcpuclockid.c: New file.
2219 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2220 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2222 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2224 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2226 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2227 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2228 and pthread_spin_unlock.
2229 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2230 into pthread_spinlock_t. Change all uses.
2231 * spinlock.c: Implement pthread_spin_lock.
2232 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2233 alias for real name.
2234 Define pthread_spin_trylock, pthread_spin_init, and
2235 pthread_spin_destroy.
2236 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2237 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2238 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2239 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2240 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2241 and pthread_spin_unlock.
2242 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2243 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2244 * condvar.c: Likewise.
2245 * internals.h: Likewise.
2247 * manager.c: Likewise.
2248 * mutex.c: Likewise.
2249 * pthread.c: Likewise.
2250 * rwlock.c: Likewise.
2251 * semaphore.c: Likewise.
2252 * signals.c: Likewise.
2254 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2256 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2258 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2260 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2261 _POSIX_SHARED_MEMORY_OBJECTS.
2263 2000-04-11 Andreas Jaeger <aj@suse.de>
2265 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2266 (__compare_and_swap): Mark as modifying memory.
2268 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2270 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2272 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2273 Don't have the 'asm' __volatile__.
2275 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2277 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2278 * spinlock.c (__pthread_lock): Add memory barriers.
2279 (__pthread_unlock): Likewise.
2280 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2282 (RELEASE): Not needed anymore.
2283 (__compare_and_swap): Mark asm as modifying memory.
2284 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2286 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2287 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2288 (MEMORY_BARRIER): Define using stbar.
2289 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2291 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2292 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2293 Mike Burrows <m3b@pa.dec.com>.
2295 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2297 * signals.c (sigaction): Fix return value for the case SIG is one
2298 of the signals the implementation uses.
2299 Patch by Xavier.Leroy@inria.fr.
2301 2000-04-01 Andreas Jaeger <aj@suse.de>
2303 * attr.c: Use shlib-compat macros.
2304 * oldsemaphore.c: Likewise.
2305 * pthread.c: Likewise.
2306 * weaks.c: Likewise.
2308 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2310 * semaphore.c (sem_timedwait): New function.
2311 Patch by Carl Mailloux <carlm@oricom.ca>.
2312 * semaphore.h: Declare sem_timedwait.
2313 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2315 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2317 * sysdeps/pthread/Makefile: File removed.
2319 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2321 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2322 * internals.h (__pthread_reset_pthread_once): Add prototype.
2323 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2325 * manager.c (pthread_handle_create): Store ID of new thread before
2328 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2330 * attr.c: Use new macros from shlib-compat.h to define versions.
2331 * oldsemaphore.c: Likewise.
2332 * semaphore.c: Likewise.
2333 * weaks.c: Likewise.
2335 * pthread.c: Update for new SHLIB_COMPAT definition.
2337 * manager.c (__pthread_manager): Unmask debug signal.
2339 * pthread.c (pthread_initialize): Test for address of __dso_handle
2340 being NULL, not value. Use __on_exit, not on_exit.
2341 Patch by Andreas Jaeger <aj@suse.de>.
2343 * pthread.c: Use new macros from shlib-compat.h to define versions.
2345 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2347 * pthread.c (pthread_initialize): Instead of on_exit use
2348 __cxa_atexit if __dso_label is available to allow unloading the
2349 libpthread shared library.
2351 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2353 * condvar.c: Make tests for ownership of mutex less strict.
2355 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2357 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2358 current thread and return error if not.
2359 (pthread_cond_timedwait_relative_old): Likewise.
2360 (pthread_cond_timedwait_relative_new): Likewise.
2362 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2363 (pthread_once_cancelhandler): New function.
2364 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2366 2000-03-14 Andreas Jaeger <aj@suse.de>
2368 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2370 (pthread_handle_sigrestart_rt): Likewise.
2371 * signals.c (pthread_sighandler_rt): Likewise.
2373 2000-03-02 Andreas Jaeger <aj@suse.de>
2375 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2376 Reported by Sean Chen <sean.chen@turbolinux.com>.
2378 2000-02-28 Andreas Jaeger <aj@suse.de>
2380 * rwlock.c: Fix typo.
2382 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2384 * rwlock.c: Define __* variants of the functions and make old names
2386 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2387 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2389 2000-02-25 Andreas Jaeger <aj@suse.de>
2391 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2392 pwrite64, lseek64, open64, and __open64 with version 2.2.
2394 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2396 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2398 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2400 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2401 nanosleep does not work either. Get absolute time inside the
2403 (pthread_cond_timedwait_relative_new): Likewise.
2404 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2406 2000-02-13 Andreas Jaeger <aj@suse.de>
2408 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2409 (pthread_cond_timedwait_relative_old): Likewise.
2411 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2413 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2414 but keep the code around. A bug in the kernel prevent us from
2416 (pthread_cond_timedwait_relative_new): Likewise.
2417 (PR libc/1597 and libc/1598).
2419 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2421 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2422 loop around nanosleep calls instead of around most of the function
2423 (pthread_cond_timedwait_relative_new): Likewise.
2424 body. Got rid of backwards goto and one local.
2426 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2428 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2429 before every nanosleep call to account for time spent in the rest
2431 (pthread_cond_timedwait_relative_new): Likewise.
2432 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2434 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2436 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2437 from nanosleep call so that in case we restart we only wait for the
2439 (pthread_cond_timedwait_relative_new): Likewise.
2440 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2442 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2444 * manager.c (pthread_allocate_stack): Compute guard page address
2445 correctly. Patch by HJ Lu.
2447 * sysdeps/pthread/pthread.h: Define
2448 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2450 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2452 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2453 preference handling.
2454 (pthread_rwlockattr_setkind_np): Allow
2455 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2456 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2458 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2460 * internals.h (pthread_readlock_info): New structure.
2461 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2462 p_untracked_readlock_count.
2463 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2464 Add initializers for new fields.
2465 * manager.c (pthread_free): Free read/write lock lists.
2466 * queue.h (queue_is_empty): New function.
2467 * rwlock.c: Implement requirements about when readers should get
2469 * sysdeps/pthread/pthread.h
2470 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2471 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2472 Define this name as well.
2473 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2475 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2477 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2478 Adjust initializers for struct _pthread_descr_struct change.
2479 * internals.h (struct _pthread_descr_struct): Move new elements to
2482 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2484 Redesigned how cancellation unblocks a thread from internal
2485 cancellation points (sem_wait, pthread_join,
2486 pthread_cond_{wait,timedwait}).
2487 Cancellation won't eat a signal in any of these functions
2488 (*required* by POSIX and Single Unix Spec!).
2489 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2490 simultaneous condition variable signal (not required by POSIX
2491 or Single Unix Spec, but nice).
2492 * spinlock.c: __pthread_lock queues back any received restarts
2493 that don't belong to it instead of assuming ownership of lock
2494 upon any restart; fastlock can no longer be acquired by two threads
2496 * restart.h: Restarts queue even on kernels that don't have
2497 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2498 avoiding a rare race condition in pthread_cond_timedwait.
2500 1999-12-31 Andreas Jaeger <aj@suse.de>
2502 * internals.h: Remove duplicate prototype declarations.
2504 * weaks.c: Remove __THROW from prototypes since the file is not
2505 compiled by a C++ compiler.
2506 * internals.h: Likewise.
2508 1999-12-30 Andreas Jaeger <aj@suse.de>
2510 * sysdeps/pthread/pthread.h: Move internal functions to...
2511 * sysdeps/pthread/bits/libc-lock.h: ...here.
2513 1999-12-29 Andreas Jaeger <aj@suse.de>
2515 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2517 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2519 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2522 * manager.c (__pthread_start): Add one more cast to prevent
2523 warning on 64bit machines.
2525 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2527 * manager.c (pthread_handle_create): Set p_pid of new thread
2528 before calling the callback function to report a new thread.
2530 1999-12-20 Andreas Jaeger <aj@suse.de>
2532 * pthread.c (pthread_initialize): Move getrlimit call after
2535 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2537 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2538 pwrite64, lseek64, open64, and __open64.
2539 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2540 pwrite64, lseek64, open64, and __open64.
2542 * manager.c (pthread_allocate_stack): Correct computation of
2543 new_thread_bottom. Correct handling of stack size and when the
2544 rlimit method to guard for stack growth is used.
2545 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2546 minus one pagesize (not two).
2548 1999-12-03 Andreas Jaeger <aj@suse.de>
2550 * Versions: Add __res_state with version GLIBC_2.2.
2552 * errno.c (__res_state): New function to return thread specific
2555 * pthread.c (pthread_initialize): Initialize p_resp.
2556 (__pthread_reset_main_thread): Also set p_resp.
2558 * manager.c (pthread_handle_create): Initialize p_resp.
2560 * internals.h: Add thread specific resolver state.
2561 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2563 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2565 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2567 * sysdeps/i386/i686/pt-machine.h: Likewise.
2568 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2570 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2572 * manager.c (pthread_start_thread_event): Initialize p_pid already
2575 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2577 * internals.h: Add prototype for __pthread_manager_event.
2578 * manager.c (__pthread_manager_event): New function.
2579 (pthread_start_thread_event): Correct computation of self.
2580 Use INIT_THREAD_SELF.
2581 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2582 (__pthread_initialize_manager): Respect event flags also for creation
2583 of the manager thread.
2585 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2587 * pthread.c (__pthread_initialize_manager): Initialize
2588 __pthread_manager_thread.p_tid.
2590 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2592 * internals.h: Declare __pthread_last_event.
2593 * manager.c: Define __pthread_last_event.
2594 (pthread_handle_create): Set __pthread_last_event.
2595 (pthread_exited): Likewise.
2596 * join.c (pthread_exit): Likewise.
2598 * Makefile (libpthread-routines): Add events.
2599 * events.c: New file.
2600 * internals.h: Protect against multiple inclusion.
2601 Include thread_dbP.h header.
2602 (struct _pthread_descr_struct): Add new fields p_report_events and
2604 Declare event reporting functions.
2605 * join.c (pthread_exit): Signal event if this is wanted.
2606 * manager.c (__pthread_threads_events): New variable.
2607 (pthread_handle_create): Take new parameters with event information.
2608 Signal TD_CREATE event if wanted.
2609 (__pthread_manager): Adjust pthread_handle_create call.
2610 (pthread_start_thread_event): New function. Block until manager is
2611 finished and then call pthread_start_thread.
2612 (pthread_exited): Signal TD_REAP event if wanted.
2614 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2616 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2618 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2620 1999-10-25 Andreas Jaeger <aj@suse.de>
2622 * internals.h: Remove K&R compatibility.
2623 * no-tsd.c: Likewise.
2624 * semaphore.h: Likewise.
2625 * signals.c: Likewise.
2626 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2627 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2628 * weaks.c: Likewise.
2630 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2632 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2633 pthread_handle_sigcancel with functions that restore %gs from the
2634 signal context. For each signal handling function, two wrappers
2635 are required, one for a non-RT signal and one for a RT signal.
2636 * signal.c: For i386, add code to restore %gs from the signal
2637 context in pthread_sighandler and pthread_sighandler_rt.
2639 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2641 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2643 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2645 * pthread.c (__pthread_initial_thread): Pass argument to
2646 PTHREAD_START_ARGS_INITIALIZER.
2647 (__pthread_manager_thread): Likewise.
2649 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2650 initialize function.
2652 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2654 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2656 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2658 * internals.h: Correct return types for __libc_read and __libc_write.
2660 1999-10-09 Andreas Jaeger <aj@suse.de>
2662 * internals.h: Add __new_sem_post to get prototype in
2663 manager.c; include semaphore.h for needed types.
2665 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2667 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2668 directly instead of calling sem_post which should not be necessary
2669 but is faster and might help in some case to work around problems.
2670 Patch by khendricks@ivey.uwo.ca [libc/1382].
2672 1999-10-08 Andreas Schwab <schwab@suse.de>
2674 * sysdeps/pthread/Subdirs: New file.
2677 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2679 * Implies: New file.
2680 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2681 * manager.c (pthread_handle_create): Initialize p_startfct.
2682 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2684 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2686 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2687 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2688 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2690 * condvar.c (pthread_cond_timedwait_relative): Never return with
2691 EINTR. Patch by Andreas Schwab.
2693 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2695 * signals.c (sigaction): Correct last patch. Don't select
2696 pthread_sighandler_rt based on the signal number but instead of
2697 the SA_SIGINFO flag.
2699 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2701 * specific.c: Move definitions of struct pthread_key_struct and
2702 destr_function to ...
2703 * internals.h: ...here.
2705 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2707 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2708 this instead of pthread_handle_sigrestart if the signal is an RT
2711 * signals.c: Handle passing through of sighandler arguments also
2712 for real-time signals.
2714 1999-09-03 Andreas Schwab <schwab@suse.de>
2716 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2718 (__vfork): New function, alias vfork.
2719 * Versions: Export __fork, vfork, and __vfork in libpthread.
2721 1999-08-23 Andreas Schwab <schwab@suse.de>
2723 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2724 call to signal handler.
2726 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2728 * pthread.c (__pthread_reset_main_thread): Undo last change.
2729 (__pthread_kill_other_threads_np): Reset signal handlers for the
2730 signals we used in the thread implementation here.
2732 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2734 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2735 for the signals we used in the thread implementation [PR libc/1234].
2737 * Versions: Export __pthread_kill_other_threads_np from libpthread
2740 * signals.c: Pass sigcontext through wrapper to the user function.
2742 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2744 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2745 __libc_internal_tsd_set.
2747 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2749 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2752 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2754 * internals.h: Align _pthread_descr_struct to 32 bytes.
2755 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2758 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2760 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2763 1999-07-09 Cristian Gafton <gafton@redhat.com>
2765 * Makefile (libpthread-routines): Add oldsemaphore routine.
2766 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2767 sem_trywait, and sem_wait to GLIBC_2.1.
2768 * oldsemaphore.c: New file.
2769 * semaphore.c: Add default_symbol_versions for the changed functions.
2770 (__new_sem_init): Rename from sem_init.
2771 (__new_sem_post): Rename from sem_post.
2772 (__new_sem_wait): Rename from sem_wait.
2773 (__new_sem_trywait): Rename from sem_trywait.
2774 (__new_sem_getvalue): Rename from sem_getvalue.
2775 (__new_sem_destroy): Rename from sem_destroy.
2777 1999-06-23 Robey Pointer <robey@netscape.com>
2779 * internals.h: Added p_nextlock entry to separate queueing for a
2780 lock from queueing for a CV (sometimes a thread queues on a lock
2781 to serialize removing itself from a CV queue).
2782 * pthread.c: Added p_nextlock to initializers.
2783 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2785 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2787 * manager.c (pthread_handle_create): Free mmap region after stack
2788 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2790 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2792 * man/pthread_cond_init.man: Correct example.
2793 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2795 * linuxthreads.texi (Condition Variables): Likewise.
2797 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2799 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2800 casx not cas, also successful casx returns the old value in rd
2801 and not the new value.
2803 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2805 * manager.c: If pthread_create() is given a NULL attribute
2806 and the thread manager runs with a realtime policy, set the
2807 scheduling policy of the newly created thread back to SCHED_OTHER.
2808 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2809 initialize the schedpolicy field of new_thread->p_start_args
2810 to that of the calling thread.
2812 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2814 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2815 instruction does not allow memory element to use offset.
2817 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2819 * manager.c (pthread_allocate_stack): Optimize initialization of new
2822 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2823 Don't use initializer since it is all zeroes.
2824 (__libc_once_define): Likewise.
2826 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2828 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2829 doesn't exist anymore.
2830 * sysdeps/i386/Implies: Likewise.
2831 * sysdeps/m68k/Implies: Likewise.
2832 * sysdeps/mips/Implies: Likewise.
2833 * sysdeps/powerpc/Implies: Likewise.
2834 * sysdeps/sparc/sparc32/Implies: Likewise.
2835 * sysdeps/sparc/sparc64/Implies: Likewise.
2837 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2839 * sysdeps/alpha/bits/semaphore.h: Removed.
2840 * sysdeps/powerpc/bits/semaphore.h: Removed.
2841 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2842 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2843 * Makefile (headers): Remove bits/semaphore.h.
2845 * semaphore.h: Define _pthread_descr if necessary.
2846 Don't include limits.h. Define SEM_VALUE_MAX directly.
2848 (sem_t): Protect element names with leading __.
2849 Add declarations for sem_close, sem_open, and sem_unlink.
2850 * semaphore.c: Adjust all functions for new element names.
2851 Define sem_close, sem_open, and sem_unlink.
2852 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2854 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2857 1999-03-16 H.J. Lu <hjl@gnu.org>
2859 * specific.c (pthread_key_delete): Check th->p_terminated to see
2860 if the thread is running.
2862 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2863 Added to GLIBC_2.0 for libc.so.
2865 1999-02-12 H.J. Lu <hjl@gnu.org>
2867 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2868 __libc_allocate_rtsig): Added to GLIBC_2.1.
2870 * internals.h (DEFAULT_SIG_RESTART): Removed.
2871 (DEFAULT_SIG_CANCEL): Removed.
2873 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2874 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2875 (__pthread_sig_restart, __pthread_sig_cancel,
2876 __pthread_sig_debug): Initialized.
2877 (pthread_initialize): Call init_rtsigs () to initialize
2880 1999-02-03 H.J. Lu <hjl@gnu.org>
2882 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2883 Don't restart the thread which sent REQ_DEBUG.
2884 (pthread_start_thread): Check if __pthread_sig_debug > 0
2887 * pthread.c (__pthread_initialize_manager): Suspend ourself
2888 after sending __pthread_sig_debug to gdb instead of
2889 __pthread_sig_cancel.
2891 1999-01-24 H.J. Lu <hjl@gnu.org>
2893 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2894 from mask if __pthread_sig_debug > 0.
2895 (pthread_handle_create): Increment __pthread_handles_num.
2897 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2898 * pthread.c (__pthread_initialize_manager): Likewise.
2900 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2901 instead of __libc_allocate_rtsig (2).
2902 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2903 instead of __pthread_sig_cancel.
2904 (pthread_handle_sigdebug): Fix comments.
2906 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2908 * manager.c (pthread_allocate_stack): Set
2909 __pthread_nonstandard_stacks if user-specified stack is used.
2911 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2913 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2914 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2916 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2918 * pthread.c: Use a third signal __pthread_sig_debug distinct
2919 from __pthread_sig_cancel to notify gdb when a thread is
2921 * manager.c: Likewise.
2922 * internals.h: Likewise.
2923 * signals.c: The implementation of sigwait(s) assumed that
2924 all signals in s have signal handlers already attached.
2925 This is not required by the standard, so make it work
2926 also if some of the signals have no handlers.
2928 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2930 * linuxthreads.texi: Remove pointers from first @node. Move old
2931 @node spec inside comment.
2933 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2935 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2938 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2940 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2941 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2943 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2945 * manager.c: Threads now send __pthread_sig_cancel on termination.
2946 Change clone call and signal masks.
2947 * thread.c (pthread_handle_sigrestart): Remove special code for
2949 (pthread_handle_sigcancel): In manager thread call
2950 __pthread_manager_sighandler.
2951 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2952 * sysdeps/i386/i686/pt-machine.h: Likewise.
2953 Patches by Xavier Leroy.
2955 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2957 * spinlock.c (__pthread_unlock): Don't crash if called for an
2958 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2960 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2963 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2965 * Examples/ex3.c: Wait until all threads are started before
2966 searching for the number to avoid race condition on very fast
2969 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2971 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2972 declaration since it's not needed.
2974 * sysdeps/pthread/pthread.h: Move internal functions to ...
2975 * internals.h: ...here.
2977 1998-12-02 H.J. Lu <hjl@gnu.org>
2979 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2980 SIGRTMIN is defined.
2981 (__pthread_sig_cancel): Likewise.
2983 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2985 * wrapsyscall.c: Include <sys/mman.h> for msync,
2986 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2987 Correct msync declaration.
2989 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2991 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2992 __libc_tsd_set): New macros for new interface.
2993 * no-tsd.c: New file, provide uninitialized defns of
2994 __libc_internal_tsd_get and __libc_internal_tsd_set.
2995 * Makefile (routines): Add no-tsd.
2997 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2999 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3000 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3001 __libc_internal_tsd_set): Move decls to ...
3002 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3005 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3006 __libc_internal_tsd_set): Make these pointers to functions, not
3007 functions; remove #pragma weak decls for them.
3008 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3009 Define static functions and initialized pointers to them.
3011 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3013 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3014 (CFLAGS-specific.c): Likewise.
3015 (CFLAGS-pthread.c): Likewise.
3016 (CFLAGS-ptfork.c): Likewise.
3017 (CFLAGS-cancel.c): Likewise.
3018 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3019 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3021 * mutex.c (pthread_mutex_init): Define as strong symbol.
3022 (pthread_mutex_destroy): Likewise.
3023 (pthread_mutex_trylock): Likewise.
3024 (pthread_mutex_lock): Likewise.
3025 (pthread_mutex_unlock): Likewise.
3026 (pthread_mutexattr_init): Likewise.
3027 (pthread_mutexattr_destroy): Likewise.
3028 (pthread_once): Likewise.
3029 * ptfork.c (pthread_atfork): Likewise.
3030 * specific.c (pthread_key_create): Likewise.
3031 (pthread_setspecific): Likewise.
3032 (pthread_getspecific): Likewise.
3034 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3036 * linuxthreads.texi: Fix punctuation after xref.
3038 1998-11-10 H.J. Lu <hjl@gnu.org>
3040 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3041 if it is defined in <linux/limits.h>.
3043 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3045 * spinlock.h (__pthread_trylock): Define inline.
3046 (__pthread_lock): Add extra parameter to declaration. Declare
3047 using internal_function.
3048 (__pthread_unlock): Declare using internal_function.
3049 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3050 of local variable self. Avoid recomputing self. Define using
3052 (__pthread_trylock): Remove.
3053 (__pthread_unlock): Define using internal_function.
3054 * cancel.c: Adjust for __pthread_lock interface change. Use already
3055 computed self value is possible.
3056 * condvar.c: Likewise.
3058 * manager.c: Likewise.
3059 * mutex.c: Likewise.
3060 * pthread.c: Likewise.
3061 * rwlock.c: Likewise.
3062 * semaphore.c: Likewise.
3063 * signals.c: Likewise.
3065 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3067 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3068 __ to field names of the struct.
3069 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3071 (pthread_attr_t): Likewise.
3072 (pthread_cond_t): Likewise.
3073 (pthread_condattr_t): Likewise.
3074 (pthread_mutex_t): Likewise.
3075 (pthread_mutexattr_t): Likewise.
3076 (pthread_rwlock_t): Likewise.
3077 (pthread_rwlockattr_t): Likewise.
3078 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3079 * cancel.c: Likewise.
3080 * condvar.c: Likewise.
3081 * manager.c: Likewise.
3082 * mutex.c: Likewise.
3083 * pthread.c: Likewise.
3084 * ptlongjmp.c: Likewise.
3085 * rwlock.c: Likewise.
3086 * spinlock.c: Likewise.
3088 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3090 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3093 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3096 * Makefile (libpthread-routines): Add pt-machine.
3097 * pt-machine.c: New file.
3098 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3099 yet defined. Use PT_EI in extern inline definitions.
3100 * sysdeps/arm/pt-machine.h: Likewise.
3101 * sysdeps/i386/pt-machine.h: Likewise.
3102 * sysdeps/i386/i686/pt-machine.h: Likewise.
3103 * sysdeps/m68k/pt-machine.h: Likewise.
3104 * sysdeps/mips/pt-machine.h: Likewise.
3105 * sysdeps/powerpc/pt-machine.h: Likewise.
3106 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3107 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3109 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3111 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3114 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3116 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3118 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3120 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3122 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3125 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3127 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3128 array index overflow.
3130 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3132 * sysdeps/pthread/semaphore.h: New file.
3134 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3136 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3137 _LIBC_TSD_KEY_DL_ERROR.
3139 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3141 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3142 * sysdeps/i386/pt-machine.h: Likewise.
3143 Suggested by Roland McGrath.
3145 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3147 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3148 access thread data with non-constant offsets.
3149 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3152 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3153 THREAD_SETMEM_NC definitions.
3155 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3157 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3159 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3161 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3162 not already defined.
3163 (struct _pthread_descr_struct): Add p_self and p_nr field.
3164 * manager.c (__pthread_handles): Define second element to point
3166 (__pthread_handles_num): Initialize to 2.
3167 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3168 (pthread_start_thread): Likewise.
3169 (pthread_handle_create): Start search for free slot at entry 2.
3170 Initialize new fields p_self and p_nr.
3171 Call __clone with CLONE_PTRACE if available.
3172 (pthread_free): Call FREE_THREAD_SELF if available.
3173 * pthread.c (__pthread_initial_thread): Initialize new fields.
3174 (__pthread_manager_thread): Likewise.
3175 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3177 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3178 elements of the thread descriptor.
3179 * condvar.c: Likewise.
3180 * errno.c: Likewise.
3182 * manager.c: Likewise.
3183 * pthread.c: Likewise.
3184 * ptlongjmp.c: Likewise.
3185 * semaphore.c: Likewise.
3186 * signals.c: Likewise.
3187 * specific.c: Likewise.
3188 * spinlock.c: Likewise.
3190 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3192 * sysdeps/i386/useldt.h: New file.
3193 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3195 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3196 THREAD_SETMEM using __thread_self.
3197 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3199 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3201 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3202 turned out that we didn't need to queue after all.
3204 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3206 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3207 and wastes space; correct types.
3209 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3211 * signals.c (sigaction): Handle NULL argument.
3213 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3215 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3218 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3220 * Makefile (linuxthreads-version): Extract correct number from
3223 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3225 * Banner: Bump version number to 0.8
3226 * FAQ.html: Many updates, in particular w.r.t. debugging.
3227 * manager.c: Support for non-default stacksize for
3228 LinuxThreads-allocated stacks;
3229 don't use guard pages for stacks with default size, rely on
3230 rlimit(RLIMIT_STACK) instead (it's cheaper).
3232 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3233 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3234 * condvar.c: Likewise.
3235 * internals.h: Likewise.
3236 * restart.h: Likewise.
3237 * signals.c: Likewise.
3238 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3240 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3242 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3243 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3244 * Versions: Put __pthread_mutexattr_settype under version
3245 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3246 __pthread_mutexattr_gettype.
3248 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3250 * sysdeps/pthread/bits/libc-lock.h: Make
3251 __pthread_mutexattr_settype weak. Don't make
3252 __pthread_mutexattr_setkind_np weak.
3254 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3256 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3257 call can succeed here.
3259 * mutex.c: Define __pthread_mutexattr_settype and make
3260 __pthread_mutexattr_setkind_np an alias.
3261 Likewise for __pthread_mutexattr_gettype.
3263 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3265 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3268 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3270 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3272 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3274 * Examples/ex6.c: Include <unistd.h> for usleep.
3276 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3278 * Examples/ex4.c (main): Use exit, not pthread_exit.
3280 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3282 * Versions: Add __pthread_mutexattr_gettype and
3283 __pthread_mutexattr_settype.
3284 * lockfile.c: Use __pthread_mutexattr_settype instead of
3285 __pthread_mutexattr_setkind_np.
3286 * mutex.c: Define __pthread_mutexattr_gettype and
3287 __pthread_mutexattr_settype.
3289 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3290 __pthread_mutexattr_settype.
3291 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3292 Use __pthread_mutexattr_settype.
3294 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3296 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3297 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3298 pthread_mutexattr_settype.
3299 * sysdeps/pthread/pthread.h: Declare these functions.
3300 Move pthread_sigmask and pthread_kill declaration in separate header.
3301 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3303 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3305 * Makefile: Add rules to compile and run tests.
3306 * Examples/ex1.c: Little changes to fix warnings.
3307 * Examples/ex2.c: Likewise.
3308 * Examples/ex3.c: Likewise.
3309 * Examples/ex4.c: Likewise.
3310 * Examples/ex5.c: Likewise.
3311 * Examples/ex6.c: New file.
3313 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3315 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3317 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3319 * attr.c: Include <string.h>.
3321 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3323 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3324 * internals.h: Include limits.h.
3325 * manager.c: Use memcpy to copy sched_param.
3326 * ptfork.c: Include errno.h.
3327 * pthread.c: Likewise.
3328 * semaphore.c: Likewise.
3329 * specific.c: Likewise.
3330 * spinlock.h: Likewise.
3331 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3332 type definition to ...
3333 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3335 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3337 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3339 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3340 as macros as demanded in POSIX.1, Annex C.
3342 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3344 * internals.h (struct pthread_request): For free use pthread_t
3345 instead of pthread_descr.
3346 * join.c (pthread_join): Pass thread_id, not th to manager.
3347 (pthread_detach): Likewise.
3348 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3349 (pthread_exited): Remove detached queue code.
3350 (pthread_handle_free): Expect thread ID parameter and use it to
3351 validate the thread decsriptor. Don't use detached queue.
3352 Patches by Xavier Leroy.
3354 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3356 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3357 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3358 __pthread_atfork, __pthread_key_create, __pthread_once.
3359 * internals.h: Doc fix.
3360 * pthread.c (__pthread_initialize): Define again.
3362 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3364 * manager.c (pthread_exited): If thread is not detached put it on
3366 (pthread_handle_free): If thread is not on list with living threads
3367 search on list with detached threads.
3369 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3370 for new definition of pthread_rwlock_t.
3372 * spinlock.c: Correct test whether to compile
3373 __pthread_compare_and_swap or not.
3375 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3377 * attr.c: Finish user stack support. Change locking code to be safe
3378 in situations with different priorities.
3379 * cancel.c: Likewise.
3380 * condvar.c: Likewise.
3381 * internals.h: Likewise.
3383 * manager.c: Likewise.
3384 * mutex.c: Likewise.
3385 * pthread.c: Likewise.
3386 * ptlongjmp.c: Likewise.
3387 * queue.h: Likewise.
3388 * rwlock.c: Likewise.
3389 * semaphore.c: Likewise.
3390 * semaphore.h: Likewise.
3391 * signals.c: Likewise.
3392 * spinlock.c: Likewise.
3393 * spinlock.h: Likewise.
3394 * sysdeps/pthread/pthread.h: Likewise.
3395 Patches by Xavier Leroy.
3397 * sysdeps/i386/i686/pt-machine.h: New file.
3399 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3401 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3402 [sg]et_stackaddr prototypes always available.
3404 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3405 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3407 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3409 * manager.c (pthread_free): Undo patch from 980430.
3410 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3412 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3414 * manager.c: Define __pthread_manager_adjust_prio and use it to
3415 increase priority when needed.
3416 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3417 * mutex.c: Optimize mutexes to wake up only one thread.
3418 * pthread.c: Move PID of manager for global variable in structure
3420 Patches by Xavier Leroy.
3422 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3424 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3426 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3428 * attr.c: Correct typo.
3430 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3432 * manager.c (pthread_free): Unmap guard before the stack.
3433 Patch by Matthias Urlichs.
3435 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3437 * manager.c (pthread_free): Detect already free child.
3438 Patch by Xavier Leroy, reported by Matthias Urlichs.
3440 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3442 * Makefile (linuxthreads-version): Renamed back from
3445 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3447 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3450 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3452 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3453 * internals.h: Add definitions for new spinlock implementation.
3454 * ptlongjmp.c: New file.
3455 * spinlock.c: New file.
3456 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3457 new function __pthread_acquire to prevent deadlocks with thread
3458 with different priorities.
3459 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3461 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3463 * manager.c (__pthread_manager): Reduce first argument to select
3464 to include just the needed file descriptor.
3466 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3468 * manager.c: Fix last patch which caused core dumps.
3470 * pthread.c: Correctly handle missing SIGRTMIN.
3472 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3474 * libpthread.map: Add __libc_internal_tsd_get and
3475 __libc_internal_tsd_set. Add missing cancelable functions. Export
3476 libc internal versions of the cancelable functions.
3478 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3480 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3482 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3484 * attr.c: Implement pthread_attr_[gs]etguardsize,
3485 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3486 Change pthread_attr_init to have two interfaces.
3487 * internals.h (struct _pthread_descr_struct): Add new fields for
3489 * libpthread.map: Add names in GLIBC_2.1 section.
3490 * manager.c (pthread_handle_create): Implement guardsize and
3492 (pthread_free): Likewise.
3493 * pthread.c (pthread_create): Add new interface for changed
3495 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3496 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3499 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3501 * manager.c: Enable resetting of the thread scheduling policy
3502 to SCHED_OTHER when the parent thread has a different one.
3504 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3506 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3507 _POSIX_ASYNCHRONOUS_IO.
3509 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3511 * mutex.c: Implement new mutex types.
3513 * internals.h: Include <signal.h>.
3515 * libpthread.map: Add __erno_location and __h_errno_location.
3517 * errno.c: Return pointer to variable actually in use. This might
3518 not be the one in the thread structure.
3519 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3521 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3522 of manager thread structure.
3523 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3525 * pthread.c: Adapt initializer for thread structures.
3526 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3527 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3528 current thread to global variables.
3530 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3532 * rwlock.c: New file.
3533 * Makefile (libpthread-routines): Add rwlock.
3534 * sysdeps/pthread/pthread.h: Define data structures and declare
3536 * libpthread.map: Add new functions.
3538 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3540 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3541 * sysdeps/arm/Implies: likewise.
3542 * README: Document it.
3544 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3546 * signals.c: Remove unneeded initializer for sigwaited, saving a
3549 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3551 * semaphore.c (sem_init): Set sem_spinlock only if available.
3553 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3555 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3556 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3558 * Makefile: Update from LinuxThreads 0.7.
3559 * internals.h. Likewise.
3560 * manager.c: Likewise.
3561 * mutex.c: Likewise.
3562 * pthread.c: Likewise.
3563 * signals.c: Likewise.
3564 * specific.c: Likewise.
3565 * Examples/ex3.c: Likewise.
3567 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3569 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3572 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3574 * wrapsyscall.c: Add socket functions which are also cancelation
3577 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3579 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3580 New functions for fast thread specific data within libc.
3582 * internals.h: Add new array p_libc_specific to struct
3583 _pthread_descr_struct.
3585 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3587 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3589 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3590 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3592 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3594 * internals.h (struct _pthread_descr_struct): Add definitions for
3595 two-level specific key handling.
3596 * manager.c (pthread_handle_create): Initialize specific memory array.
3597 * specific.c: Implement two-level key handling.
3598 * weaks.c: Don't provide dummy key handling.
3599 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3600 Add definition of __libc_key_t.
3601 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3603 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3604 PTHREAD_DESTRUCTOR_ITERATIONS.
3606 * manager.c (pthread_handle_create): Compare mmap result with
3609 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3610 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3612 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3614 sysdeps/sparc -> sysdeps/sparc/sparc32
3615 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3617 * internals.h: Change definition of THREAD_SELF to be an expression,
3618 not a statement that did a return.
3619 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3620 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3621 Follow Solaris and use a "system reserved" register (%g6) to hold
3622 the thread descriptor.
3623 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3625 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3627 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3628 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3629 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3631 * semaphore.c: Include spinlock.h only when needed.
3633 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3634 keys for entries not in use.
3636 * weaks.c: Implement key handling functions for real.
3638 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3640 Initial sparc64-linux support:
3641 * sysdeps/sparc64/Implies: New file.
3642 * sysdeps/sparc64/pt-machine.h: Likewise.
3644 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3646 * semaphore.c: Include spinlock.h at correct place.
3649 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3651 The Great Bit File Move:
3652 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3653 * sysdeps/powerpc/semaphorebits.h: Likewise.
3654 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3655 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3656 * sysdeps/pthread/libc-lock.h: -> bits/
3657 * sysdeps/pthread/stdio-lock.h: Likewise.
3658 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3659 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3660 * semaphore.h: Likewise.
3661 * sysdeps/pthread/pthread.h: Likewise.
3663 * lockfile.c: <foo.h> -> <bits/foo.h>.
3664 * semaphore.h: Likewise.
3666 * Makefile: (headers): foo.h -> bits/foo.h.
3667 * sysdeps/pthread/Makefile: Likewise.
3669 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3671 * semaphore.c (sem_init): Set sem_spinlock only if available.
3673 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3676 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3678 Update from LinuxThreads 0.6.
3680 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3681 and __sched_get_priority_min instead of names without `__'.
3683 * manager.c: Rewrite large parts to implement opaque pthread_t.
3685 * cancel.c: Adapt for opaque pthread_t type.
3686 * condvar.c: Likewise.
3687 * errno.c: Likewise.
3689 * mutex.c: Likewise.
3690 * pthread.c: Likewise.
3691 * signals.c: Likewise.
3692 * specific.c: Likewise.
3693 * restart.h: Likewise.
3694 * queue.h: Likewise.
3695 * Examples/ex3.c: Likewise.
3696 * Examples/ex4.c: Likewise.
3697 * sysdeps/pthread/pthread.h: Likewise.
3699 * pthread.c: Accumulate time for all threads in thread manager.
3701 * semaphore.c: Implement fallback implementation for architectures
3702 sometimes missing compare-exchange operations.
3704 * cancel.c (pthread_cancel): Validate handle argument.
3705 * join.c (pthread_join): Likewise.
3706 (pthread_detach): Likewise.
3707 * signals.c (pthread_kill): Likewise.
3709 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3711 * queue.h (enqueue): Enqueue thread according to priority.
3713 * internals.c (struct pthread_start_args): New struct for passing
3714 args to cloning function.
3715 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3718 * Examples/Makefile (clean): Pass -f option to rm.
3720 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3721 and define TEST_FOR_COMPARE_AND_SWAP.
3722 * sysdeps/i386/i486/pt-machine.h: Removed.
3724 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3727 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3729 * restart.h (suspend): Clear p_signal before suspending.
3730 (suspend_with_cancellation): Likewise.
3731 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3733 * weaks.c: Make __pthread_key_create return 1.
3734 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3735 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3736 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3739 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3741 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3743 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3745 * sysdeps/powerpc/Implies: Added.
3746 * sysdeps/powerpc/pt-machine.h: Added.
3747 * sysdeps/powerpc/semaphorebits.h: Added.
3749 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3751 * pthread.c (__pthread_initial_thread): Correct
3753 (__pthread_manager_thread): Likewise.
3754 Reported by Andreas Jaeger.
3756 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3758 Since sigset_t no longer fits in a register, we can't pass in the
3759 thread's initial mask so easily. Take this opportunity to simplify
3760 the clone implementation by only accepting a single void* argument.
3762 * manager.c (__pthread_manager): Put thread vitals in the thread
3763 struct instead of as arguments through clone.
3764 (pthread_start_thread): Look for them there.
3765 * internals.h (struct _pthread): Add p_initial_fn,
3766 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3767 * pthread.c (pthread_initialize_manager): Revise clone invocation.