1 2002-07-22 Ulrich Drepper <drepper@redhat.com>
3 * Makefile: Actually creat tst-signal.out file when running the test.
5 2002-07-19 Ulrich Drepper <drepper@redhat.com>
7 * errno.c (__errno_location): Don't define unless !USE_TLS
9 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
10 * sysdeps/i386/tls.h: Likewise.
11 * sysdeps/i386/useldt.h: Likewise.
12 * sysdeps/i386/i686/pt-machine.h: Likewise.
14 2002-07-02 H.J. Lu <hjl@gnu.org>
16 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
18 * sysdeps/mips/pt-machine.h: Likewise.
20 2002-07-14 Ulrich Drepper <drepper@redhat.com>
22 * manager.c (pthread_handle_create): Initialize self-reference in
25 2002-07-01 Jakub Jelinek <jakub@redhat.com>
27 * Examples/ex9.c (main): Remove unused th variable.
29 2002-07-10 Ulrich Drepper <drepper@redhat.com>
31 * wrapsyscall.c: Add __nanosleep alias.
32 * Versions (GLIBC_2.2.6): Add __nanosleep.
33 * bug-sleep.c: New file.
34 * Makefile (tests): Add bug-sleep.
36 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
38 * Examples/ex9.c (main): Use list of children and join them.
39 (thread): Do not call exit.
41 2002-06-20 Ulrich Drepper <drepper@redhat.com>
43 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
44 Unconditionally use the code using spinlock. Use __pthread_release
46 (wait_node_free): Likewise.
47 (__pthread_acquire, __pthread_release): Unconditionally define.
49 2002-06-07 Jakub Jelinek <jakub@redhat.com>
51 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
53 2002-05-24 Ulrich Drepper <drepper@redhat.com>
55 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
57 2002-05-21 Ulrich Drepper <drepper@redhat.com>
59 * sysdeps/pthread/pthread.h (pthread_create): Rename first
61 (pthread_cancel): Likewise.
62 * internals.h (__pthread_create_2_1): Likewise.
63 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
65 2002-05-20 Ulrich Drepper <drepper@redhat.com>
67 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
68 Patch by Glen Nakamura <gen@flex.com>.
70 2002-05-03 Ulrich Drepper <drepper@redhat.com>
72 * signals.c: Move sighandler functions to...
73 * sighandler.c: ...here. New file.
74 * signals.c: Move signal handler related type definitions to...
75 * internals.h: ...here. Add prototypes for signal handlers.
76 * Makefile (libpthread-routines): Add sighandler.
77 (CFLAGS-sighandler.c): Add $(exceptions).
79 2002-04-30 Jakub Jelinek <jakub@redhat.com>
81 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
83 2002-04-08 Ulrich Drepper <drepper@redhat.com>
85 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
86 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
87 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
88 based on previous one and not on current time. Count overruns.
89 Patch by Eric F. Sorton <eric@cctcorp.com>.
91 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
93 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
95 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
96 if it isn't defined yet.
97 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
98 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
100 * sysdeps/sh/tls.h: New file.
102 2002-04-08 Jakub Jelinek <jakub@redhat.com>
104 * manager.c (__pthread_manager_event): Use self instead of arg
105 for INIT_THREAD_SELF.
106 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
107 _pthread_descr_struct) instead of sizeof (*descr).
109 2002-04-05 Ulrich Drepper <drepper@redhat.com>
111 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
112 * sysdeps/alpha/pt-machine.h: Likewise.
113 * sysdeps/arm/pt-machine.h: Likewise.
114 * sysdeps/cris/pt-machine.h: Likewise.
115 * sysdeps/hppa/pt-machine.h: Likewise.
116 * sysdeps/m68k/pt-machine.h: Likewise.
117 * sysdeps/mips/pt-machine.h: Likewise.
118 * sysdeps/powerpc/pt-machine.h: Likewise.
119 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
120 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
121 * sysdeps/sh/pt-machine.h: Likewise.
122 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
123 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
124 * sysdeps/x86_64/pt-machine.h: Likewise.
126 2002-04-05 Jakub Jelinek <jakub@redhat.com>
128 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
129 instead of pthread_mutexattr_setkind_np.
130 (pthread_mutexattr_gettype): Similarly.
131 * man/pthread_mutexattr_setkind_np.man: New.
132 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
134 2002-04-02 Ulrich Drepper <drepper@redhat.com>
136 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
138 2002-03-22 Jakub Jelinek <jakub@redhat.com>
140 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
142 2002-03-22 Ulrich Drepper <drepper@redhat.com>
144 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
146 2002-03-17 Andreas Jaeger <aj@suse.de>
148 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
150 * sysdeps/alpha/pt-machine.h: Likewise.
151 * sysdeps/arm/pt-machine.h: Likewise.
152 * sysdeps/cris/pt-machine.h: Likewise.
153 * sysdeps/hppa/pt-machine.h: Likewise.
154 * sysdeps/i386/i686/pt-machine.h: Likewise.
155 * sysdeps/ia64/pt-machine.h: Likewise.
156 * sysdeps/m68k/pt-machine.h: Likewise.
157 * sysdeps/mips/pt-machine.h: Likewise.
158 * sysdeps/powerpc/pt-machine.h: Likewise.
159 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
160 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
161 * sysdeps/sh/pt-machine.h: Likewise.
162 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
163 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
164 * sysdeps/x86_64/pt-machine.h: Likewise.
166 * internals.h: Move testandset and __compare_and_swap prototypes
169 2002-03-03 Andreas Jaeger <aj@suse.de>
171 * errno.c: Include resolv.h to avoid warning.
173 2002-02-27 Ulrich Drepper <drepper@redhat.com>
175 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
178 2002-02-23 Ulrich Drepper <drepper@redhat.com>
180 * attr.c (pthread_getattr_np): Don't take thread descriptor size
181 into account if USE_TLS.
182 * manager.c (pthread_handle_create): Free TLS data structures if call
183 failed. Pass correct stack to clone if USE_TLS.
184 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
185 * sysdeps/i386/i686/pt-machine.h: Likewise.
186 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
188 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
189 Add p_stackaddr element #if USE_TLS.
190 * internals.c: Include <tls.h>.
191 * manager.c: Integrate creating and handling of thread descriptor
193 * pthread.c: Likewise.
194 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
195 Include <linuxthreads/descr.h> only if TLS is really used.
196 (GET_DTV): New macro.
197 (TLS_INIT_TP): Initialize self pointer.
199 2002-02-17 Andreas Schwab <schwab@suse.de>
201 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
204 2002-02-12 Ulrich Drepper <drepper@redhat.com>
206 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
207 (INSTALL_DTV): Adjust for being passed pointer to element with length.
209 2002-02-08 Ulrich Drepper <drepper@redhat.com>
211 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
213 2002-02-08 Richard Henderson <rth@redhat.com>
215 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
217 2002-02-08 Ulrich Drepper <drepper@redhat.com>
219 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
222 2002-02-07 H.J. Lu <hjl@gnu.org>
224 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
226 (__pthread_spin_lock): Remove ".set noreorder".
227 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
229 2002-02-05 H.J. Lu <hjl@gnu.org>
231 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
233 * sysdeps/mips/pt-machine.h (testandset): Likewise.
234 (__compare_and_swap): Likewise.
236 2002-02-07 Ulrich Drepper <drepper@redhat.com>
238 * internals.h: Move declarations/definitions of
239 __pthread_initial_thread_bos, __pthread_initial_thread,
240 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
241 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
242 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
244 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
245 Define THREAD_GETMEM accordingly.
247 2002-02-06 Ulrich Drepper <drepper@redhat.com>
249 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
251 * sysdeps/i386/tls.h: Define THREAD_DTV.
253 2002-02-04 Ulrich Drepper <drepper@redhat.com>
255 * internals.h: Move thread descriptor definition...
256 * descr.h.: ...here. New file.
257 * sysdeps/i386/tls.h: New file.
259 2002-02-01 H.J. Lu <hjl@gnu.org>
261 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
262 different register in the delayed slot. Use branch likely.
264 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
265 (__compare_and_swap): Return 0 only when failed to compare. Use
268 2002-02-01 Jakub Jelinek <jakub@redhat.com>
270 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
271 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
272 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
273 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
274 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
275 * sysdeps/sparc/sparc64/Versions: New file.
276 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
278 2002-01-31 Ulrich Drepper <drepper@redhat.com>
280 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
281 in SHARED code, use GL(dl_cpuclock_offset).
283 2002-01-28 Andreas Jaeger <aj@suse.de>
285 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
286 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
288 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
290 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
291 (CURRENT_STACK_FRAME): Remove duplicate definition.
292 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
294 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
296 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
299 2002-01-12 Andreas Schwab <schwab@suse.de>
301 * Makefile (test-srcs): Add tst-signal.
302 (tests): Run tst-signal.
303 (distribute): Add tst-signal.sh.
304 * tst-signal.c, tst-signal.sh: New files.
306 2002-01-14 Andreas Jaeger <aj@suse.de>
308 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
310 2002-01-11 Andreas Schwab <schwab@suse.de>
312 * signals.c (sighandler): Initialize all elements to SIG_ERR.
313 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
315 2002-01-06 Richard Henderson <rth@redhat.com>
317 * sysdeps/alpha/elf/pt-initfini.c: New file.
319 2001-12-29 Andreas Jaeger <aj@suse.de>
321 * Examples/ex9.c: Add noreturn attribute for thread.
322 * Examples/ex10.c: Likewise.
323 * Examples/ex13.c (thread_start): Likewise.
324 * Examples/ex15.c (worker): Likewise.
326 * Examples/ex18.c: Include unistd.h for prototype of sleep.
328 2001-12-14 Ulrich Drepper <drepper@redhat.com>
330 * man/pthread_atfork.man: Adjust description of mutex handling
331 after fork for current implementation.
332 * linuxthreads.texi: Likewise [PR libc/2519].
334 2001-12-13 Andreas Schwab <schwab@suse.de>
336 * specific.c (pthread_key_delete): Don't contact the thread
337 manager if no threads have been created yet.
339 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
341 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
342 qualifier to be safe.
344 2001-11-30 Andreas Schwab <schwab@suse.de>
346 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
347 that self is the manager thread, and initialize the thread
349 (thread_self_stack) [THREAD_SELF]: New function to find self via
351 * manager.c (pthread_handle_create): Don't block cancel signal any
354 2001-11-29 Andreas Jaeger <aj@suse.de>
356 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
358 (INIT_THREAD_SELF): New.
359 (THREAD_GETMEM): New.
361 (THREAD_SETMEM): New.
362 (THREAD_SETMEM_NC): New.
363 (FLOATING_STACKS): Define.
364 (ARCH_STACK_MAX_SIZE): Define.
366 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
368 Bugfix to pthread_key_delete. It was iterating over the thread
369 manager's linked list of threads, behind the thread manager's
370 back causing a race. The fix is to have the manager iterate over
371 the threads instead, using a new request type for doing so.
372 * internals.h (struct pthread_request): New manager request type
374 * manager.c (pthread_for_each_thread): New function.
375 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
376 * specific.c (struct pthread_key_delete_helper_args): New type.
377 (pthread_key_delete_helper): New static function.
378 (pthread_key_delete): Use the new thread manager
379 REQ_FOR_EACH_THREAD function to iterate over the threads and set
380 the delete key slot to a null value in each thread.
381 * Examples/ex18.c: New test.
382 * Makefile (tests): Add ex18.
384 2001-11-22 Wolfram Gloger <wg@malloc.de>
386 * pthread.c (pthread_onexit_process): Don't call free
387 after threads have been asynchronously terminated.
389 * manager.c (pthread_handle_exit): Surround cancellation
390 of threads with __flockfilelist()/__funlockfilelist().
392 2001-11-26 Andreas Schwab <schwab@suse.de>
394 * manager.c (pthread_handle_create): Start the child thread with
395 the cancel signal blocked, so that it does not handle it before
396 the thread register is set up. Save errno from failed clone call.
398 2001-11-15 Ulrich Drepper <drepper@redhat.com>
400 * sysdeps/i386/i686/Implies: Removed.
401 * sysdeps/i386/i686/Versions: New file.
403 2001-10-31 Andreas Jaeger <aj@suse.de>
405 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
407 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
409 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
410 to __linuxthreads_pthread_sizeof_descr to match name used by
411 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
412 linuxthreads_db/td_symbol_list.c.
414 2001-09-22 Andreas Jaeger <aj@suse.de>
416 * linuxthreads/tst-context.c: Avoid compile warning.
418 2001-09-20 Andreas Jaeger <aj@suse.de>
420 * shlib-versions: Add x86-64.
422 2001-09-19 Andreas Jaeger <aj@suse.de>
424 * sysdeps/x86_64/Makefile: New file.
425 * sysdeps/x86_64/pspinlock.c: New file.
426 * sysdeps/x86_64/pt-machine.h: New file.
428 2001-09-12 Jakub Jelinek <jakub@redhat.com>
430 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
432 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
434 2001-09-11 Ulrich Drepper <drepper@redhat.com>
435 Wolfram Gloger <wg@malloc.de>
437 * join.c: Protect all communications from and to manager with
439 * manager.c: Likewise.
440 * pthread.c: Likewise.
441 * smeaphore.c: Likewise.
443 2001-08-29 Ulrich Drepper <drepper@redhat.com>
445 * spinlock.c (__pthread_lock): Top max_count value with
446 MAX_ADAPTIVE_SPIN_COUNT.
447 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
449 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
452 2001-08-27 Jakub Jelinek <jakub@redhat.com>
454 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
455 non-opaque type if __USE_UNIX98.
457 2001-08-26 Jakub Jelinek <jakub@redhat.com>
459 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
460 non-opaque lock types also if _IO_MTSAFE_IO is defined.
462 2001-08-23 Roland McGrath <roland@frob.com>
464 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
465 new first argument, skip the cleanup handler if it's zero.
466 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
467 (__libc_lock_define_initialized_recursive): Use it.
468 * sysdeps/pthread/bits/stdio-lock.h: File removed.
469 The sysdeps/generic file from the main tree now suffices.
471 2001-08-22 Roland McGrath <roland@frob.com>
473 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
474 instead of <pthread.h>.
475 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
476 (_IO_lock_initializer): Add braces.
477 (_IO_lock_lock): Use __libc_lock_lock_recursive.
478 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
480 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
481 (__libc_lock_define_initialized_recursive): Use it.
482 (__libc_lock_init_recursive): Likewise.
483 (__libc_lock_fini_recursive): Likewise.
484 (__libc_lock_lock_recursive): Likewise.
485 (__libc_lock_trylock_recursive): Likewise.
486 (__libc_lock_unlock_recursive): Likewise.
487 (__libc_lock_define_recursive): New macro.
489 2001-08-14 Jakub Jelinek <jakub@redhat.com>
491 * lockfile.c (__pthread_provide_lockfile): New variable.
492 * pthread.c (__pthread_require_lockfile): New variable.
493 * cancel.c (__pthread_require_lockfile): New variable.
495 2001-07-31 Ulrich Drepper <drepper@redhat.com>
497 * tst-context.c (threadfct): Initialize context before calling
500 * Examples/ex17.c: Make sure test thread is around long enough.
502 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
504 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
506 2001-07-24 Ulrich Drepper <drepper@redhat.com>
508 * tst-context.c (main): Print explanation before bailing out
509 because context handling is not supported.
511 2001-07-23 Ulrich Drepper <drepper@redhat.com>
513 * Makefile (tests): Add tst-context.
514 * tst-context.c: New file.
516 * sysdeps/pthread/bits/stdio-lock.h: Define
517 _IO_cleanup_region_start_noarg.
519 2001-07-23 Jakub Jelinek <jakub@redhat.com>
521 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
522 (ARCH_STACK_MAX_SIZE): Define.
523 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
524 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
526 2001-07-19 Jakub Jelinek <jakub@redhat.com>
528 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
530 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
531 (ARCH_STACK_MAX_SIZE): Define.
532 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
533 NEED_SEPARATE_REGISTER_STACK.
535 2001-07-16 Andreas Schwab <schwab@suse.de>
537 * Makefile (before-compile): Don't add $(objpfx)crti.o.
538 (omit-deps): Add crti.
539 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
540 it is filtered out of the link command.
542 2001-07-16 Ulrich Drepper <drepper@redhat.com>
544 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
545 to find the right value for __pthread_initial_thread_bos, it's not
546 used. If not FLOATING_STACKS first run
547 __pthread_init_max_stacksize.
549 2001-06-16 H.J. Lu <hjl@gnu.org>
551 * internals.h: Include <stackinfo.h>.
553 * attr.c: Don't include <stackinfo.h> here.
554 * cancel.c: Likewise.
555 * manager.c: Likewise.
556 * pthread.c: Likewise.
557 * ptlongjmp.c: Likewise.
559 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
561 * attr.c: Make _STACK_GROWS_UP work.
562 * internals.h: Likewise.
563 * manager.c: Likewise.
564 * pthread.c: Likewise.
566 2001-06-15 H.J. Lu <hjl@gnu.org>
568 * pthread.c (__pthread_reset_main_thread): Fix a typo.
570 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
572 * semaphore.h: Use struct _pthread_fastlock as an element of
573 sem_t instead of an identical struct.
574 * rwlock.c: Remove casts.
575 * semaphore.c: Likewise.
577 2001-04-30 Alan Modra <amodra@one.net.au>
579 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
581 2001-05-25 Bruce Mitchener <bruce@cubik.org>
583 * linuxthreads.texi: Spelling corrections.
585 2001-05-25 Ulrich Drepper <drepper@redhat.com>
587 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
588 returning successfully.
589 Patch by Gene Cooperman <gene@ccs.neu.edu>.
591 2001-05-24 Ulrich Drepper <drepper@redhat.com>
593 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
594 serious work try once whether the lock is uncontested.
595 Remove duplicate reading of __status before loop.
596 Change suggested by Hans Boehm <hans_boehm@hp.com>.
598 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
599 (__pthread_alt_trylock): Likewise.
601 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
603 Memory barrier overhaul following line by line inspection.
604 * mutex.c (pthread_once): Missing memory barriers added.
605 * pthread.c (__pthread_wait_for_restart_signal,
606 __pthread_timedsuspend_new, __pthread_restart_new): Added
607 memory barriers ``just in case'' and for documentary value.
608 * spinlock.c (__pthread_release): New inline function for releasing
609 spinlock, to complement __pthread_acquire. Includes memory
610 barrier prior to assignment to spinlock, and __asm __volatile
611 dance to prevent reordering or optimization of the spinlock access.
612 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
613 __pthread_alt_timedlock, __pthread_alt_unlock,
614 __pthread_compare_and_swap): Updated to use new __pthread_release
615 instead of updating spinlock directly.
616 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
617 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
618 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
619 Memory barrier overhaul. Lots of missing memory barriers added,
620 a couple needless ones removed.
621 * spinlock.c (__pthread_compare_and_swap): testandset optimization
622 removed, just calls __pthread_acquire, which has the new read
623 barrier in it before its testandset.
625 2001-05-20 Roland McGrath <roland@frob.com>
627 * Makeconfig: New file, variables used to be in main libc Makeconfig.
629 2001-05-09 Geoff Keating <geoffk@redhat.com>
631 * sysdeps/powerpc/pt-machine.h
632 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
633 (__compare_and_swap): Remove memory barriers.
634 (__compare_and_swap_with_release_semantics): New function.
636 2001-04-24 Andreas Jaeger <aj@suse.de>
638 * wrapsyscall.c: send* and recv* return ssize_t.
640 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
641 mutex instead of double locking it.
642 Reported by Pierre Artaud <partaud@sodatec.com>.
644 2001-04-23 Ulrich Drepper <drepper@redhat.com>
646 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
647 using #ifdef whether the clock is available.
648 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
650 * sysdeps/ia64/Versions: New file.
652 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
653 have to call __gmon_start__ in the libpthread DSO.
654 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
656 * Makefile (libpthread-routines): Add ptclock_gettime and
658 * internals.h: Don't use cpuclock-init.h definitions, use
659 hp-timing.h definitions.
660 * pthread.c: Likewise.
661 * manager.c: Likewise.
662 * ptclock_gettime.c: New file.
663 * ptclock_settime.c: New file.
664 * internals.h: Fix parameter type for __pthread_clock_gettime and
665 __pthread_clock_settime.
667 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
668 * sysdeps/i386/i586/ptclock_settime.c: Removed.
669 * sysdeps/i386/i586/Makefile: Removed.
671 2001-04-22 Ulrich Drepper <drepper@redhat.com>
673 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
676 2001-04-21 Andreas Jaeger <aj@suse.de>
678 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
679 attribute, remove statements that will never be executed.
680 (thread_func): Remove mutex_unlock call since it's never executed.
681 (thread_func): Fix comment as suggested by Jakub Jelinek.
683 * manager.c (__pthread_manager): Add noreturn
685 (pthread_start_thread): Likewise, remove return statement.
686 (pthread_start_thread_event): Likewise.
687 Add noreturn attribute for pthread_handle_exit.
688 * weaks.c: Add noreturn attribute for pthread_exit.
690 * internals.h: Add __pthread_clock_gettime and
691 __pthread_clock_settime prototypes.
693 2001-04-21 Ulrich Drepper <drepper@redhat.com>
695 * internals.h: Include <cpuclock-init.h>.
696 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
697 CPUCLOCK_VARDEF is defined.
698 * pthread.c (__pthread_initialize_minimal): Initialize
699 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
700 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
701 for new thread to current CPU clock value.
703 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
705 * sysdeps/i386/i586/Makefile: New file.
706 * sysdeps/i386/i586/Versions: New file.
707 * sysdeps/i386/i586/ptclock_gettime.c: New file.
708 * sysdeps/i386/i586/ptclock_settime.c: New file.
709 * sysdeps/i386/i686/Implies: New file.
711 2001-04-18 Jakub Jelinek <jakub@redhat.com>
713 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
714 $generated, not $postclean-generated.
716 2001-04-18 Andreas Jaeger <aj@suse.de>
718 * Makefile (otherlibs): Added.
720 2001-04-18 Jakub Jelinek <jakub@redhat.com>
722 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
724 2001-04-16 Ulrich Drepper <drepper@redhat.com>
726 * signals.c (sigwait): NSIG is no signal number. Block all
727 signals while in signal handler for signals in SET.
728 Patch by Manfred Spraul <manfred@colorfullife.com>.
730 2001-04-12 Ulrich Drepper <drepper@redhat.com>
732 * tst-cancel.c: Disable most tests. Add new test where all
733 cleanup handlers must run.
734 * Makefile (tests): Add tst-cancel again.
736 * cancel.c (__pthread_perform_cleanup): Correct condition for
737 leaving cleanup loop early.
739 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
740 all the files which use CURRENT_STACK_FRAME.
741 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
742 __builtin_frame_address.
743 * sysdeps/i386/i686/pt-machine.h: Likewise.
745 2001-04-11 Ulrich Drepper <drepper@redhat.com>
747 * Makefile (tests): Comment out tst-cancel for now.
749 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
750 temporary file in object directory.
751 * Makefile: Don't allow inlining when compiling tst-cancel.c.
752 Pass $(objpfx) to tst-cancel.
754 2001-04-11 David S. Miller <davem@redhat.com>
756 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
757 up closer to user local variables so that new cleanup heuristics work.
758 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
760 2001-04-11 Ulrich Drepper <drepper@redhat.com>
762 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
764 (_pthread_cleanup_push_defer): Likewise.
766 * tst-cancel.c (main): Fix loop printing cleanup output.
768 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
770 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
772 (__pthread_spin_trylock): Likewise.
773 * sysdeps/sh/pt-machine.h (testandset): Likewise.
775 2001-04-10 Ulrich Drepper <drepper@redhat.com>
777 * join.c (pthread_exit): Move code to new function __pthread_do_exit
778 which takes an extra parameter with the current frame pointer.
779 Call new function with CURRENT_STACK_FRAME.
780 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
781 with the new parameter.
782 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
783 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
784 this parameter as the initial value the cleanup handler records are
785 compared against. No active cleanup handler record must have an
786 address lower than the previous one and the initial record must be
787 above (below on PA) the frame address passed in.
788 (pthread_setcancelstate): Call __pthread_do_exit instead of
790 (pthread_setcanceltype): Likewise.
791 (pthread_testcancel): Likewise.
792 (_pthread_cleanup_pop_restore): Likewise.
793 * condvar.c (pthread_cond_wait): Likewise.
794 (pthread_cond_timedwait_relative): Likewise.
795 * manager.c (pthread_start_thread): Likewise.
796 * oldsemaphore.c (__old_sem_wait): Likewise.
797 * pthread.c (pthread_handle_sigcancel): Likewise.
798 * semaphore.c (__new_sem_wait): Likewise.
799 (sem_timedwait): Likewise.
800 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
801 to limit the cleanup handlers which get run.
802 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
803 for __pthread_perform_cleanup.
805 * Makefile (tests): Add tst-cancel.
806 * tst-cancel.c: New file.
808 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
810 * sysdeps/cris/pt-machine.h: New file.
811 * sysdeps/cris/pspinlock.c: New file.
813 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
815 * shlib-versions: Add case for Linux on CRIS.
817 2001-03-26 Ulrich Drepper <drepper@redhat.com>
819 * attr.c (pthread_getattr_np): Correct computation of stack size
820 for machiens with register stack.
822 * Examples/ex17.c (main): Correct detection of failed mmap call.
824 2001-03-21 Jakub Jelinek <jakub@redhat.com>
826 * pthread.c (__pthread_initialize_manager): Fix a typo.
828 2001-03-21 Jakub Jelinek <jakub@redhat.com>
830 * attr.c (__pthread_attr_setstack): Fix alignment check.
831 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
832 * Makefile (tests): Add ex17 test.
833 * Examples/ex17.c: New test.
835 2001-03-20 Ulrich Drepper <drepper@redhat.com>
837 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
838 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
839 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
841 2001-03-18 Ulrich Drepper <drepper@redhat.com>
843 * Makefile: When generating DSO link with libc_nonshared.a.
845 2001-02-26 Jakub Jelinek <jakub@redhat.com>
847 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
849 2001-02-23 Jakub Jelinek <jakub@redhat.com>
851 * internals.h (__pthread_init_max_stacksize): New prototype.
852 * attr.c (__pthread_attr_setstacksize): Call
853 __pthread_init_max_stacksize if not yet initialized.
854 * pthread.c (__pthread_init_max_stacksize): New function.
855 (__pthread_initialize_manager): Call it.
856 Patch by <dtc@cmucl.cons.org>.
858 2001-03-16 Ulrich Drepper <drepper@redhat.com>
860 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
862 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
864 * shlib-versions: Add rule for Linux on 64 bit S/390.
865 * sysdeps/s390/s390-64/pt-machine.h: New file.
866 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
868 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
870 * sysdeps/s390/pt-machine.h: Move to...
871 * sysdeps/s390/s390-32/pt-machine.h: ...here.
872 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
874 2001-03-15 Ulrich Drepper <drepper@redhat.com>
876 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
877 * attr.c: Implement pthread_getattr_np.
878 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
879 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
880 * manager.c (pthread_handle_create): Initialize p_inheritsched.
882 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
884 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
887 2001-02-20 Hans Boehm <hans_boehm@hp.com>
889 * manager.c (manager_mask): Removed static vesion. Now always local
890 to __pthread_manager().
891 (manager_mask_all): Removed completely.
892 (__pthread_manager): Remove manager_mask_all initialization.
893 (pthread_handle_create): Remove code to set and reset signal mask
894 around __clone2() calls.
896 2001-02-17 Jakub Jelinek <jakub@redhat.com>
898 * spinlock.c (__pthread_lock): Force lock->__status to be read from
899 memory on every spin.
901 2001-02-10 Andreas Jaeger <aj@suse.de>
903 * Makefile (extra-objs): New.
905 2001-02-09 Jakub Jelinek <jakub@redhat.com>
907 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
908 __pthread_initialize_minimal prototype.
910 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
912 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
914 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
916 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
918 2001-02-06 Ulrich Drepper <drepper@redhat.com>
920 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
921 broken code. Patch by Jes Sorensen.
923 2001-02-06 Andreas Jaeger <aj@suse.de>
925 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
927 * internals.h: ...here.
929 2001-02-05 Jes Sorensen <jes@linuxcare.com>
931 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
933 2001-02-02 Ulrich Drepper <drepper@redhat.com>
935 * Versions: Remove __pthread_initialize_minimal.
937 2001-02-01 Ulrich Drepper <drepper@redhat.com>
939 * Makefile: Add rules to build crti.o and make it being used in
940 building libpthread.so.
941 * sysdeps/i386/Makefile: New file.
942 * sysdeps/pthread/pt-initfini.c: New file.
944 * pthread.c: Cleanups.
946 2001-01-28 Andreas Jaeger <aj@suse.de>
948 * oldsemaphore.c (__old_sem_init): Adjust for last change.
949 * sysdeps/pthread/bits/libc-lock.h: Likewise.
950 * spinlock.c: Likewise.
952 2001-01-28 Ulrich Drepper <drepper@redhat.com>
954 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
955 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
956 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
957 * pthread.c: Likewise.
958 * spinlock.h: Likewise.
959 * sysdeps/pthread/pthread.h: Likewise.
961 2001-01-26 Ulrich Drepper <drepper@redhat.com>
963 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
964 as struct __pthread_attr_s.
966 * semaphore.h (sem_t): Cleanup namespace, rename status and
969 2001-01-13 Jakub Jelinek <jakub@redhat.com>
971 * pthread.c (pthread_onexit_process): Clear
972 __pthread_manager_thread_bos after freeing it.
973 * Makefile (tests): Add ex16.
974 * Examples/ex16.c: New file.
976 2001-01-11 Jakub Jelinek <jakub@redhat.com>
978 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
980 * pthread.c (pthread_exit_process): Rename to...
981 (pthread_onexit_process): ...this.
982 (pthread_atexit_process, pthread_atexit_retcode): New.
983 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
984 and only if HAVE_Z_NODELETE is not defined.
985 (__pthread_initialize_manager): Register pthread_atexit_retcode
988 2001-01-11 Ulrich Drepper <drepper@redhat.com>
990 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
992 2001-01-11 Jakub Jelinek <jakub@redhat.com>
994 * Makefile (tests): Add ex15.
995 * Examples/ex15.c: New test.
997 2001-01-08 Ulrich Drepper <drepper@redhat.com>
999 * pthread.c (pthread_exit_process): Free memory allocated for
1002 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1004 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1005 (pthread_free): Always unmap the stack. It's safe now that we don't
1006 use MAP_FIXED to allocate stacks.
1008 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1012 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1014 2000-11-15 Wolfram Gloger <wg@malloc.de>
1016 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1017 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1019 2000-12-27 Andreas Jaeger <aj@suse.de>
1021 * Examples/ex13.c: Make local functions static.
1022 * ecmutex.c: Likewise.
1023 * joinrace.c: Likewise.
1024 * Examples/ex14.c: Likewise.
1026 * Examples/ex2.c: Make local functions static; reformat.
1027 * Examples/ex1.c: Likewise.
1028 * Examples/ex4.c: Likewise.
1029 * Examples/ex5.c: Likewise.
1030 * Examples/ex7.c: Likewise.
1032 * oldsemaphore.c: Add prototypes to shut up GCC.
1033 * pt-machine.c: Likewise.
1035 * weaks.c: Add prototype for pthread_exit.
1037 * internals.h: Add some prototypes, format prototypes and add
1039 Move __libc_waitpid prototype to include/sys/wait.h.
1041 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1042 * mutex.c: Likewise.
1043 * specific.c: Likewise.
1044 * ptfork.c: Likewise.
1046 * lockfile.c: Include internals.h to get prototypes.
1047 * events.c: Likewise.
1048 * sysdeps/alpha/pspinlock.c: Likewise.
1049 * sysdeps/arm/pspinlock.c: Likewise.
1050 * sysdeps/hppa/pspinlock.c: Likewise.
1051 * sysdeps/i386/pspinlock.c: Likewise.
1052 * sysdeps/ia64/pspinlock.c: Likewise.
1053 * sysdeps/m68k/pspinlock.c: Likewise.
1054 * sysdeps/mips/pspinlock.c: Likewise.
1055 * sysdeps/powerpc/pspinlock.c: Likewise.
1056 * sysdeps/s390/pspinlock.c: Likewise.
1057 * sysdeps/sh/pspinlock.c: Likewise.
1058 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1059 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1060 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1062 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1064 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1065 (__pthread_attr_getstack): Return correct address.
1066 Add warnings for using pthread_attr_getstackaddr and
1067 pthread_attr_setstackaddr.
1069 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1071 * Examples/ex6.c (test_thread): Make static.
1072 * Examples/ex12.c (test_thread): Make static and add noreturn
1075 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1077 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1078 and compare_and_swap_with_release_semantics returns int not long.
1080 2000-12-17 Andreas Jaeger <aj@suse.de>
1082 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1084 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1085 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1086 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1087 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1088 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1089 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1091 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1093 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1094 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1096 2000-12-17 Andreas Jaeger <aj@suse.de>
1098 * internals.h: Add prototypes for testandset and
1099 __compare_and_swap to shut up gcc warnings.
1101 2000-12-06 Wolfram Gloger <wg@malloc.de>
1103 * join.c (pthread_detach): Allow case where the thread has already
1106 2000-12-05 Andreas Jaeger <aj@suse.de>
1108 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1109 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1110 (__compare_and_swap): Likewise.
1111 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1113 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1115 * Examples/ex3.c (main): Cast int to long before casting to void *.
1116 (search): Cast void * to long, not int.
1117 * Examples/ex8.c (main, thread): Similarly.
1118 * Examples/ex11.c (main): Similarly.
1119 * Examples/ex14.c (worker, do_test): Similarly.
1120 * ecmutex.c (worker, do_test): Similarly.
1121 (nlocks): Cast to int.
1123 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1125 * linuxthreads.texi: Add documentation for pthreads attributes
1126 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1127 patch. Document pthread_[sg]etconcurrency(). Mark
1128 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1130 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1132 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1134 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1135 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1137 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1139 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1140 not doing it right now.
1141 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1143 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1145 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1148 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1150 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1151 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1153 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1154 discussing mutexes. (As per the Unix98 name for the API.)
1155 Changes documentation for pthread_mutexattr_setkind_np() and
1156 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1157 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1158 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1159 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1160 Begins to introduce discussion of the ``timed'' mutex type. This
1161 discussion is currently incomplete.
1162 Patch by Bruce Mitchener <bruce@cubik.org>.
1164 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1165 Yutaka Niibe <gniibe@chroot.org>
1167 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1168 has restrictions, use register.
1170 2000-10-23 Andreas Schwab <schwab@suse.de>
1172 * Examples/ex14.c (TIMEOUT): Override default timeout.
1174 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1176 * specific.c: Protect tsd array modification in thread data
1177 structures by getting the thread lock in pthread_key_delete and
1178 __pthread_destroy_specifics.
1179 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1181 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1183 * sysdeps/pthread/bits/initspin.h: New file.
1184 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1185 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1186 (__pthread_alt_init_lock): Likewise.
1187 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1189 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1191 * oldsemaphore.c (__old_sem_init): Release lock with
1192 LT_SPINLOCK_INIT, not zero.
1193 * spinlock.c (__pthread_unlock): Likewise.
1194 (__pthread_alt_lock): Likewise.
1195 (__pthread_alt_timedlock): Likewise.
1196 (__pthread_alt_unlock): Likewise.
1197 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1198 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1199 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1200 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1202 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1204 * shlib-versions: Add version definitions for hppa-linux.
1206 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1208 * sysdeps/hppa/pspinlock.c: New file.
1209 * sysdeps/hppa/pt-machine.h: New file.
1210 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1212 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1214 * mutex.c (__pthread_mutex_destroy): Correct test of
1215 busy mutex for mutexes using alternate fastlocks.
1216 Patch by dtc@cmucl.cons.org.
1218 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1220 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1222 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1224 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1225 test for owner first.
1226 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1228 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1231 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1233 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1234 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1236 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1237 _POSIX_MONOTONIC_CLOCK.
1239 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1242 2000-09-20 Andreas Jaeger <aj@suse.de>
1244 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1245 "testrtsig.h" conditional.
1247 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1249 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1250 pthread_attr_setstack.
1251 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1252 pthread_attr_setstack.
1253 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1255 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1257 * Examples/ex14.c: New file.
1258 * Makefile (tests): Add ex14.
1260 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1261 mutex. Patch by dtc@cmucl.cons.org.
1263 * ecmutex.c: New file.
1264 * Makefile (tests): Add ecmutex.
1266 2000-09-04 H.J. Lu <hjl@gnu.org>
1268 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1269 instead of roundup to round up to the page size.
1271 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1273 * manager.c (pthread_exited): Correctly report event as TD_REAP
1274 instead of TD_DEATH. Fix comments.
1276 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1278 * spinlock.h (testandset): Add cast to avoid warning.
1279 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1281 2000-09-02 Andreas Jaeger <aj@suse.de>
1283 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1286 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1288 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1289 Fix typo in last patch (_mode -> _flags).
1291 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1292 Provide definition which respects _IO_USER_LOCK flag.
1294 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1296 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1299 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1301 * Makefile: Add rules to build and run unload.
1302 * unload.c: New file.
1304 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1306 * sysdeps/pthread/pthread.h
1307 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1308 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1310 2000-08-24 Andreas Jaeger <aj@suse.de>
1312 * Examples/ex13.c: Include <string.h> for strerror prototype and
1313 <stdlib.h> for abort prototype.
1314 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1315 (thread_start): Remove unused variable err.
1316 (main): Silence GCC warnings.
1318 2000-08-22 Andreas Jaeger <aj@suse.de>
1320 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1322 * Makefile (tests): Add ex13.
1324 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1326 * semaphore.h: Add restrict where required by AGd4.
1327 * sysdeps/pthread/pthread.h: Likewise.
1328 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1330 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1332 * Makefile (tests): Add ex12. Add rule to build it.
1333 * Examples/ex12.c: New file.
1335 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1337 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1338 even though the implementation is not quite complete (but it reports
1339 it). Define _POSIX_MESSAGE_PASSING to -1.
1340 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1342 2000-08-12 Andreas Jaeger <aj@suse.de>
1344 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1346 (__compare_and_swap): Likewise.
1347 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1349 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1351 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1352 p_h_errnop correctly and not to NULL.
1354 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1356 * Banner: Bump version number to 0.9.
1358 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1360 * Makefile (tests): Add tststack. Add rule to build the program.
1361 * tststack.c: New file.
1363 * internals.h: Declare __pthread_max_stacksize.
1364 * pthread.c (__pthread_max_stacksize): New variable.
1365 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1367 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1368 (pthread_allocate_stack): Allow kernel to choose stack address if
1369 FLOATING_STACKS. This also handles variable-sized stacks.
1370 Always allocate stack and guardpage together. Use mprotect to
1371 change guardpage access.
1372 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1373 ARCH_STACK_MAX_SIZE.
1375 * attr.c (__pthread_attr_setstacksize): Also test value against
1378 * manager.c (__pthread_nonstandard_stacks): Define only if
1379 THREAD_SELF is not defined.
1380 (pthread_allocate_stack): Always initialize gardaddr to a correct
1382 (pthread_handle_create): Unmap thread with one call.
1383 (pthread_free): Remove test for initial thread before removing stack.
1384 Unmap stack with one call.
1386 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1387 1 to avoid removing the stack.
1389 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1391 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1392 load of spin lock to prime the cache before the atomic compare and
1393 exchange operation (cmpxchg4). This avoids the spinning on the
1394 cmpxchg4 instruction and reduces movement of the cache line back
1395 and forth between the processors (explanation by Asis K. Mallick
1396 from Intel). This basically makes the implementation operate the
1397 same as the Linux kernel implementation.
1399 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1400 * sysdeps/ia64/pspinlock.c: New file.
1402 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1404 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1405 * spinlock.h: ...here. Remove locking.
1406 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1408 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1409 (rwlock_rd_extricate_func): Don't determine self, let
1410 __pthread_lock do it.
1411 (rwlock_wr_extricate_func): Likewise.
1412 (rwlock_have_already): Optimize *pself handling a bit.
1414 * mutex.c: Use __builtin_expect.
1415 * pthread.c: Likewise.
1417 2000-08-02 Andreas Jaeger <aj@suse.de>
1419 * sysdeps/s390/pspinlock.c: New file.
1420 * sysdeps/s390/pt-machine.h: New file.
1421 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1423 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1425 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1427 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1429 2000-07-26 Andreas Jaeger <aj@suse.de>
1431 * pthread.c: Initialize p_sem_avail.
1433 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1435 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1436 * semaphore.c: Handle spurious wakeups.
1438 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1439 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1441 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1442 (__pthread_wait_for_restart): Likewise.
1444 * condvar.c (pthread_cond_wait): Also check whether thread is
1445 cancelable before aborting loop.
1446 (pthread_cond_timedwait): Likewise.
1448 * signals.c (pthread_sighandler): Remove special code to restrore
1450 (pthread_sighandler_t): Likewise.
1452 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1454 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1455 * pthread.c: Include <resolv.h>.
1456 (_res): Undefine. Add extern declaration.
1458 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1460 * pthread.c (__pthread_initial_thread): Update initializer.
1461 (__pthread_manager_thread): Likewise.
1462 (pthread_initialize): Move setrlimit call to...
1463 (__pthread_initialize_manager): ...here.
1464 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1466 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1467 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1469 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1471 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1472 __compare_and_swap to define testandset.
1473 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1474 Define IMPLEMENT_TAS_WITH_CAS.
1476 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1478 * Makefile: Pass -z nodelete to linker for libpthread.so
1479 generation if it understand this option.
1481 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1483 * manager.c (pthread_handle_create): Remove initialization of
1484 new_thread->p_res._sock.
1486 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1488 Bugfixes to the variant of the code for machines with no compare
1491 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1492 node was not being properly enqueued, due to failing to update
1493 the lock->__status field.
1495 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1496 being set inappropriately, causing the suspend function to be called
1497 with a null self pointer and crash.
1499 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1501 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1502 compare&swap is available.
1504 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1507 * pthread.c (pthread_initialize): Don't use sysconf to determine
1508 whether the machine has more than one processor.
1510 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1511 removed thread_self calls.
1513 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1515 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1516 __compare_and_swap to compare_and_swap in code which assumes
1517 compare swap is available.
1519 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1521 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1522 bug whereby thr field of waitnode structure would not be correctly
1523 set unless a null self pointer is passed to the functions.
1524 Eliminated redundant calls to thread_self().
1526 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1528 * pthread.c (__pthread_initialize_manager): Lock
1529 __pthread_manager_thread.p_lock before calling clone.
1531 2000-05-05 H.J. Lu <hjl@gnu.org>
1533 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1534 have acquire semantics.
1535 (__compare_and_swap_with_release_semantics): New inline
1537 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1539 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1541 * manager.c: Fix the problem with signals at startup.
1542 Change the way that thread stacks are allocated on IA64.
1543 Clean up some of the guard page allocation stuff.
1545 1999-12-19 H.J. Lu <hjl@gnu.org>
1547 * internals.h (page_roundup): New.
1548 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1550 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1551 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1554 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1556 * manager.c (pthread_allocate_stack): Unmap the stack top
1557 if failed to map the stack bottom.
1559 (pthread_free): Fix the guard page.
1561 * pthread.c (pthread_initialize): Set rlimit correctly for
1562 NEED_SEPARATE_REGISTER_STACK.
1564 1999-12-16 H.J. Lu <hjl@gnu.org>
1566 * pthread.c (__pthread_initialize_manager): Pass
1567 __pthread_manager_thread_bos instead of
1568 __pthread_manager_thread_tos to __clone2.
1570 1999-12-16 H.J. Lu <hjl@gnu.org>
1572 * manager.c (pthread_allocate_stack): Correct the calculation
1573 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1576 1999-12-13 H.J. Lu <hjl@gnu.org>
1578 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1579 bit after setting ar.ccv.
1581 1999-12-12 H.J. Lu <hjl@gnu.org>
1583 * manager.c (pthread_allocate_stack): Make the starting
1584 address of the stack bottom page aligned. FIXME: it may
1585 need changes in other places.
1586 (pthread_handle_create): Likewise.
1588 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1590 * manager.c (pthread_allocate_stack): Handle
1591 NEED_SEPARATE_REGISTER_STACK.
1592 (pthread_handle_create): Likewise.
1593 * pthread.c (__pthread_initialize_manager): Likewise.
1595 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1597 1999-12-02 H.J. Lu <hjl@gnu.org>
1599 * sysdeps/ia64/pt-machine.h: New.
1601 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1603 * wrapsyscall.c: Mark non-__ protected names as weak.
1606 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1608 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1610 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1612 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1613 Add tests also to new alternative spinlock implementation.
1614 * spinlock.h: Likewise.
1615 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1617 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1619 * Version: Export __sigaction.
1620 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1622 * pthread.c: Use __libc_sigaction instead of __sigaction.
1624 * condvar.c: Implement pthread_condattr_getpshared and
1625 pthread_condattr_setpshared.
1626 * mutex.c: Implement pthread_mutexattr_getpshared and
1627 pthread_mutexattr_setpshared.
1628 * Versions: Export new functions.
1629 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1631 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1632 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1635 2000-07-04 Greg McGary <greg@mcgary.org>
1637 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1638 pragmas. Include bp-sym.h only if _LIBC.
1640 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1642 * spinlock.c (__pthread_unlock): Properly place write barrier.
1643 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1645 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1647 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1648 faster on SMP systems. No more emulation of compare&swap for adaptive
1650 * spinlock.h: Likewise.
1651 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1652 Replace fast with adaptive mutex.
1653 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1654 * condvar.c: Likewise.
1655 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1656 * internals.h: Declare __pthread_smp_kernel.
1657 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1658 _pthread_fastlock structure.
1659 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1661 * pthread.c: Remove initialization to zero from global variables.
1663 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1665 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1667 2000-06-28 Greg McGary <greg@mcgary.org>
1669 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1670 pthread functions that have pointers in their return+arg signatures.
1672 2000-06-27 Greg McGary <greg@mcgary.org>
1674 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1675 extern declarations of pthread functions that have pointers in
1676 their return+arg signatures.
1678 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1680 * Makefile (tests): Add ex11. Add rules to build it.
1681 * Examples/ex11.c: New file.
1682 * rwlock.c: Fix complete braindamaged previous try to implement
1685 * spinlock.c: Pretty print.
1687 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1689 * Makefile (tests): Add ex10. Add rules to build it.
1690 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1691 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1692 * condvar.c (pthread_cond_wait): Allow mutex of kind
1693 PTHREAD_MUTEX_TIMED_NP.
1694 (pthread_cond_timedwait_relative): Likewise.
1695 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1696 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1697 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1698 (__pthread_mutex_lock): Use __pthread_alt_lock for
1699 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1700 (__pthread_mutex_timedlock): New function.
1701 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1702 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1703 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1704 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1705 * spinlock.c: Implement alternate fastlocks.
1706 * spinlock.h: Add prototypes.
1707 * Examples/ex10.c: New file.
1708 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1709 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1711 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1712 (__pthread_rwlock_timedrdlock): New function.
1713 (__pthread_rwlock_timedwrlock): New function.
1714 Use laternate fastlock function everywhere.
1716 2000-06-21 Andreas Jaeger <aj@suse.de>
1718 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1721 * join.c: Include <stdlib.h> for exit prototype.
1723 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1725 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1727 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1728 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1730 * Makefile (libpthread-routines): Add barrier.
1731 (tests): Add ex9. Add rule to build ex9.
1732 * Versions: Export barrier functions.
1733 * barrier.c: New file.
1734 * Examples/ex9.c: New file.
1735 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1736 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1737 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1739 2000-06-19 H.J. Lu <hjl@gnu.org>
1741 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1742 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1743 (compare_and_swap_with_release_semantics): New. Default to
1744 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1747 * spinlock.c (__pthread_unlock): Call
1748 compare_and_swap_with_release_semantics () instead of
1749 compare_and_swap ().
1751 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1753 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1755 * sysdeps/pthread/timer_delete.c: Likewise.
1756 * sysdeps/pthread/timer_getoverr.c: Likewise.
1757 * sysdeps/pthread/timer_gettime.c: Likewise.
1758 * sysdeps/pthread/timer_settime.c: Likewise.
1760 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1762 Timer nodes are now reference counted, and can be marked
1763 as deleted. This allows for the safe release of the global mutex
1764 in the middle without losing the timer being operated on.
1766 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1767 member is now an enum with three values, so that an intermediate
1768 state can be represented (deleted but not free for reuse yet).
1769 New refcount member added.
1770 * sysdeps/pthread/timer_routines.c: Likewise.
1772 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1773 timer_valid): New inline functions added.
1775 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1776 restructured, recursive deadlock bug fixed.
1778 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1779 timer_addref to ensure that timer won't be deleted while mutex is not
1780 held. Also uses timer_invalid to perform validation of timer handle.
1781 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1782 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1784 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1786 * shlib-versions: Add entry for SH.
1787 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1789 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1791 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1792 tightened up some critical regions and micro-optimized some list
1795 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1796 Returns int value now to indicate whether timer was queued at head.
1797 * sysdeps/pthread/posix-timer.h: Likewise.
1798 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1799 new return value from __timer_thread_queue_timer to avoid waking
1800 up timer thread unnecessarily.
1802 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1803 inuse flag, because this requires mutex to be held. Callers updated
1804 to do the check when they have the mutex.
1805 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1807 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1808 regions: avoids making system calls while holding timer mutex, and
1809 a few computations were moved outside of the mutex as well.
1810 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1812 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1813 to list_unlink_ip, meaning idempotent. Pointer manipulation
1814 changed to get better better code out of gcc.
1815 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1816 version of list_unlink added here.
1817 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1818 function in all places: idempotent one for timers, non-idempotent
1819 one for thread nodes.
1820 * sysdeps/pthread/timer_settime: Likewise.
1821 * sysdeps/pthread/timer_routines.c: Likewise.
1823 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1825 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1826 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1828 * sysdeps/pthread/Makefile: Remove tests definition.
1830 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1831 Yutaka Niibe <gniibe@chroot.org>
1833 * sysdeps/sh/pspinlock.c: New file.
1834 * sysdeps/sh/pt-machine.h: New file.
1836 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1838 * Makefile (tests): Add joinrace.
1840 * Examples/ex6.c: Test return value of pthread_join.
1842 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1844 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1845 (__pthread_spin_trylock): Implement.
1846 (__pthread_spin_unlock): Implement.
1847 (__pthread_spin_init): Implement.
1848 (__pthread_spin_destroy): Implement.
1850 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1852 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1853 really append the entry.
1855 2000-06-10 Andreas Jaeger <aj@suse.de>
1857 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1859 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1861 * sysdeps/pthread/timer_create.c: Thread matching now done on
1862 clock type as well as thread attributes.
1863 There are individual global signal-delivering threads for
1864 different clock types.
1865 * sysdeps/pthread/posix-timer.h: Likewise.
1866 * sysdeps/pthread/timer_routines.c: Likewise.
1868 * sysdeps/pthread/timer_routines.c: Thread allocation and
1869 deallocation function now remembers to put thread on active
1870 list and remove from active list.
1871 Thus now the feature of binding multiple timers
1872 to a single thread actually works.
1874 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1876 * pthread.c (__pthread_create_2_1): Optimize a bit.
1878 * internals.h (invalid_handle): Also test for p_terminated != 0.
1879 (nonexisting_handle): New function. Same as old invalid_handle.
1880 * join.c (pthread_join): Use nonexisting_handle instead of
1881 invalid_handle to test for acceptable thread handle.
1882 * manager.c (pthread_handle_free): Likewise.
1883 * joinrace.c: New file.
1884 Reported by Permaine Cheung <pcheung@cygnus.com>.
1886 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1888 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1889 Correct handling of matching variable.
1891 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1894 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1895 Be prepared for empty timer list.
1897 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1898 CPUTIME clock ID. Add support for thread clocks.
1900 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1901 subtraction were switched.
1903 * sysdeps/pthread/timer_routines.c (init_module): Use
1904 THREAD_MAXNODES threads.
1906 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1907 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1908 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1909 with sigqueueinfo is this system call is available.
1911 * sysdeps/pthread/timer_create.c (timer_create): Allow
1912 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1914 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1916 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1918 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1920 * sysdeps/pthread/posix-timer.h: New file.
1921 * sysdeps/pthread/timer_create.c: New file.
1922 * sysdeps/pthread/timer_delete.c: New file.
1923 * sysdeps/pthread/timer_getoverr.c: New file.
1924 * sysdeps/pthread/timer_gettime.c: New file.
1925 * sysdeps/pthread/timer_routines.c: New file.
1926 * sysdeps/pthread/timer_settime.c: New file.
1927 * sysdeps/pthread/tst-timer.c: New file.
1929 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1931 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1932 LINK_MAX definitions if necessary.
1934 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1936 Added missing fork time handling of global libio lock.
1938 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1939 not just the individual stream locks. Rewritten to use new
1940 iterator interface provided by libio rather than accessing
1943 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1944 which lock and unlock the stream list using the new interface
1946 * internals.h: Likewise.
1948 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1949 and __funlockfilelist in the parent after the fork.
1950 Child still calls __fresetlockfiles as before.
1952 * linuxthreads.texi: Now explains what happens to streams at
1953 fork time. Also whole new section on forking and thread added.
1954 Definition of pthread_atfork moved out of Miscellaneous Functions
1955 to this new section.
1957 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1959 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1960 Add missing register.
1961 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1963 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1965 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1966 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1967 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1969 2000-05-31 Andreas Jaeger <aj@suse.de>
1971 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1973 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1975 * spinlock.c (__pthread_lock): Remove ASSERT.
1977 * Makefile (tests): Add ex8.
1978 * Examples/ex8.c: New file.
1980 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1982 Bugfix: The pthread_atfork mechanism now takes care of its
1983 own internal mutex at fork time.
1985 * ptfork.c (__fork): Revised so that the mutex is held across
1986 the fork operation and while the handlers are called, and so that
1987 the child resets the mutex.
1989 * linuxthreads.texi: Updated pthread_atfork documentation to make
1990 it clear that fork and pthread_atfork can't be reentered from
1991 atfork handlers, that pthread_atfork and fork are mutually atomic,
1992 and that the handlers are inherited by the child process.
1994 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1996 * Makefile (libpthread-routines): Add pspinlock.
1997 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1998 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1999 * condvar.c: Likewise.
2000 * internals.h: Likewise.
2002 * manager.c: Likewise.
2003 * mutex.c: Likewise.
2004 * pthread.c: Likewise.
2005 * rwlock.c: Likewise.
2006 * semaphore.c: Likewise.
2007 * signals.c: Likewise.
2008 * spinlock.h: Likewise.
2009 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2010 * sysdeps/alpha/pspinlock.c: New file.
2011 * sysdeps/arm/pspinlock.c: New file.
2012 * sysdeps/i386/pspinlock.c: New file.
2013 * sysdeps/m68k/pspinlock.c: New file.
2014 * sysdeps/mips/pspinlock.c: New file.
2015 * sysdeps/powerpc/pspinlock.c: New file.
2016 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2017 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2018 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2019 back to _pthread_fastlock. Define new pthread_spinlock_t.
2021 2000-05-24 Andreas Jaeger <aj@suse.de>
2023 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2025 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2027 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2029 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2031 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2033 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2035 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2036 object state is represented with additional bits which distinguish
2037 whether that state was set up in the current process, or
2038 in an ancestor process. If that state was set in an ancestor,
2039 it means that a fork happened while thread was executing the init
2040 function. In that case, the state is reset to NEVER.
2041 * mutex.c (__pthread_once_fork_prepare): New function.
2042 (__pthread_once_fork_child): Likewise
2043 (__pthread_once_fork_parent): Likewise
2044 (__pthread_reset_pthread_once): Removed.
2045 * ptfork.c (__fork): Call new handlers in mutex.c.
2046 * internals.h: Declarations of new mutex.c functions added.
2047 Declaration of removed function deleted.
2048 * linuxthreads.texi: Updated documentation about pthread_once
2049 to clarify what happens under cancellation and forking.
2051 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2053 * internals.h: New thread manager request type, REQ_KICK.
2054 * join.c (pthread_exit): main thread now calls exit() instead
2055 of _exit() in order to proper process cleanup.
2056 * manager.c (__pthread_manager): Do not terminate manager
2057 after unblocking main thread; wait for main thread's
2058 REQ_PROCESS_EXIT request instead.
2059 Also, added REQ_KICK case to handle new request; this just does
2061 * manager.c (pthread_exited): Do not terminate manager after
2062 unblocking main thread.
2063 * manager.c (__pthread_manager_sighandler): If the main thread
2064 is waiting for all other threads to die, send a REQ_KICK into
2065 the thread manager request pipe to get it to clean out the threads
2066 and unblock the main thread as soon as possible. This fixes
2067 the 2000 millisecond hang on shutdown bug.
2068 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2069 including the main one call pthread_exit(), or implicitly do so.
2070 * Makefile (tests): Add ex7.
2072 2000-05-05 Andreas Jaeger <aj@suse.de>
2074 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2075 (pthread_getcpuclockid): Correct test for ourselves.
2077 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2079 * internals.h (struct _pthread_descr_struct): Reorganization.
2080 Allocate room for 16 pointers at head of the structure for future
2081 thread-local data handling. Move p_self member in this area.
2082 * manager.c (pthread_handle_create): Adjust use of p_self.
2083 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2084 * pthread.c (__pthread_initial_thread): Adjust initialization.
2085 (__pthread_manager_thread): Likewise.
2087 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2089 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2090 for eventmask larger than 1 word.
2092 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2094 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2095 * pthread.c (__pthread_initialize_minimal): New function. Perform
2096 minimal initialization.
2097 (pthread_initialize): Remove this code here.
2098 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2099 are working around the problem in glibc.
2101 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2103 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2104 now. First gcc must be fixed (more concrete: libgcc).
2106 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2108 * pthread.c: Remove special treatement for interrupt handlers on x86.
2109 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2110 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2112 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2114 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2116 * join.c (pthread_exit): Set p_terminated after reporting the
2117 termination event instead of before.
2119 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2121 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2124 2000-04-18 Andreas Jaeger <aj@suse.de>
2126 * Versions: Use ld instead of ld.so.
2128 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2130 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2131 Remove the typedef keyword.
2133 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2135 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2137 (READ_MEMORY_BARRIER): Define.
2138 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2140 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2143 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2145 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2146 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2147 use thread_handle().
2149 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2151 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2152 if fast mutex is used. Don't initialize `already_canceled' twice.
2153 Correctly test for return value of timedsuspend.
2155 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2156 therefore don't need the _rt versions of the signal handlers.
2158 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2160 * pthread.c (pthread_yield): New function.
2161 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2162 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2163 * internals.h: Declare __pthread_yield.
2165 * pthread.c (pthread_initialize): Avoid a bit more code if
2166 realtime signals are known to exist.
2168 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2169 to dynamically detect RT signals and avoid generating compatibility
2170 functions with old kernel.
2171 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2172 __pthread_restart_new directly.
2173 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2174 __pthread_wait_for_restart_signal directly.
2175 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2176 __pthread_timedsuspend_new directly.
2178 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2180 * condvar.c: Remove all the special code to handle cond_timedwait.
2181 Use timedsuspend instead.
2182 * internals.h: Declare __pthread_timedsuspend_old,
2183 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2184 Remove declaration of __pthread_init_condvar.
2185 * pthread.c: Define __pthread_timedsuspend variable.
2186 (__pthread_timedsuspend_old): New function. Timed suspension
2187 implementation for old Linux kernels.
2188 (__pthread_timedsuspend_new): New function. Timed suspension
2189 implementation for new Linux kernels.
2190 * restart.h (timedsuspend): New function. Call appropriate
2191 suspension function through __pthread_timedsuspend.
2192 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2194 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2196 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2198 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2200 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2201 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2203 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2204 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2206 2000-04-14 Andreas Jaeger <aj@suse.de>
2208 * weaks.c: Fix typo.
2210 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2211 2.2 for linuxthreads.
2213 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2215 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2216 (pthread_getcpuclockid): Fix typo.
2218 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2220 * Makefile (libpthread-routines): Add getcpuclockid.
2221 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2222 * sysdeps/pthread/getcpuclockid.c: New file.
2223 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2224 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2226 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2228 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2230 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2231 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2232 and pthread_spin_unlock.
2233 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2234 into pthread_spinlock_t. Change all uses.
2235 * spinlock.c: Implement pthread_spin_lock.
2236 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2237 alias for real name.
2238 Define pthread_spin_trylock, pthread_spin_init, and
2239 pthread_spin_destroy.
2240 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2241 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2242 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2243 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2244 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2245 and pthread_spin_unlock.
2246 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2247 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2248 * condvar.c: Likewise.
2249 * internals.h: Likewise.
2251 * manager.c: Likewise.
2252 * mutex.c: Likewise.
2253 * pthread.c: Likewise.
2254 * rwlock.c: Likewise.
2255 * semaphore.c: Likewise.
2256 * signals.c: Likewise.
2258 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2260 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2262 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2264 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2265 _POSIX_SHARED_MEMORY_OBJECTS.
2267 2000-04-11 Andreas Jaeger <aj@suse.de>
2269 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2270 (__compare_and_swap): Mark as modifying memory.
2272 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2274 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2276 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2277 Don't have the 'asm' __volatile__.
2279 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2281 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2282 * spinlock.c (__pthread_lock): Add memory barriers.
2283 (__pthread_unlock): Likewise.
2284 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2286 (RELEASE): Not needed anymore.
2287 (__compare_and_swap): Mark asm as modifying memory.
2288 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2290 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2291 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2292 (MEMORY_BARRIER): Define using stbar.
2293 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2295 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2296 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2297 Mike Burrows <m3b@pa.dec.com>.
2299 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2301 * signals.c (sigaction): Fix return value for the case SIG is one
2302 of the signals the implementation uses.
2303 Patch by Xavier.Leroy@inria.fr.
2305 2000-04-01 Andreas Jaeger <aj@suse.de>
2307 * attr.c: Use shlib-compat macros.
2308 * oldsemaphore.c: Likewise.
2309 * pthread.c: Likewise.
2310 * weaks.c: Likewise.
2312 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2314 * semaphore.c (sem_timedwait): New function.
2315 Patch by Carl Mailloux <carlm@oricom.ca>.
2316 * semaphore.h: Declare sem_timedwait.
2317 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2319 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2321 * sysdeps/pthread/Makefile: File removed.
2323 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2325 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2326 * internals.h (__pthread_reset_pthread_once): Add prototype.
2327 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2329 * manager.c (pthread_handle_create): Store ID of new thread before
2332 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2334 * attr.c: Use new macros from shlib-compat.h to define versions.
2335 * oldsemaphore.c: Likewise.
2336 * semaphore.c: Likewise.
2337 * weaks.c: Likewise.
2339 * pthread.c: Update for new SHLIB_COMPAT definition.
2341 * manager.c (__pthread_manager): Unmask debug signal.
2343 * pthread.c (pthread_initialize): Test for address of __dso_handle
2344 being NULL, not value. Use __on_exit, not on_exit.
2345 Patch by Andreas Jaeger <aj@suse.de>.
2347 * pthread.c: Use new macros from shlib-compat.h to define versions.
2349 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2351 * pthread.c (pthread_initialize): Instead of on_exit use
2352 __cxa_atexit if __dso_label is available to allow unloading the
2353 libpthread shared library.
2355 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2357 * condvar.c: Make tests for ownership of mutex less strict.
2359 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2361 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2362 current thread and return error if not.
2363 (pthread_cond_timedwait_relative_old): Likewise.
2364 (pthread_cond_timedwait_relative_new): Likewise.
2366 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2367 (pthread_once_cancelhandler): New function.
2368 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2370 2000-03-14 Andreas Jaeger <aj@suse.de>
2372 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2374 (pthread_handle_sigrestart_rt): Likewise.
2375 * signals.c (pthread_sighandler_rt): Likewise.
2377 2000-03-02 Andreas Jaeger <aj@suse.de>
2379 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2380 Reported by Sean Chen <sean.chen@turbolinux.com>.
2382 2000-02-28 Andreas Jaeger <aj@suse.de>
2384 * rwlock.c: Fix typo.
2386 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2388 * rwlock.c: Define __* variants of the functions and make old names
2390 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2391 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2393 2000-02-25 Andreas Jaeger <aj@suse.de>
2395 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2396 pwrite64, lseek64, open64, and __open64 with version 2.2.
2398 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2400 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2402 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2404 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2405 nanosleep does not work either. Get absolute time inside the
2407 (pthread_cond_timedwait_relative_new): Likewise.
2408 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2410 2000-02-13 Andreas Jaeger <aj@suse.de>
2412 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2413 (pthread_cond_timedwait_relative_old): Likewise.
2415 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2417 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2418 but keep the code around. A bug in the kernel prevent us from
2420 (pthread_cond_timedwait_relative_new): Likewise.
2421 (PR libc/1597 and libc/1598).
2423 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2425 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2426 loop around nanosleep calls instead of around most of the function
2427 (pthread_cond_timedwait_relative_new): Likewise.
2428 body. Got rid of backwards goto and one local.
2430 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2432 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2433 before every nanosleep call to account for time spent in the rest
2435 (pthread_cond_timedwait_relative_new): Likewise.
2436 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2438 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2440 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2441 from nanosleep call so that in case we restart we only wait for the
2443 (pthread_cond_timedwait_relative_new): Likewise.
2444 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2446 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2448 * manager.c (pthread_allocate_stack): Compute guard page address
2449 correctly. Patch by HJ Lu.
2451 * sysdeps/pthread/pthread.h: Define
2452 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2454 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2456 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2457 preference handling.
2458 (pthread_rwlockattr_setkind_np): Allow
2459 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2460 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2462 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2464 * internals.h (pthread_readlock_info): New structure.
2465 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2466 p_untracked_readlock_count.
2467 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2468 Add initializers for new fields.
2469 * manager.c (pthread_free): Free read/write lock lists.
2470 * queue.h (queue_is_empty): New function.
2471 * rwlock.c: Implement requirements about when readers should get
2473 * sysdeps/pthread/pthread.h
2474 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2475 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2476 Define this name as well.
2477 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2479 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2481 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2482 Adjust initializers for struct _pthread_descr_struct change.
2483 * internals.h (struct _pthread_descr_struct): Move new elements to
2486 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2488 Redesigned how cancellation unblocks a thread from internal
2489 cancellation points (sem_wait, pthread_join,
2490 pthread_cond_{wait,timedwait}).
2491 Cancellation won't eat a signal in any of these functions
2492 (*required* by POSIX and Single Unix Spec!).
2493 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2494 simultaneous condition variable signal (not required by POSIX
2495 or Single Unix Spec, but nice).
2496 * spinlock.c: __pthread_lock queues back any received restarts
2497 that don't belong to it instead of assuming ownership of lock
2498 upon any restart; fastlock can no longer be acquired by two threads
2500 * restart.h: Restarts queue even on kernels that don't have
2501 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2502 avoiding a rare race condition in pthread_cond_timedwait.
2504 1999-12-31 Andreas Jaeger <aj@suse.de>
2506 * internals.h: Remove duplicate prototype declarations.
2508 * weaks.c: Remove __THROW from prototypes since the file is not
2509 compiled by a C++ compiler.
2510 * internals.h: Likewise.
2512 1999-12-30 Andreas Jaeger <aj@suse.de>
2514 * sysdeps/pthread/pthread.h: Move internal functions to...
2515 * sysdeps/pthread/bits/libc-lock.h: ...here.
2517 1999-12-29 Andreas Jaeger <aj@suse.de>
2519 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2521 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2523 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2526 * manager.c (__pthread_start): Add one more cast to prevent
2527 warning on 64bit machines.
2529 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2531 * manager.c (pthread_handle_create): Set p_pid of new thread
2532 before calling the callback function to report a new thread.
2534 1999-12-20 Andreas Jaeger <aj@suse.de>
2536 * pthread.c (pthread_initialize): Move getrlimit call after
2539 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2541 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2542 pwrite64, lseek64, open64, and __open64.
2543 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2544 pwrite64, lseek64, open64, and __open64.
2546 * manager.c (pthread_allocate_stack): Correct computation of
2547 new_thread_bottom. Correct handling of stack size and when the
2548 rlimit method to guard for stack growth is used.
2549 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2550 minus one pagesize (not two).
2552 1999-12-03 Andreas Jaeger <aj@suse.de>
2554 * Versions: Add __res_state with version GLIBC_2.2.
2556 * errno.c (__res_state): New function to return thread specific
2559 * pthread.c (pthread_initialize): Initialize p_resp.
2560 (__pthread_reset_main_thread): Also set p_resp.
2562 * manager.c (pthread_handle_create): Initialize p_resp.
2564 * internals.h: Add thread specific resolver state.
2565 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2567 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2569 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2571 * sysdeps/i386/i686/pt-machine.h: Likewise.
2572 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2574 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2576 * manager.c (pthread_start_thread_event): Initialize p_pid already
2579 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2581 * internals.h: Add prototype for __pthread_manager_event.
2582 * manager.c (__pthread_manager_event): New function.
2583 (pthread_start_thread_event): Correct computation of self.
2584 Use INIT_THREAD_SELF.
2585 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2586 (__pthread_initialize_manager): Respect event flags also for creation
2587 of the manager thread.
2589 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2591 * pthread.c (__pthread_initialize_manager): Initialize
2592 __pthread_manager_thread.p_tid.
2594 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2596 * internals.h: Declare __pthread_last_event.
2597 * manager.c: Define __pthread_last_event.
2598 (pthread_handle_create): Set __pthread_last_event.
2599 (pthread_exited): Likewise.
2600 * join.c (pthread_exit): Likewise.
2602 * Makefile (libpthread-routines): Add events.
2603 * events.c: New file.
2604 * internals.h: Protect against multiple inclusion.
2605 Include thread_dbP.h header.
2606 (struct _pthread_descr_struct): Add new fields p_report_events and
2608 Declare event reporting functions.
2609 * join.c (pthread_exit): Signal event if this is wanted.
2610 * manager.c (__pthread_threads_events): New variable.
2611 (pthread_handle_create): Take new parameters with event information.
2612 Signal TD_CREATE event if wanted.
2613 (__pthread_manager): Adjust pthread_handle_create call.
2614 (pthread_start_thread_event): New function. Block until manager is
2615 finished and then call pthread_start_thread.
2616 (pthread_exited): Signal TD_REAP event if wanted.
2618 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2620 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2622 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2624 1999-10-25 Andreas Jaeger <aj@suse.de>
2626 * internals.h: Remove K&R compatibility.
2627 * no-tsd.c: Likewise.
2628 * semaphore.h: Likewise.
2629 * signals.c: Likewise.
2630 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2631 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2632 * weaks.c: Likewise.
2634 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2636 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2637 pthread_handle_sigcancel with functions that restore %gs from the
2638 signal context. For each signal handling function, two wrappers
2639 are required, one for a non-RT signal and one for a RT signal.
2640 * signal.c: For i386, add code to restore %gs from the signal
2641 context in pthread_sighandler and pthread_sighandler_rt.
2643 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2645 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2647 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2649 * pthread.c (__pthread_initial_thread): Pass argument to
2650 PTHREAD_START_ARGS_INITIALIZER.
2651 (__pthread_manager_thread): Likewise.
2653 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2654 initialize function.
2656 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2658 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2660 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2662 * internals.h: Correct return types for __libc_read and __libc_write.
2664 1999-10-09 Andreas Jaeger <aj@suse.de>
2666 * internals.h: Add __new_sem_post to get prototype in
2667 manager.c; include semaphore.h for needed types.
2669 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2671 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2672 directly instead of calling sem_post which should not be necessary
2673 but is faster and might help in some case to work around problems.
2674 Patch by khendricks@ivey.uwo.ca [libc/1382].
2676 1999-10-08 Andreas Schwab <schwab@suse.de>
2678 * sysdeps/pthread/Subdirs: New file.
2681 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2683 * Implies: New file.
2684 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2685 * manager.c (pthread_handle_create): Initialize p_startfct.
2686 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2688 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2690 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2691 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2692 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2694 * condvar.c (pthread_cond_timedwait_relative): Never return with
2695 EINTR. Patch by Andreas Schwab.
2697 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2699 * signals.c (sigaction): Correct last patch. Don't select
2700 pthread_sighandler_rt based on the signal number but instead of
2701 the SA_SIGINFO flag.
2703 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2705 * specific.c: Move definitions of struct pthread_key_struct and
2706 destr_function to ...
2707 * internals.h: ...here.
2709 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2711 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2712 this instead of pthread_handle_sigrestart if the signal is an RT
2715 * signals.c: Handle passing through of sighandler arguments also
2716 for real-time signals.
2718 1999-09-03 Andreas Schwab <schwab@suse.de>
2720 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2722 (__vfork): New function, alias vfork.
2723 * Versions: Export __fork, vfork, and __vfork in libpthread.
2725 1999-08-23 Andreas Schwab <schwab@suse.de>
2727 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2728 call to signal handler.
2730 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2732 * pthread.c (__pthread_reset_main_thread): Undo last change.
2733 (__pthread_kill_other_threads_np): Reset signal handlers for the
2734 signals we used in the thread implementation here.
2736 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2738 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2739 for the signals we used in the thread implementation [PR libc/1234].
2741 * Versions: Export __pthread_kill_other_threads_np from libpthread
2744 * signals.c: Pass sigcontext through wrapper to the user function.
2746 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2748 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2749 __libc_internal_tsd_set.
2751 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2753 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2756 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2758 * internals.h: Align _pthread_descr_struct to 32 bytes.
2759 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2762 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2764 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2767 1999-07-09 Cristian Gafton <gafton@redhat.com>
2769 * Makefile (libpthread-routines): Add oldsemaphore routine.
2770 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2771 sem_trywait, and sem_wait to GLIBC_2.1.
2772 * oldsemaphore.c: New file.
2773 * semaphore.c: Add default_symbol_versions for the changed functions.
2774 (__new_sem_init): Rename from sem_init.
2775 (__new_sem_post): Rename from sem_post.
2776 (__new_sem_wait): Rename from sem_wait.
2777 (__new_sem_trywait): Rename from sem_trywait.
2778 (__new_sem_getvalue): Rename from sem_getvalue.
2779 (__new_sem_destroy): Rename from sem_destroy.
2781 1999-06-23 Robey Pointer <robey@netscape.com>
2783 * internals.h: Added p_nextlock entry to separate queueing for a
2784 lock from queueing for a CV (sometimes a thread queues on a lock
2785 to serialize removing itself from a CV queue).
2786 * pthread.c: Added p_nextlock to initializers.
2787 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2789 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2791 * manager.c (pthread_handle_create): Free mmap region after stack
2792 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2794 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2796 * man/pthread_cond_init.man: Correct example.
2797 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2799 * linuxthreads.texi (Condition Variables): Likewise.
2801 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2803 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2804 casx not cas, also successful casx returns the old value in rd
2805 and not the new value.
2807 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2809 * manager.c: If pthread_create() is given a NULL attribute
2810 and the thread manager runs with a realtime policy, set the
2811 scheduling policy of the newly created thread back to SCHED_OTHER.
2812 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2813 initialize the schedpolicy field of new_thread->p_start_args
2814 to that of the calling thread.
2816 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2818 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2819 instruction does not allow memory element to use offset.
2821 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2823 * manager.c (pthread_allocate_stack): Optimize initialization of new
2826 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2827 Don't use initializer since it is all zeroes.
2828 (__libc_once_define): Likewise.
2830 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2832 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2833 doesn't exist anymore.
2834 * sysdeps/i386/Implies: Likewise.
2835 * sysdeps/m68k/Implies: Likewise.
2836 * sysdeps/mips/Implies: Likewise.
2837 * sysdeps/powerpc/Implies: Likewise.
2838 * sysdeps/sparc/sparc32/Implies: Likewise.
2839 * sysdeps/sparc/sparc64/Implies: Likewise.
2841 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2843 * sysdeps/alpha/bits/semaphore.h: Removed.
2844 * sysdeps/powerpc/bits/semaphore.h: Removed.
2845 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2846 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2847 * Makefile (headers): Remove bits/semaphore.h.
2849 * semaphore.h: Define _pthread_descr if necessary.
2850 Don't include limits.h. Define SEM_VALUE_MAX directly.
2852 (sem_t): Protect element names with leading __.
2853 Add declarations for sem_close, sem_open, and sem_unlink.
2854 * semaphore.c: Adjust all functions for new element names.
2855 Define sem_close, sem_open, and sem_unlink.
2856 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2858 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2861 1999-03-16 H.J. Lu <hjl@gnu.org>
2863 * specific.c (pthread_key_delete): Check th->p_terminated to see
2864 if the thread is running.
2866 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2867 Added to GLIBC_2.0 for libc.so.
2869 1999-02-12 H.J. Lu <hjl@gnu.org>
2871 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2872 __libc_allocate_rtsig): Added to GLIBC_2.1.
2874 * internals.h (DEFAULT_SIG_RESTART): Removed.
2875 (DEFAULT_SIG_CANCEL): Removed.
2877 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2878 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2879 (__pthread_sig_restart, __pthread_sig_cancel,
2880 __pthread_sig_debug): Initialized.
2881 (pthread_initialize): Call init_rtsigs () to initialize
2884 1999-02-03 H.J. Lu <hjl@gnu.org>
2886 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2887 Don't restart the thread which sent REQ_DEBUG.
2888 (pthread_start_thread): Check if __pthread_sig_debug > 0
2891 * pthread.c (__pthread_initialize_manager): Suspend ourself
2892 after sending __pthread_sig_debug to gdb instead of
2893 __pthread_sig_cancel.
2895 1999-01-24 H.J. Lu <hjl@gnu.org>
2897 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2898 from mask if __pthread_sig_debug > 0.
2899 (pthread_handle_create): Increment __pthread_handles_num.
2901 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2902 * pthread.c (__pthread_initialize_manager): Likewise.
2904 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2905 instead of __libc_allocate_rtsig (2).
2906 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2907 instead of __pthread_sig_cancel.
2908 (pthread_handle_sigdebug): Fix comments.
2910 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2912 * manager.c (pthread_allocate_stack): Set
2913 __pthread_nonstandard_stacks if user-specified stack is used.
2915 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2917 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2918 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2920 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2922 * pthread.c: Use a third signal __pthread_sig_debug distinct
2923 from __pthread_sig_cancel to notify gdb when a thread is
2925 * manager.c: Likewise.
2926 * internals.h: Likewise.
2927 * signals.c: The implementation of sigwait(s) assumed that
2928 all signals in s have signal handlers already attached.
2929 This is not required by the standard, so make it work
2930 also if some of the signals have no handlers.
2932 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2934 * linuxthreads.texi: Remove pointers from first @node. Move old
2935 @node spec inside comment.
2937 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2939 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2942 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2944 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2945 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2947 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2949 * manager.c: Threads now send __pthread_sig_cancel on termination.
2950 Change clone call and signal masks.
2951 * thread.c (pthread_handle_sigrestart): Remove special code for
2953 (pthread_handle_sigcancel): In manager thread call
2954 __pthread_manager_sighandler.
2955 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2956 * sysdeps/i386/i686/pt-machine.h: Likewise.
2957 Patches by Xavier Leroy.
2959 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2961 * spinlock.c (__pthread_unlock): Don't crash if called for an
2962 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2964 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2967 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2969 * Examples/ex3.c: Wait until all threads are started before
2970 searching for the number to avoid race condition on very fast
2973 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2975 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2976 declaration since it's not needed.
2978 * sysdeps/pthread/pthread.h: Move internal functions to ...
2979 * internals.h: ...here.
2981 1998-12-02 H.J. Lu <hjl@gnu.org>
2983 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2984 SIGRTMIN is defined.
2985 (__pthread_sig_cancel): Likewise.
2987 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2989 * wrapsyscall.c: Include <sys/mman.h> for msync,
2990 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2991 Correct msync declaration.
2993 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2995 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2996 __libc_tsd_set): New macros for new interface.
2997 * no-tsd.c: New file, provide uninitialized defns of
2998 __libc_internal_tsd_get and __libc_internal_tsd_set.
2999 * Makefile (routines): Add no-tsd.
3001 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3003 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3004 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3005 __libc_internal_tsd_set): Move decls to ...
3006 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3009 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3010 __libc_internal_tsd_set): Make these pointers to functions, not
3011 functions; remove #pragma weak decls for them.
3012 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3013 Define static functions and initialized pointers to them.
3015 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3017 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3018 (CFLAGS-specific.c): Likewise.
3019 (CFLAGS-pthread.c): Likewise.
3020 (CFLAGS-ptfork.c): Likewise.
3021 (CFLAGS-cancel.c): Likewise.
3022 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3023 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3025 * mutex.c (pthread_mutex_init): Define as strong symbol.
3026 (pthread_mutex_destroy): Likewise.
3027 (pthread_mutex_trylock): Likewise.
3028 (pthread_mutex_lock): Likewise.
3029 (pthread_mutex_unlock): Likewise.
3030 (pthread_mutexattr_init): Likewise.
3031 (pthread_mutexattr_destroy): Likewise.
3032 (pthread_once): Likewise.
3033 * ptfork.c (pthread_atfork): Likewise.
3034 * specific.c (pthread_key_create): Likewise.
3035 (pthread_setspecific): Likewise.
3036 (pthread_getspecific): Likewise.
3038 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3040 * linuxthreads.texi: Fix punctuation after xref.
3042 1998-11-10 H.J. Lu <hjl@gnu.org>
3044 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3045 if it is defined in <linux/limits.h>.
3047 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3049 * spinlock.h (__pthread_trylock): Define inline.
3050 (__pthread_lock): Add extra parameter to declaration. Declare
3051 using internal_function.
3052 (__pthread_unlock): Declare using internal_function.
3053 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3054 of local variable self. Avoid recomputing self. Define using
3056 (__pthread_trylock): Remove.
3057 (__pthread_unlock): Define using internal_function.
3058 * cancel.c: Adjust for __pthread_lock interface change. Use already
3059 computed self value is possible.
3060 * condvar.c: Likewise.
3062 * manager.c: Likewise.
3063 * mutex.c: Likewise.
3064 * pthread.c: Likewise.
3065 * rwlock.c: Likewise.
3066 * semaphore.c: Likewise.
3067 * signals.c: Likewise.
3069 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3071 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3072 __ to field names of the struct.
3073 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3075 (pthread_attr_t): Likewise.
3076 (pthread_cond_t): Likewise.
3077 (pthread_condattr_t): Likewise.
3078 (pthread_mutex_t): Likewise.
3079 (pthread_mutexattr_t): Likewise.
3080 (pthread_rwlock_t): Likewise.
3081 (pthread_rwlockattr_t): Likewise.
3082 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3083 * cancel.c: Likewise.
3084 * condvar.c: Likewise.
3085 * manager.c: Likewise.
3086 * mutex.c: Likewise.
3087 * pthread.c: Likewise.
3088 * ptlongjmp.c: Likewise.
3089 * rwlock.c: Likewise.
3090 * spinlock.c: Likewise.
3092 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3094 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3097 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3100 * Makefile (libpthread-routines): Add pt-machine.
3101 * pt-machine.c: New file.
3102 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3103 yet defined. Use PT_EI in extern inline definitions.
3104 * sysdeps/arm/pt-machine.h: Likewise.
3105 * sysdeps/i386/pt-machine.h: Likewise.
3106 * sysdeps/i386/i686/pt-machine.h: Likewise.
3107 * sysdeps/m68k/pt-machine.h: Likewise.
3108 * sysdeps/mips/pt-machine.h: Likewise.
3109 * sysdeps/powerpc/pt-machine.h: Likewise.
3110 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3111 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3113 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3115 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3118 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3120 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3122 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3124 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3126 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3129 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3131 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3132 array index overflow.
3134 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3136 * sysdeps/pthread/semaphore.h: New file.
3138 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3140 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3141 _LIBC_TSD_KEY_DL_ERROR.
3143 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3145 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3146 * sysdeps/i386/pt-machine.h: Likewise.
3147 Suggested by Roland McGrath.
3149 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3151 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3152 access thread data with non-constant offsets.
3153 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3156 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3157 THREAD_SETMEM_NC definitions.
3159 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3161 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3163 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3165 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3166 not already defined.
3167 (struct _pthread_descr_struct): Add p_self and p_nr field.
3168 * manager.c (__pthread_handles): Define second element to point
3170 (__pthread_handles_num): Initialize to 2.
3171 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3172 (pthread_start_thread): Likewise.
3173 (pthread_handle_create): Start search for free slot at entry 2.
3174 Initialize new fields p_self and p_nr.
3175 Call __clone with CLONE_PTRACE if available.
3176 (pthread_free): Call FREE_THREAD_SELF if available.
3177 * pthread.c (__pthread_initial_thread): Initialize new fields.
3178 (__pthread_manager_thread): Likewise.
3179 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3181 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3182 elements of the thread descriptor.
3183 * condvar.c: Likewise.
3184 * errno.c: Likewise.
3186 * manager.c: Likewise.
3187 * pthread.c: Likewise.
3188 * ptlongjmp.c: Likewise.
3189 * semaphore.c: Likewise.
3190 * signals.c: Likewise.
3191 * specific.c: Likewise.
3192 * spinlock.c: Likewise.
3194 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3196 * sysdeps/i386/useldt.h: New file.
3197 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3199 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3200 THREAD_SETMEM using __thread_self.
3201 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3203 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3205 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3206 turned out that we didn't need to queue after all.
3208 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3210 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3211 and wastes space; correct types.
3213 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3215 * signals.c (sigaction): Handle NULL argument.
3217 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3219 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3222 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3224 * Makefile (linuxthreads-version): Extract correct number from
3227 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3229 * Banner: Bump version number to 0.8
3230 * FAQ.html: Many updates, in particular w.r.t. debugging.
3231 * manager.c: Support for non-default stacksize for
3232 LinuxThreads-allocated stacks;
3233 don't use guard pages for stacks with default size, rely on
3234 rlimit(RLIMIT_STACK) instead (it's cheaper).
3236 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3237 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3238 * condvar.c: Likewise.
3239 * internals.h: Likewise.
3240 * restart.h: Likewise.
3241 * signals.c: Likewise.
3242 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3244 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3246 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3247 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3248 * Versions: Put __pthread_mutexattr_settype under version
3249 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3250 __pthread_mutexattr_gettype.
3252 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3254 * sysdeps/pthread/bits/libc-lock.h: Make
3255 __pthread_mutexattr_settype weak. Don't make
3256 __pthread_mutexattr_setkind_np weak.
3258 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3260 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3261 call can succeed here.
3263 * mutex.c: Define __pthread_mutexattr_settype and make
3264 __pthread_mutexattr_setkind_np an alias.
3265 Likewise for __pthread_mutexattr_gettype.
3267 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3269 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3272 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3274 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3276 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3278 * Examples/ex6.c: Include <unistd.h> for usleep.
3280 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3282 * Examples/ex4.c (main): Use exit, not pthread_exit.
3284 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3286 * Versions: Add __pthread_mutexattr_gettype and
3287 __pthread_mutexattr_settype.
3288 * lockfile.c: Use __pthread_mutexattr_settype instead of
3289 __pthread_mutexattr_setkind_np.
3290 * mutex.c: Define __pthread_mutexattr_gettype and
3291 __pthread_mutexattr_settype.
3293 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3294 __pthread_mutexattr_settype.
3295 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3296 Use __pthread_mutexattr_settype.
3298 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3300 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3301 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3302 pthread_mutexattr_settype.
3303 * sysdeps/pthread/pthread.h: Declare these functions.
3304 Move pthread_sigmask and pthread_kill declaration in separate header.
3305 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3307 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3309 * Makefile: Add rules to compile and run tests.
3310 * Examples/ex1.c: Little changes to fix warnings.
3311 * Examples/ex2.c: Likewise.
3312 * Examples/ex3.c: Likewise.
3313 * Examples/ex4.c: Likewise.
3314 * Examples/ex5.c: Likewise.
3315 * Examples/ex6.c: New file.
3317 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3319 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3321 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3323 * attr.c: Include <string.h>.
3325 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3327 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3328 * internals.h: Include limits.h.
3329 * manager.c: Use memcpy to copy sched_param.
3330 * ptfork.c: Include errno.h.
3331 * pthread.c: Likewise.
3332 * semaphore.c: Likewise.
3333 * specific.c: Likewise.
3334 * spinlock.h: Likewise.
3335 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3336 type definition to ...
3337 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3339 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3341 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3343 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3344 as macros as demanded in POSIX.1, Annex C.
3346 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3348 * internals.h (struct pthread_request): For free use pthread_t
3349 instead of pthread_descr.
3350 * join.c (pthread_join): Pass thread_id, not th to manager.
3351 (pthread_detach): Likewise.
3352 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3353 (pthread_exited): Remove detached queue code.
3354 (pthread_handle_free): Expect thread ID parameter and use it to
3355 validate the thread decsriptor. Don't use detached queue.
3356 Patches by Xavier Leroy.
3358 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3360 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3361 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3362 __pthread_atfork, __pthread_key_create, __pthread_once.
3363 * internals.h: Doc fix.
3364 * pthread.c (__pthread_initialize): Define again.
3366 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3368 * manager.c (pthread_exited): If thread is not detached put it on
3370 (pthread_handle_free): If thread is not on list with living threads
3371 search on list with detached threads.
3373 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3374 for new definition of pthread_rwlock_t.
3376 * spinlock.c: Correct test whether to compile
3377 __pthread_compare_and_swap or not.
3379 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3381 * attr.c: Finish user stack support. Change locking code to be safe
3382 in situations with different priorities.
3383 * cancel.c: Likewise.
3384 * condvar.c: Likewise.
3385 * internals.h: Likewise.
3387 * manager.c: Likewise.
3388 * mutex.c: Likewise.
3389 * pthread.c: Likewise.
3390 * ptlongjmp.c: Likewise.
3391 * queue.h: Likewise.
3392 * rwlock.c: Likewise.
3393 * semaphore.c: Likewise.
3394 * semaphore.h: Likewise.
3395 * signals.c: Likewise.
3396 * spinlock.c: Likewise.
3397 * spinlock.h: Likewise.
3398 * sysdeps/pthread/pthread.h: Likewise.
3399 Patches by Xavier Leroy.
3401 * sysdeps/i386/i686/pt-machine.h: New file.
3403 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3405 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3406 [sg]et_stackaddr prototypes always available.
3408 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3409 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3411 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3413 * manager.c (pthread_free): Undo patch from 980430.
3414 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3416 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3418 * manager.c: Define __pthread_manager_adjust_prio and use it to
3419 increase priority when needed.
3420 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3421 * mutex.c: Optimize mutexes to wake up only one thread.
3422 * pthread.c: Move PID of manager for global variable in structure
3424 Patches by Xavier Leroy.
3426 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3428 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3430 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3432 * attr.c: Correct typo.
3434 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3436 * manager.c (pthread_free): Unmap guard before the stack.
3437 Patch by Matthias Urlichs.
3439 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3441 * manager.c (pthread_free): Detect already free child.
3442 Patch by Xavier Leroy, reported by Matthias Urlichs.
3444 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3446 * Makefile (linuxthreads-version): Renamed back from
3449 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3451 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3454 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3456 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3457 * internals.h: Add definitions for new spinlock implementation.
3458 * ptlongjmp.c: New file.
3459 * spinlock.c: New file.
3460 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3461 new function __pthread_acquire to prevent deadlocks with thread
3462 with different priorities.
3463 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3465 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3467 * manager.c (__pthread_manager): Reduce first argument to select
3468 to include just the needed file descriptor.
3470 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3472 * manager.c: Fix last patch which caused core dumps.
3474 * pthread.c: Correctly handle missing SIGRTMIN.
3476 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3478 * libpthread.map: Add __libc_internal_tsd_get and
3479 __libc_internal_tsd_set. Add missing cancelable functions. Export
3480 libc internal versions of the cancelable functions.
3482 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3484 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3486 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3488 * attr.c: Implement pthread_attr_[gs]etguardsize,
3489 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3490 Change pthread_attr_init to have two interfaces.
3491 * internals.h (struct _pthread_descr_struct): Add new fields for
3493 * libpthread.map: Add names in GLIBC_2.1 section.
3494 * manager.c (pthread_handle_create): Implement guardsize and
3496 (pthread_free): Likewise.
3497 * pthread.c (pthread_create): Add new interface for changed
3499 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3500 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3503 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3505 * manager.c: Enable resetting of the thread scheduling policy
3506 to SCHED_OTHER when the parent thread has a different one.
3508 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3510 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3511 _POSIX_ASYNCHRONOUS_IO.
3513 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3515 * mutex.c: Implement new mutex types.
3517 * internals.h: Include <signal.h>.
3519 * libpthread.map: Add __erno_location and __h_errno_location.
3521 * errno.c: Return pointer to variable actually in use. This might
3522 not be the one in the thread structure.
3523 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3525 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3526 of manager thread structure.
3527 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3529 * pthread.c: Adapt initializer for thread structures.
3530 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3531 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3532 current thread to global variables.
3534 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3536 * rwlock.c: New file.
3537 * Makefile (libpthread-routines): Add rwlock.
3538 * sysdeps/pthread/pthread.h: Define data structures and declare
3540 * libpthread.map: Add new functions.
3542 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3544 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3545 * sysdeps/arm/Implies: likewise.
3546 * README: Document it.
3548 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3550 * signals.c: Remove unneeded initializer for sigwaited, saving a
3553 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3555 * semaphore.c (sem_init): Set sem_spinlock only if available.
3557 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3559 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3560 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3562 * Makefile: Update from LinuxThreads 0.7.
3563 * internals.h. Likewise.
3564 * manager.c: Likewise.
3565 * mutex.c: Likewise.
3566 * pthread.c: Likewise.
3567 * signals.c: Likewise.
3568 * specific.c: Likewise.
3569 * Examples/ex3.c: Likewise.
3571 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3573 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3576 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3578 * wrapsyscall.c: Add socket functions which are also cancelation
3581 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3583 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3584 New functions for fast thread specific data within libc.
3586 * internals.h: Add new array p_libc_specific to struct
3587 _pthread_descr_struct.
3589 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3591 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3593 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3594 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3596 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3598 * internals.h (struct _pthread_descr_struct): Add definitions for
3599 two-level specific key handling.
3600 * manager.c (pthread_handle_create): Initialize specific memory array.
3601 * specific.c: Implement two-level key handling.
3602 * weaks.c: Don't provide dummy key handling.
3603 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3604 Add definition of __libc_key_t.
3605 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3607 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3608 PTHREAD_DESTRUCTOR_ITERATIONS.
3610 * manager.c (pthread_handle_create): Compare mmap result with
3613 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3614 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3616 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3618 sysdeps/sparc -> sysdeps/sparc/sparc32
3619 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3621 * internals.h: Change definition of THREAD_SELF to be an expression,
3622 not a statement that did a return.
3623 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3624 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3625 Follow Solaris and use a "system reserved" register (%g6) to hold
3626 the thread descriptor.
3627 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3629 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3631 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3632 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3633 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3635 * semaphore.c: Include spinlock.h only when needed.
3637 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3638 keys for entries not in use.
3640 * weaks.c: Implement key handling functions for real.
3642 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3644 Initial sparc64-linux support:
3645 * sysdeps/sparc64/Implies: New file.
3646 * sysdeps/sparc64/pt-machine.h: Likewise.
3648 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3650 * semaphore.c: Include spinlock.h at correct place.
3653 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3655 The Great Bit File Move:
3656 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3657 * sysdeps/powerpc/semaphorebits.h: Likewise.
3658 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3659 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3660 * sysdeps/pthread/libc-lock.h: -> bits/
3661 * sysdeps/pthread/stdio-lock.h: Likewise.
3662 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3663 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3664 * semaphore.h: Likewise.
3665 * sysdeps/pthread/pthread.h: Likewise.
3667 * lockfile.c: <foo.h> -> <bits/foo.h>.
3668 * semaphore.h: Likewise.
3670 * Makefile: (headers): foo.h -> bits/foo.h.
3671 * sysdeps/pthread/Makefile: Likewise.
3673 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3675 * semaphore.c (sem_init): Set sem_spinlock only if available.
3677 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3680 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3682 Update from LinuxThreads 0.6.
3684 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3685 and __sched_get_priority_min instead of names without `__'.
3687 * manager.c: Rewrite large parts to implement opaque pthread_t.
3689 * cancel.c: Adapt for opaque pthread_t type.
3690 * condvar.c: Likewise.
3691 * errno.c: Likewise.
3693 * mutex.c: Likewise.
3694 * pthread.c: Likewise.
3695 * signals.c: Likewise.
3696 * specific.c: Likewise.
3697 * restart.h: Likewise.
3698 * queue.h: Likewise.
3699 * Examples/ex3.c: Likewise.
3700 * Examples/ex4.c: Likewise.
3701 * sysdeps/pthread/pthread.h: Likewise.
3703 * pthread.c: Accumulate time for all threads in thread manager.
3705 * semaphore.c: Implement fallback implementation for architectures
3706 sometimes missing compare-exchange operations.
3708 * cancel.c (pthread_cancel): Validate handle argument.
3709 * join.c (pthread_join): Likewise.
3710 (pthread_detach): Likewise.
3711 * signals.c (pthread_kill): Likewise.
3713 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3715 * queue.h (enqueue): Enqueue thread according to priority.
3717 * internals.c (struct pthread_start_args): New struct for passing
3718 args to cloning function.
3719 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3722 * Examples/Makefile (clean): Pass -f option to rm.
3724 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3725 and define TEST_FOR_COMPARE_AND_SWAP.
3726 * sysdeps/i386/i486/pt-machine.h: Removed.
3728 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3731 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3733 * restart.h (suspend): Clear p_signal before suspending.
3734 (suspend_with_cancellation): Likewise.
3735 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3737 * weaks.c: Make __pthread_key_create return 1.
3738 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3739 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3740 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3743 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3745 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3747 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3749 * sysdeps/powerpc/Implies: Added.
3750 * sysdeps/powerpc/pt-machine.h: Added.
3751 * sysdeps/powerpc/semaphorebits.h: Added.
3753 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3755 * pthread.c (__pthread_initial_thread): Correct
3757 (__pthread_manager_thread): Likewise.
3758 Reported by Andreas Jaeger.
3760 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3762 Since sigset_t no longer fits in a register, we can't pass in the
3763 thread's initial mask so easily. Take this opportunity to simplify
3764 the clone implementation by only accepting a single void* argument.
3766 * manager.c (__pthread_manager): Put thread vitals in the thread
3767 struct instead of as arguments through clone.
3768 (pthread_start_thread): Look for them there.
3769 * internals.h (struct _pthread): Add p_initial_fn,
3770 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3771 * pthread.c (pthread_initialize_manager): Revise clone invocation.