1 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3 * tst-context.c (threadfct): Initialize context before calling
6 * Examples/ex17.c: Make sure test thread is around long enough.
8 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
10 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
12 2001-07-24 Ulrich Drepper <drepper@redhat.com>
14 * tst-context.c (main): Print explanation before bailing out
15 because context handling is not supported.
17 2001-07-23 Ulrich Drepper <drepper@redhat.com>
19 * Makefile (tests): Add tst-context.
20 * tst-context.c: New file.
22 * sysdeps/pthread/bits/stdio-lock.h: Define
23 _IO_cleanup_region_start_noarg.
25 2001-07-23 Jakub Jelinek <jakub@redhat.com>
27 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
28 (ARCH_STACK_MAX_SIZE): Define.
29 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
30 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
32 2001-07-19 Jakub Jelinek <jakub@redhat.com>
34 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
36 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
37 (ARCH_STACK_MAX_SIZE): Define.
38 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
39 NEED_SEPARATE_REGISTER_STACK.
41 2001-07-16 Andreas Schwab <schwab@suse.de>
43 * Makefile (before-compile): Don't add $(objpfx)crti.o.
44 (omit-deps): Add crti.
45 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
46 it is filtered out of the link command.
48 2001-07-16 Ulrich Drepper <drepper@redhat.com>
50 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
51 to find the right value for __pthread_initial_thread_bos, it's not
52 used. If not FLOATING_STACKS first run
53 __pthread_init_max_stacksize.
55 2001-06-16 H.J. Lu <hjl@gnu.org>
57 * internals.h: Include <stackinfo.h>.
59 * attr.c: Don't include <stackinfo.h> here.
61 * manager.c: Likewise.
62 * pthread.c: Likewise.
63 * ptlongjmp.c: Likewise.
65 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
67 * attr.c: Make _STACK_GROWS_UP work.
68 * internals.h: Likewise.
69 * manager.c: Likewise.
70 * pthread.c: Likewise.
72 2001-06-15 H.J. Lu <hjl@gnu.org>
74 * pthread.c (__pthread_reset_main_thread): Fix a typo.
76 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
78 * semaphore.h: Use struct _pthread_fastlock as an element of
79 sem_t instead of an identical struct.
80 * rwlock.c: Remove casts.
81 * semaphore.c: Likewise.
83 2001-04-30 Alan Modra <amodra@one.net.au>
85 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
87 2001-05-25 Bruce Mitchener <bruce@cubik.org>
89 * linuxthreads.texi: Spelling corrections.
91 2001-05-25 Ulrich Drepper <drepper@redhat.com>
93 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
94 returning successfully.
95 Patch by Gene Cooperman <gene@ccs.neu.edu>.
97 2001-05-24 Ulrich Drepper <drepper@redhat.com>
99 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
100 serious work try once whether the lock is uncontested.
101 Remove duplicate reading of __status before loop.
102 Change suggested by Hans Boehm <hans_boehm@hp.com>.
104 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
105 (__pthread_alt_trylock): Likewise.
107 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
109 Memory barrier overhaul following line by line inspection.
110 * mutex.c (pthread_once): Missing memory barriers added.
111 * pthread.c (__pthread_wait_for_restart_signal,
112 __pthread_timedsuspend_new, __pthread_restart_new): Added
113 memory barriers ``just in case'' and for documentary value.
114 * spinlock.c (__pthread_release): New inline function for releasing
115 spinlock, to complement __pthread_acquire. Includes memory
116 barrier prior to assignment to spinlock, and __asm __volatile
117 dance to prevent reordering or optimization of the spinlock access.
118 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
119 __pthread_alt_timedlock, __pthread_alt_unlock,
120 __pthread_compare_and_swap): Updated to use new __pthread_release
121 instead of updating spinlock directly.
122 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
123 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
124 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
125 Memory barrier overhaul. Lots of missing memory barriers added,
126 a couple needless ones removed.
127 * spinlock.c (__pthread_compare_and_swap): testandset optimization
128 removed, just calls __pthread_acquire, which has the new read
129 barrier in it before its testandset.
131 2001-05-20 Roland McGrath <roland@frob.com>
133 * Makeconfig: New file, variables used to be in main libc Makeconfig.
135 2001-05-09 Geoff Keating <geoffk@redhat.com>
137 * sysdeps/powerpc/pt-machine.h
138 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
139 (__compare_and_swap): Remove memory barriers.
140 (__compare_and_swap_with_release_semantics): New function.
142 2001-04-24 Andreas Jaeger <aj@suse.de>
144 * wrapsyscall.c: send* and recv* return ssize_t.
146 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
147 mutex instead of double locking it.
148 Reported by Pierre Artaud <partaud@sodatec.com>.
150 2001-04-23 Ulrich Drepper <drepper@redhat.com>
152 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
153 using #ifdef whether the clock is available.
154 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
156 * sysdeps/ia64/Versions: New file.
158 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
159 have to call __gmon_start__ in the libpthread DSO.
160 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
162 * Makefile (libpthread-routines): Add ptclock_gettime and
164 * internals.h: Don't use cpuclock-init.h definitions, use
165 hp-timing.h definitions.
166 * pthread.c: Likewise.
167 * manager.c: Likewise.
168 * ptclock_gettime.c: New file.
169 * ptclock_settime.c: New file.
170 * internals.h: Fix parameter type for __pthread_clock_gettime and
171 __pthread_clock_settime.
173 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
174 * sysdeps/i386/i586/ptclock_settime.c: Removed.
175 * sysdeps/i386/i586/Makefile: Removed.
177 2001-04-22 Ulrich Drepper <drepper@redhat.com>
179 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
180 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
182 2001-04-21 Andreas Jaeger <aj@suse.de>
184 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
185 attribute, remove statements that will never be executed.
186 (thread_func): Remove mutex_unlock call since it's never executed.
187 (thread_func): Fix comment as suggested by Jakub Jelinek.
189 * manager.c (__pthread_manager): Add noreturn
191 (pthread_start_thread): Likewise, remove return statement.
192 (pthread_start_thread_event): Likewise.
193 Add noreturn attribute for pthread_handle_exit.
194 * weaks.c: Add noreturn attribute for pthread_exit.
196 * internals.h: Add __pthread_clock_gettime and
197 __pthread_clock_settime prototypes.
199 2001-04-21 Ulrich Drepper <drepper@redhat.com>
201 * internals.h: Include <cpuclock-init.h>.
202 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
203 CPUCLOCK_VARDEF is defined.
204 * pthread.c (__pthread_initialize_minimal): Initialize
205 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
206 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
207 for new thread to current CPU clock value.
209 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
211 * sysdeps/i386/i586/Makefile: New file.
212 * sysdeps/i386/i586/Versions: New file.
213 * sysdeps/i386/i586/ptclock_gettime.c: New file.
214 * sysdeps/i386/i586/ptclock_settime.c: New file.
215 * sysdeps/i386/i686/Implies: New file.
217 2001-04-18 Jakub Jelinek <jakub@redhat.com>
219 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
220 $generated, not $postclean-generated.
222 2001-04-18 Andreas Jaeger <aj@suse.de>
224 * Makefile (otherlibs): Added.
226 2001-04-18 Jakub Jelinek <jakub@redhat.com>
228 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
230 2001-04-16 Ulrich Drepper <drepper@redhat.com>
232 * signals.c (sigwait): NSIG is no signal number. Block all
233 signals while in signal handler for signals in SET.
234 Patch by Manfred Spraul <manfred@colorfullife.com>.
236 2001-04-12 Ulrich Drepper <drepper@redhat.com>
238 * tst-cancel.c: Disable most tests. Add new test where all
239 cleanup handlers must run.
240 * Makefile (tests): Add tst-cancel again.
242 * cancel.c (__pthread_perform_cleanup): Correct condition for
243 leaving cleanup loop early.
245 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
246 all the files which use CURRENT_STACK_FRAME.
247 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
248 __builtin_frame_address.
249 * sysdeps/i386/i686/pt-machine.h: Likewise.
251 2001-04-11 Ulrich Drepper <drepper@redhat.com>
253 * Makefile (tests): Comment out tst-cancel for now.
255 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
256 temporary file in object directory.
257 * Makefile: Don't allow inlining when compiling tst-cancel.c.
258 Pass $(objpfx) to tst-cancel.
260 2001-04-11 David S. Miller <davem@redhat.com>
262 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
263 up closer to user local variables so that new cleanup heuristics work.
264 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
266 2001-04-11 Ulrich Drepper <drepper@redhat.com>
268 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
270 (_pthread_cleanup_push_defer): Likewise.
272 * tst-cancel.c (main): Fix loop printing cleanup output.
274 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
276 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
278 (__pthread_spin_trylock): Likewise.
279 * sysdeps/sh/pt-machine.h (testandset): Likewise.
281 2001-04-10 Ulrich Drepper <drepper@redhat.com>
283 * join.c (pthread_exit): Move code to new function __pthread_do_exit
284 which takes an extra parameter with the current frame pointer.
285 Call new function with CURRENT_STACK_FRAME.
286 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
287 with the new parameter.
288 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
289 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
290 this parameter as the initial value the cleanup handler records are
291 compared against. No active cleanup handler record must have an
292 address lower than the previous one and the initial record must be
293 above (below on PA) the frame address passed in.
294 (pthread_setcancelstate): Call __pthread_do_exit instead of
296 (pthread_setcanceltype): Likewise.
297 (pthread_testcancel): Likewise.
298 (_pthread_cleanup_pop_restore): Likewise.
299 * condvar.c (pthread_cond_wait): Likewise.
300 (pthread_cond_timedwait_relative): Likewise.
301 * manager.c (pthread_start_thread): Likewise.
302 * oldsemaphore.c (__old_sem_wait): Likewise.
303 * pthread.c (pthread_handle_sigcancel): Likewise.
304 * semaphore.c (__new_sem_wait): Likewise.
305 (sem_timedwait): Likewise.
306 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
307 to limit the cleanup handlers which get run.
308 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
309 for __pthread_perform_cleanup.
311 * Makefile (tests): Add tst-cancel.
312 * tst-cancel.c: New file.
314 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
316 * sysdeps/cris/pt-machine.h: New file.
317 * sysdeps/cris/pspinlock.c: New file.
319 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
321 * shlib-versions: Add case for Linux on CRIS.
323 2001-03-26 Ulrich Drepper <drepper@redhat.com>
325 * attr.c (pthread_getattr_np): Correct computation of stack size
326 for machiens with register stack.
328 * Examples/ex17.c (main): Correct detection of failed mmap call.
330 2001-03-21 Jakub Jelinek <jakub@redhat.com>
332 * pthread.c (__pthread_initialize_manager): Fix a typo.
334 2001-03-21 Jakub Jelinek <jakub@redhat.com>
336 * attr.c (__pthread_attr_setstack): Fix alignment check.
337 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
338 * Makefile (tests): Add ex17 test.
339 * Examples/ex17.c: New test.
341 2001-03-20 Ulrich Drepper <drepper@redhat.com>
343 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
344 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
345 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
347 2001-03-18 Ulrich Drepper <drepper@redhat.com>
349 * Makefile: When generating DSO link with libc_nonshared.a.
351 2001-02-26 Jakub Jelinek <jakub@redhat.com>
353 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
355 2001-02-23 Jakub Jelinek <jakub@redhat.com>
357 * internals.h (__pthread_init_max_stacksize): New prototype.
358 * attr.c (__pthread_attr_setstacksize): Call
359 __pthread_init_max_stacksize if not yet initialized.
360 * pthread.c (__pthread_init_max_stacksize): New function.
361 (__pthread_initialize_manager): Call it.
362 Patch by <dtc@cmucl.cons.org>.
364 2001-03-16 Ulrich Drepper <drepper@redhat.com>
366 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
368 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
370 * shlib-versions: Add rule for Linux on 64 bit S/390.
371 * sysdeps/s390/s390-64/pt-machine.h: New file.
372 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
374 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
376 * sysdeps/s390/pt-machine.h: Move to...
377 * sysdeps/s390/s390-32/pt-machine.h: ...here.
378 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
380 2001-03-15 Ulrich Drepper <drepper@redhat.com>
382 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
383 * attr.c: Implement pthread_getattr_np.
384 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
385 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
386 * manager.c (pthread_handle_create): Initialize p_inheritsched.
388 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
390 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
393 2001-02-20 Hans Boehm <hans_boehm@hp.com>
395 * manager.c (manager_mask): Removed static vesion. Now always local
396 to __pthread_manager().
397 (manager_mask_all): Removed completely.
398 (__pthread_manager): Remove manager_mask_all initialization.
399 (pthread_handle_create): Remove code to set and reset signal mask
400 around __clone2() calls.
402 2001-02-17 Jakub Jelinek <jakub@redhat.com>
404 * spinlock.c (__pthread_lock): Force lock->__status to be read from
405 memory on every spin.
407 2001-02-10 Andreas Jaeger <aj@suse.de>
409 * Makefile (extra-objs): New.
411 2001-02-09 Jakub Jelinek <jakub@redhat.com>
413 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
414 __pthread_initialize_minimal prototype.
416 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
418 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
420 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
422 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
424 2001-02-06 Ulrich Drepper <drepper@redhat.com>
426 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
427 broken code. Patch by Jes Sorensen.
429 2001-02-06 Andreas Jaeger <aj@suse.de>
431 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
433 * internals.h: ...here.
435 2001-02-05 Jes Sorensen <jes@linuxcare.com>
437 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
439 2001-02-02 Ulrich Drepper <drepper@redhat.com>
441 * Versions: Remove __pthread_initialize_minimal.
443 2001-02-01 Ulrich Drepper <drepper@redhat.com>
445 * Makefile: Add rules to build crti.o and make it being used in
446 building libpthread.so.
447 * sysdeps/i386/Makefile: New file.
448 * sysdeps/pthread/pt-initfini.c: New file.
450 * pthread.c: Cleanups.
452 2001-01-28 Andreas Jaeger <aj@suse.de>
454 * oldsemaphore.c (__old_sem_init): Adjust for last change.
455 * sysdeps/pthread/bits/libc-lock.h: Likewise.
456 * spinlock.c: Likewise.
458 2001-01-28 Ulrich Drepper <drepper@redhat.com>
460 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
461 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
462 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
463 * pthread.c: Likewise.
464 * spinlock.h: Likewise.
465 * sysdeps/pthread/pthread.h: Likewise.
467 2001-01-26 Ulrich Drepper <drepper@redhat.com>
469 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
470 as struct __pthread_attr_s.
472 * semaphore.h (sem_t): Cleanup namespace, rename status and
475 2001-01-13 Jakub Jelinek <jakub@redhat.com>
477 * pthread.c (pthread_onexit_process): Clear
478 __pthread_manager_thread_bos after freeing it.
479 * Makefile (tests): Add ex16.
480 * Examples/ex16.c: New file.
482 2001-01-11 Jakub Jelinek <jakub@redhat.com>
484 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
486 * pthread.c (pthread_exit_process): Rename to...
487 (pthread_onexit_process): ...this.
488 (pthread_atexit_process, pthread_atexit_retcode): New.
489 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
490 and only if HAVE_Z_NODELETE is not defined.
491 (__pthread_initialize_manager): Register pthread_atexit_retcode
494 2001-01-11 Ulrich Drepper <drepper@redhat.com>
496 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
498 2001-01-11 Jakub Jelinek <jakub@redhat.com>
500 * Makefile (tests): Add ex15.
501 * Examples/ex15.c: New test.
503 2001-01-08 Ulrich Drepper <drepper@redhat.com>
505 * pthread.c (pthread_exit_process): Free memory allocated for
508 2000-12-31 Ulrich Drepper <drepper@redhat.com>
510 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
511 (pthread_free): Always unmap the stack. It's safe now that we don't
512 use MAP_FIXED to allocate stacks.
514 2000-12-31 Ulrich Drepper <drepper@redhat.com>
516 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
518 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
520 2000-11-15 Wolfram Gloger <wg@malloc.de>
522 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
523 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
525 2000-12-27 Andreas Jaeger <aj@suse.de>
527 * Examples/ex13.c: Make local functions static.
528 * ecmutex.c: Likewise.
529 * joinrace.c: Likewise.
530 * Examples/ex14.c: Likewise.
532 * Examples/ex2.c: Make local functions static; reformat.
533 * Examples/ex1.c: Likewise.
534 * Examples/ex4.c: Likewise.
535 * Examples/ex5.c: Likewise.
536 * Examples/ex7.c: Likewise.
538 * oldsemaphore.c: Add prototypes to shut up GCC.
539 * pt-machine.c: Likewise.
541 * weaks.c: Add prototype for pthread_exit.
543 * internals.h: Add some prototypes, format prototypes and add
545 Move __libc_waitpid prototype to include/sys/wait.h.
547 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
549 * specific.c: Likewise.
550 * ptfork.c: Likewise.
552 * lockfile.c: Include internals.h to get prototypes.
553 * events.c: Likewise.
554 * sysdeps/alpha/pspinlock.c: Likewise.
555 * sysdeps/arm/pspinlock.c: Likewise.
556 * sysdeps/hppa/pspinlock.c: Likewise.
557 * sysdeps/i386/pspinlock.c: Likewise.
558 * sysdeps/ia64/pspinlock.c: Likewise.
559 * sysdeps/m68k/pspinlock.c: Likewise.
560 * sysdeps/mips/pspinlock.c: Likewise.
561 * sysdeps/powerpc/pspinlock.c: Likewise.
562 * sysdeps/s390/pspinlock.c: Likewise.
563 * sysdeps/sh/pspinlock.c: Likewise.
564 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
565 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
566 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
568 2000-12-27 Ulrich Drepper <drepper@redhat.com>
570 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
571 (__pthread_attr_getstack): Return correct address.
572 Add warnings for using pthread_attr_getstackaddr and
573 pthread_attr_setstackaddr.
575 2000-12-26 Ulrich Drepper <drepper@redhat.com>
577 * Examples/ex6.c (test_thread): Make static.
578 * Examples/ex12.c (test_thread): Make static and add noreturn
581 2000-12-18 Jes Sorensen <jes@linuxcare.com>
583 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
584 and compare_and_swap_with_release_semantics returns int not long.
586 2000-12-17 Andreas Jaeger <aj@suse.de>
588 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
590 * sysdeps/arm/pt-machine.h (testandset): Likewise.
591 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
592 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
593 * sysdeps/sh/pt-machine.h (testandset): Likewise.
594 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
595 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
597 2000-12-17 Ulrich Drepper <drepper@redhat.com>
599 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
600 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
602 2000-12-17 Andreas Jaeger <aj@suse.de>
604 * internals.h: Add prototypes for testandset and
605 __compare_and_swap to shut up gcc warnings.
607 2000-12-06 Wolfram Gloger <wg@malloc.de>
609 * join.c (pthread_detach): Allow case where the thread has already
612 2000-12-05 Andreas Jaeger <aj@suse.de>
614 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
615 * sysdeps/mips/pt-machine.h (testandset): Likewise.
616 (__compare_and_swap): Likewise.
617 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
619 2000-11-20 Jakub Jelinek <jakub@redhat.com>
621 * Examples/ex3.c (main): Cast int to long before casting to void *.
622 (search): Cast void * to long, not int.
623 * Examples/ex8.c (main, thread): Similarly.
624 * Examples/ex11.c (main): Similarly.
625 * Examples/ex14.c (worker, do_test): Similarly.
626 * ecmutex.c (worker, do_test): Similarly.
627 (nlocks): Cast to int.
629 2000-11-08 Bruce Mitchener <bruce@cubik.org>
631 * linuxthreads.texi: Add documentation for pthreads attributes
632 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
633 patch. Document pthread_[sg]etconcurrency(). Mark
634 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
636 2000-11-07 Ulrich Drepper <drepper@redhat.com>
638 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
640 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
641 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
643 2000-11-06 Ulrich Drepper <drepper@redhat.com>
645 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
646 not doing it right now.
647 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
649 2000-10-30 Ulrich Drepper <drepper@redhat.com>
651 * Examples/ex4.c (main): Don't use exit() to avoid warning with
654 2000-10-29 Ulrich Drepper <drepper@redhat.com>
656 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
657 here. Reported by Bruce Mitchener <bruce@cubik.org>.
659 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
660 discussing mutexes. (As per the Unix98 name for the API.)
661 Changes documentation for pthread_mutexattr_setkind_np() and
662 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
663 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
664 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
665 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
666 Begins to introduce discussion of the ``timed'' mutex type. This
667 discussion is currently incomplete.
668 Patch by Bruce Mitchener <bruce@cubik.org>.
670 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
671 Yutaka Niibe <gniibe@chroot.org>
673 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
674 has restrictions, use register.
676 2000-10-23 Andreas Schwab <schwab@suse.de>
678 * Examples/ex14.c (TIMEOUT): Override default timeout.
680 2000-10-16 Ulrich Drepper <drepper@redhat.com>
682 * specific.c: Protect tsd array modification in thread data
683 structures by getting the thread lock in pthread_key_delete and
684 __pthread_destroy_specifics.
685 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
687 2000-10-12 Alan Modra <alan@linuxcare.com.au>
689 * sysdeps/pthread/bits/initspin.h: New file.
690 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
691 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
692 (__pthread_alt_init_lock): Likewise.
693 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
695 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
697 * oldsemaphore.c (__old_sem_init): Release lock with
698 LT_SPINLOCK_INIT, not zero.
699 * spinlock.c (__pthread_unlock): Likewise.
700 (__pthread_alt_lock): Likewise.
701 (__pthread_alt_timedlock): Likewise.
702 (__pthread_alt_unlock): Likewise.
703 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
704 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
705 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
706 LT_SPINLOCK_INIT do initialize spinlocks not 0.
708 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
710 * shlib-versions: Add version definitions for hppa-linux.
712 2000-10-12 Alan Modra <alan@linuxcare.com.au>
714 * sysdeps/hppa/pspinlock.c: New file.
715 * sysdeps/hppa/pt-machine.h: New file.
716 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
718 2000-10-05 Jakub Jelinek <jakub@redhat.com>
720 * mutex.c (__pthread_mutex_destroy): Correct test of
721 busy mutex for mutexes using alternate fastlocks.
722 Patch by dtc@cmucl.cons.org.
724 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
726 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
728 2000-09-28 Ulrich Drepper <drepper@redhat.com>
730 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
731 test for owner first.
732 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
734 * cancel.c (pthread_cancel): Don't do anything if cancelation is
737 2000-09-26 Ulrich Drepper <drepper@redhat.com>
739 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
740 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
742 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
743 _POSIX_MONOTONIC_CLOCK.
745 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
748 2000-09-20 Andreas Jaeger <aj@suse.de>
750 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
751 "testrtsig.h" conditional.
753 2000-09-11 Ulrich Drepper <drepper@redhat.com>
755 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
756 pthread_attr_setstack.
757 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
758 pthread_attr_setstack.
759 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
761 2000-09-05 Ulrich Drepper <drepper@redhat.com>
763 * Examples/ex14.c: New file.
764 * Makefile (tests): Add ex14.
766 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
767 mutex. Patch by dtc@cmucl.cons.org.
769 * ecmutex.c: New file.
770 * Makefile (tests): Add ecmutex.
772 2000-09-04 H.J. Lu <hjl@gnu.org>
774 * attr.c (__pthread_attr_setguardsize): Use page_roundup
775 instead of roundup to round up to the page size.
777 2000-09-03 Mark Kettenis <kettenis@gnu.org>
779 * manager.c (pthread_exited): Correctly report event as TD_REAP
780 instead of TD_DEATH. Fix comments.
782 2000-09-03 Ulrich Drepper <drepper@redhat.com>
784 * spinlock.h (testandset): Add cast to avoid warning.
785 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
787 2000-09-02 Andreas Jaeger <aj@suse.de>
789 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
792 2000-09-01 Ulrich Drepper <drepper@redhat.com>
794 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
795 Fix typo in last patch (_mode -> _flags).
797 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
798 Provide definition which respects _IO_USER_LOCK flag.
800 2000-08-30 Ulrich Drepper <drepper@redhat.com>
802 * manager.c (pthread_allocate_stack): Clear descriptor only if not
805 2000-08-25 Ulrich Drepper <drepper@redhat.com>
807 * Makefile: Add rules to build and run unload.
808 * unload.c: New file.
810 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
812 * sysdeps/pthread/pthread.h
813 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
814 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
816 2000-08-24 Andreas Jaeger <aj@suse.de>
818 * Examples/ex13.c: Include <string.h> for strerror prototype and
819 <stdlib.h> for abort prototype.
820 (pthr_cond_signal_mutex): Rewrite to silence GCC.
821 (thread_start): Remove unused variable err.
822 (main): Silence GCC warnings.
824 2000-08-22 Andreas Jaeger <aj@suse.de>
826 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
828 * Makefile (tests): Add ex13.
830 2000-08-20 Ulrich Drepper <drepper@redhat.com>
832 * semaphore.h: Add restrict where required by AGd4.
833 * sysdeps/pthread/pthread.h: Likewise.
834 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
836 2000-08-15 Ulrich Drepper <drepper@redhat.com>
838 * Makefile (tests): Add ex12. Add rule to build it.
839 * Examples/ex12.c: New file.
841 2000-08-13 Ulrich Drepper <drepper@redhat.com>
843 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
844 even though the implementation is not quite complete (but it reports
845 it). Define _POSIX_MESSAGE_PASSING to -1.
846 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
848 2000-08-12 Andreas Jaeger <aj@suse.de>
850 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
852 (__compare_and_swap): Likewise.
853 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
855 2000-08-10 Ulrich Drepper <drepper@redhat.com>
857 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
858 p_h_errnop correctly and not to NULL.
860 2000-08-05 Ulrich Drepper <drepper@redhat.com>
862 * Banner: Bump version number to 0.9.
864 2000-08-04 Ulrich Drepper <drepper@redhat.com>
866 * Makefile (tests): Add tststack. Add rule to build the program.
867 * tststack.c: New file.
869 * internals.h: Declare __pthread_max_stacksize.
870 * pthread.c (__pthread_max_stacksize): New variable.
871 (__pthread_initialize_manager): Determine __pthread_initialize_manager
873 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
874 (pthread_allocate_stack): Allow kernel to choose stack address if
875 FLOATING_STACKS. This also handles variable-sized stacks.
876 Always allocate stack and guardpage together. Use mprotect to
877 change guardpage access.
878 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
881 * attr.c (__pthread_attr_setstacksize): Also test value against
884 * manager.c (__pthread_nonstandard_stacks): Define only if
885 THREAD_SELF is not defined.
886 (pthread_allocate_stack): Always initialize gardaddr to a correct
888 (pthread_handle_create): Unmap thread with one call.
889 (pthread_free): Remove test for initial thread before removing stack.
890 Unmap stack with one call.
892 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
893 1 to avoid removing the stack.
895 2000-07-27 Jes Sorensen <jes@linuxcare.com>
897 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
898 load of spin lock to prime the cache before the atomic compare and
899 exchange operation (cmpxchg4). This avoids the spinning on the
900 cmpxchg4 instruction and reduces movement of the cache line back
901 and forth between the processors (explanation by Asis K. Mallick
902 from Intel). This basically makes the implementation operate the
903 same as the Linux kernel implementation.
905 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
906 * sysdeps/ia64/pspinlock.c: New file.
908 2000-08-03 Ulrich Drepper <drepper@redhat.com>
910 * pthread.c: Move definition of __pthread_set_own_extricate_if...
911 * spinlock.h: ...here. Remove locking.
912 * internals.h: Remove __pthread_set_own_extricate_if prototype.
914 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
915 (rwlock_rd_extricate_func): Don't determine self, let
916 __pthread_lock do it.
917 (rwlock_wr_extricate_func): Likewise.
918 (rwlock_have_already): Optimize *pself handling a bit.
920 * mutex.c: Use __builtin_expect.
921 * pthread.c: Likewise.
923 2000-08-02 Andreas Jaeger <aj@suse.de>
925 * sysdeps/s390/pspinlock.c: New file.
926 * sysdeps/s390/pt-machine.h: New file.
927 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
929 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
931 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
933 * sysdeps/mips/pt-machine.h (testandset): Likewise.
935 2000-07-26 Andreas Jaeger <aj@suse.de>
937 * pthread.c: Initialize p_sem_avail.
939 2000-07-25 Ulrich Drepper <drepper@redhat.com>
941 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
942 * semaphore.c: Handle spurious wakeups.
944 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
945 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
947 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
948 (__pthread_wait_for_restart): Likewise.
950 * condvar.c (pthread_cond_wait): Also check whether thread is
951 cancelable before aborting loop.
952 (pthread_cond_timedwait): Likewise.
954 * signals.c (pthread_sighandler): Remove special code to restrore
956 (pthread_sighandler_t): Likewise.
958 2000-07-25 Mark Kettenis <kettenis@gnu.org>
960 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
961 * pthread.c: Include <resolv.h>.
962 (_res): Undefine. Add extern declaration.
964 2000-07-24 Ulrich Drepper <drepper@redhat.com>
966 * pthread.c (__pthread_initial_thread): Update initializer.
967 (__pthread_manager_thread): Likewise.
968 (pthread_initialize): Move setrlimit call to...
969 (__pthread_initialize_manager): ...here.
970 (__pthread_reset_main_thread): Reset also soft limit on stack size.
972 * condvar.c: Handle spurious wakeups. [PR libc/1749].
973 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
975 2000-07-21 Ulrich Drepper <drepper@redhat.com>
977 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
978 __compare_and_swap to define testandset.
979 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
980 Define IMPLEMENT_TAS_WITH_CAS.
982 2000-07-20 Ulrich Drepper <drepper@redhat.com>
984 * Makefile: Pass -z nodelete to linker for libpthread.so
985 generation if it understand this option.
987 2000-07-18 Mark Kettenis <kettenis@gnu.org>
989 * manager.c (pthread_handle_create): Remove initialization of
990 new_thread->p_res._sock.
992 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
994 Bugfixes to the variant of the code for machines with no compare
997 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
998 node was not being properly enqueued, due to failing to update
999 the lock->__status field.
1001 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1002 being set inappropriately, causing the suspend function to be called
1003 with a null self pointer and crash.
1005 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1007 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1008 compare&swap is available.
1010 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1013 * pthread.c (pthread_initialize): Don't use sysconf to determine
1014 whether the machine has more than one processor.
1016 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1017 removed thread_self calls.
1019 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1021 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1022 __compare_and_swap to compare_and_swap in code which assumes
1023 compare swap is available.
1025 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1027 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1028 bug whereby thr field of waitnode structure would not be correctly
1029 set unless a null self pointer is passed to the functions.
1030 Eliminated redundant calls to thread_self().
1032 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1034 * pthread.c (__pthread_initialize_manager): Lock
1035 __pthread_manager_thread.p_lock before calling clone.
1037 2000-05-05 H.J. Lu <hjl@gnu.org>
1039 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1040 have acquire semantics.
1041 (__compare_and_swap_with_release_semantics): New inline
1043 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1045 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1047 * manager.c: Fix the problem with signals at startup.
1048 Change the way that thread stacks are allocated on IA64.
1049 Clean up some of the guard page allocation stuff.
1051 1999-12-19 H.J. Lu <hjl@gnu.org>
1053 * internals.h (page_roundup): New.
1054 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1056 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1057 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1060 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1062 * manager.c (pthread_allocate_stack): Unmap the stack top
1063 if failed to map the stack bottom.
1065 (pthread_free): Fix the guard page.
1067 * pthread.c (pthread_initialize): Set rlimit correctly for
1068 NEED_SEPARATE_REGISTER_STACK.
1070 1999-12-16 H.J. Lu <hjl@gnu.org>
1072 * pthread.c (__pthread_initialize_manager): Pass
1073 __pthread_manager_thread_bos instead of
1074 __pthread_manager_thread_tos to __clone2.
1076 1999-12-16 H.J. Lu <hjl@gnu.org>
1078 * manager.c (pthread_allocate_stack): Correct the calculation
1079 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1082 1999-12-13 H.J. Lu <hjl@gnu.org>
1084 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1085 bit after setting ar.ccv.
1087 1999-12-12 H.J. Lu <hjl@gnu.org>
1089 * manager.c (pthread_allocate_stack): Make the starting
1090 address of the stack bottom page aligned. FIXME: it may
1091 need changes in other places.
1092 (pthread_handle_create): Likewise.
1094 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1096 * manager.c (pthread_allocate_stack): Handle
1097 NEED_SEPARATE_REGISTER_STACK.
1098 (pthread_handle_create): Likewise.
1099 * pthread.c (__pthread_initialize_manager): Likewise.
1101 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1103 1999-12-02 H.J. Lu <hjl@gnu.org>
1105 * sysdeps/ia64/pt-machine.h: New.
1107 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1109 * wrapsyscall.c: Mark non-__ protected names as weak.
1112 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1114 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1116 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1118 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1119 Add tests also to new alternative spinlock implementation.
1120 * spinlock.h: Likewise.
1121 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1123 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1125 * Version: Export __sigaction.
1126 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1128 * pthread.c: Use __libc_sigaction instead of __sigaction.
1130 * condvar.c: Implement pthread_condattr_getpshared and
1131 pthread_condattr_setpshared.
1132 * mutex.c: Implement pthread_mutexattr_getpshared and
1133 pthread_mutexattr_setpshared.
1134 * Versions: Export new functions.
1135 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1137 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1138 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1141 2000-07-04 Greg McGary <greg@mcgary.org>
1143 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1144 pragmas. Include bp-sym.h only if _LIBC.
1146 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1148 * spinlock.c (__pthread_unlock): Properly place write barrier.
1149 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1151 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1153 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1154 faster on SMP systems. No more emulation of compare&swap for adaptive
1156 * spinlock.h: Likewise.
1157 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1158 Replace fast with adaptive mutex.
1159 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1160 * condvar.c: Likewise.
1161 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1162 * internals.h: Declare __pthread_smp_kernel.
1163 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1164 _pthread_fastlock structure.
1165 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1167 * pthread.c: Remove initialization to zero from global variables.
1169 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1171 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1173 2000-06-28 Greg McGary <greg@mcgary.org>
1175 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1176 pthread functions that have pointers in their return+arg signatures.
1178 2000-06-27 Greg McGary <greg@mcgary.org>
1180 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1181 extern declarations of pthread functions that have pointers in
1182 their return+arg signatures.
1184 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1186 * Makefile (tests): Add ex11. Add rules to build it.
1187 * Examples/ex11.c: New file.
1188 * rwlock.c: Fix complete braindamaged previous try to implement
1191 * spinlock.c: Pretty print.
1193 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1195 * Makefile (tests): Add ex10. Add rules to build it.
1196 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1197 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1198 * condvar.c (pthread_cond_wait): Allow mutex of kind
1199 PTHREAD_MUTEX_TIMED_NP.
1200 (pthread_cond_timedwait_relative): Likewise.
1201 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1202 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1203 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1204 (__pthread_mutex_lock): Use __pthread_alt_lock for
1205 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1206 (__pthread_mutex_timedlock): New function.
1207 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1208 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1209 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1210 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1211 * spinlock.c: Implement alternate fastlocks.
1212 * spinlock.h: Add prototypes.
1213 * Examples/ex10.c: New file.
1214 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1215 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1217 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1218 (__pthread_rwlock_timedrdlock): New function.
1219 (__pthread_rwlock_timedwrlock): New function.
1220 Use laternate fastlock function everywhere.
1222 2000-06-21 Andreas Jaeger <aj@suse.de>
1224 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1227 * join.c: Include <stdlib.h> for exit prototype.
1229 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1231 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1233 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1234 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1236 * Makefile (libpthread-routines): Add barrier.
1237 (tests): Add ex9. Add rule to build ex9.
1238 * Versions: Export barrier functions.
1239 * barrier.c: New file.
1240 * Examples/ex9.c: New file.
1241 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1242 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1243 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1245 2000-06-19 H.J. Lu <hjl@gnu.org>
1247 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1248 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1249 (compare_and_swap_with_release_semantics): New. Default to
1250 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1253 * spinlock.c (__pthread_unlock): Call
1254 compare_and_swap_with_release_semantics () instead of
1255 compare_and_swap ().
1257 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1259 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1261 * sysdeps/pthread/timer_delete.c: Likewise.
1262 * sysdeps/pthread/timer_getoverr.c: Likewise.
1263 * sysdeps/pthread/timer_gettime.c: Likewise.
1264 * sysdeps/pthread/timer_settime.c: Likewise.
1266 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1268 Timer nodes are now reference counted, and can be marked
1269 as deleted. This allows for the safe release of the global mutex
1270 in the middle without losing the timer being operated on.
1272 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1273 member is now an enum with three values, so that an intermediate
1274 state can be represented (deleted but not free for reuse yet).
1275 New refcount member added.
1276 * sysdeps/pthread/timer_routines.c: Likewise.
1278 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1279 timer_valid): New inline functions added.
1281 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1282 restructured, recursive deadlock bug fixed.
1284 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1285 timer_addref to ensure that timer won't be deleted while mutex is not
1286 held. Also uses timer_invalid to perform validation of timer handle.
1287 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1288 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1290 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1292 * shlib-versions: Add entry for SH.
1293 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1295 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1297 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1298 tightened up some critical regions and micro-optimized some list
1301 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1302 Returns int value now to indicate whether timer was queued at head.
1303 * sysdeps/pthread/posix-timer.h: Likewise.
1304 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1305 new return value from __timer_thread_queue_timer to avoid waking
1306 up timer thread unnecessarily.
1308 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1309 inuse flag, because this requires mutex to be held. Callers updated
1310 to do the check when they have the mutex.
1311 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1313 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1314 regions: avoids making system calls while holding timer mutex, and
1315 a few computations were moved outside of the mutex as well.
1316 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1318 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1319 to list_unlink_ip, meaning idempotent. Pointer manipulation
1320 changed to get better better code out of gcc.
1321 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1322 version of list_unlink added here.
1323 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1324 function in all places: idempotent one for timers, non-idempotent
1325 one for thread nodes.
1326 * sysdeps/pthread/timer_settime: Likewise.
1327 * sysdeps/pthread/timer_routines.c: Likewise.
1329 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1331 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1332 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1334 * sysdeps/pthread/Makefile: Remove tests definition.
1336 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1337 Yutaka Niibe <gniibe@chroot.org>
1339 * sysdeps/sh/pspinlock.c: New file.
1340 * sysdeps/sh/pt-machine.h: New file.
1342 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1344 * Makefile (tests): Add joinrace.
1346 * Examples/ex6.c: Test return value of pthread_join.
1348 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1350 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1351 (__pthread_spin_trylock): Implement.
1352 (__pthread_spin_unlock): Implement.
1353 (__pthread_spin_init): Implement.
1354 (__pthread_spin_destroy): Implement.
1356 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1358 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1359 really append the entry.
1361 2000-06-10 Andreas Jaeger <aj@suse.de>
1363 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1365 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1367 * sysdeps/pthread/timer_create.c: Thread matching now done on
1368 clock type as well as thread attributes.
1369 There are individual global signal-delivering threads for
1370 different clock types.
1371 * sysdeps/pthread/posix-timer.h: Likewise.
1372 * sysdeps/pthread/timer_routines.c: Likewise.
1374 * sysdeps/pthread/timer_routines.c: Thread allocation and
1375 deallocation function now remembers to put thread on active
1376 list and remove from active list.
1377 Thus now the feature of binding multiple timers
1378 to a single thread actually works.
1380 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1382 * pthread.c (__pthread_create_2_1): Optimize a bit.
1384 * internals.h (invalid_handle): Also test for p_terminated != 0.
1385 (nonexisting_handle): New function. Same as old invalid_handle.
1386 * join.c (pthread_join): Use nonexisting_handle instead of
1387 invalid_handle to test for acceptable thread handle.
1388 * manager.c (pthread_handle_free): Likewise.
1389 * joinrace.c: New file.
1390 Reported by Permaine Cheung <pcheung@cygnus.com>.
1392 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1394 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1395 Correct handling of matching variable.
1397 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1400 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1401 Be prepared for empty timer list.
1403 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1404 CPUTIME clock ID. Add support for thread clocks.
1406 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1407 subtraction were switched.
1409 * sysdeps/pthread/timer_routines.c (init_module): Use
1410 THREAD_MAXNODES threads.
1412 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1413 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1414 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1415 with sigqueueinfo is this system call is available.
1417 * sysdeps/pthread/timer_create.c (timer_create): Allow
1418 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1420 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1422 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1424 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1426 * sysdeps/pthread/posix-timer.h: New file.
1427 * sysdeps/pthread/timer_create.c: New file.
1428 * sysdeps/pthread/timer_delete.c: New file.
1429 * sysdeps/pthread/timer_getoverr.c: New file.
1430 * sysdeps/pthread/timer_gettime.c: New file.
1431 * sysdeps/pthread/timer_routines.c: New file.
1432 * sysdeps/pthread/timer_settime.c: New file.
1433 * sysdeps/pthread/tst-timer.c: New file.
1435 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1437 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1438 LINK_MAX definitions if necessary.
1440 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1442 Added missing fork time handling of global libio lock.
1444 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1445 not just the individual stream locks. Rewritten to use new
1446 iterator interface provided by libio rather than accessing
1449 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1450 which lock and unlock the stream list using the new interface
1452 * internals.h: Likewise.
1454 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1455 and __funlockfilelist in the parent after the fork.
1456 Child still calls __fresetlockfiles as before.
1458 * linuxthreads.texi: Now explains what happens to streams at
1459 fork time. Also whole new section on forking and thread added.
1460 Definition of pthread_atfork moved out of Miscellaneous Functions
1461 to this new section.
1463 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1465 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1466 Add missing register.
1467 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1469 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1471 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1472 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1473 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1475 2000-05-31 Andreas Jaeger <aj@suse.de>
1477 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1479 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1481 * spinlock.c (__pthread_lock): Remove ASSERT.
1483 * Makefile (tests): Add ex8.
1484 * Examples/ex8.c: New file.
1486 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1488 Bugfix: The pthread_atfork mechanism now takes care of its
1489 own internal mutex at fork time.
1491 * ptfork.c (__fork): Revised so that the mutex is held across
1492 the fork operation and while the handlers are called, and so that
1493 the child resets the mutex.
1495 * linuxthreads.texi: Updated pthread_atfork documentation to make
1496 it clear that fork and pthread_atfork can't be reentered from
1497 atfork handlers, that pthread_atfork and fork are mutually atomic,
1498 and that the handlers are inherited by the child process.
1500 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1502 * Makefile (libpthread-routines): Add pspinlock.
1503 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1504 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1505 * condvar.c: Likewise.
1506 * internals.h: Likewise.
1508 * manager.c: Likewise.
1509 * mutex.c: Likewise.
1510 * pthread.c: Likewise.
1511 * rwlock.c: Likewise.
1512 * semaphore.c: Likewise.
1513 * signals.c: Likewise.
1514 * spinlock.h: Likewise.
1515 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1516 * sysdeps/alpha/pspinlock.c: New file.
1517 * sysdeps/arm/pspinlock.c: New file.
1518 * sysdeps/i386/pspinlock.c: New file.
1519 * sysdeps/m68k/pspinlock.c: New file.
1520 * sysdeps/mips/pspinlock.c: New file.
1521 * sysdeps/powerpc/pspinlock.c: New file.
1522 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1523 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1524 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1525 back to _pthread_fastlock. Define new pthread_spinlock_t.
1527 2000-05-24 Andreas Jaeger <aj@suse.de>
1529 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1531 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1533 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1535 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1537 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1539 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1541 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1542 object state is represented with additional bits which distinguish
1543 whether that state was set up in the current process, or
1544 in an ancestor process. If that state was set in an ancestor,
1545 it means that a fork happened while thread was executing the init
1546 function. In that case, the state is reset to NEVER.
1547 * mutex.c (__pthread_once_fork_prepare): New function.
1548 (__pthread_once_fork_child): Likewise
1549 (__pthread_once_fork_parent): Likewise
1550 (__pthread_reset_pthread_once): Removed.
1551 * ptfork.c (__fork): Call new handlers in mutex.c.
1552 * internals.h: Declarations of new mutex.c functions added.
1553 Declaration of removed function deleted.
1554 * linuxthreads.texi: Updated documentation about pthread_once
1555 to clarify what happens under cancellation and forking.
1557 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1559 * internals.h: New thread manager request type, REQ_KICK.
1560 * join.c (pthread_exit): main thread now calls exit() instead
1561 of _exit() in order to proper process cleanup.
1562 * manager.c (__pthread_manager): Do not terminate manager
1563 after unblocking main thread; wait for main thread's
1564 REQ_PROCESS_EXIT request instead.
1565 Also, added REQ_KICK case to handle new request; this just does
1567 * manager.c (pthread_exited): Do not terminate manager after
1568 unblocking main thread.
1569 * manager.c (__pthread_manager_sighandler): If the main thread
1570 is waiting for all other threads to die, send a REQ_KICK into
1571 the thread manager request pipe to get it to clean out the threads
1572 and unblock the main thread as soon as possible. This fixes
1573 the 2000 millisecond hang on shutdown bug.
1574 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1575 including the main one call pthread_exit(), or implicitly do so.
1576 * Makefile (tests): Add ex7.
1578 2000-05-05 Andreas Jaeger <aj@suse.de>
1580 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1581 (pthread_getcpuclockid): Correct test for ourselves.
1583 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1585 * internals.h (struct _pthread_descr_struct): Reorganization.
1586 Allocate room for 16 pointers at head of the structure for future
1587 thread-local data handling. Move p_self member in this area.
1588 * manager.c (pthread_handle_create): Adjust use of p_self.
1589 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1590 * pthread.c (__pthread_initial_thread): Adjust initialization.
1591 (__pthread_manager_thread): Likewise.
1593 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1595 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1596 for eventmask larger than 1 word.
1598 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1600 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1601 * pthread.c (__pthread_initialize_minimal): New function. Perform
1602 minimal initialization.
1603 (pthread_initialize): Remove this code here.
1604 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1605 are working around the problem in glibc.
1607 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1609 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1610 now. First gcc must be fixed (more concrete: libgcc).
1612 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1614 * pthread.c: Remove special treatement for interrupt handlers on x86.
1615 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1616 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1618 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1620 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1622 * join.c (pthread_exit): Set p_terminated after reporting the
1623 termination event instead of before.
1625 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1627 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1630 2000-04-18 Andreas Jaeger <aj@suse.de>
1632 * Versions: Use ld instead of ld.so.
1634 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1636 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1637 Remove the typedef keyword.
1639 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1641 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1643 (READ_MEMORY_BARRIER): Define.
1644 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1646 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1649 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1651 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1652 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1653 use thread_handle().
1655 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1657 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1658 if fast mutex is used. Don't initialize `already_canceled' twice.
1659 Correctly test for return value of timedsuspend.
1661 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1662 therefore don't need the _rt versions of the signal handlers.
1664 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1666 * pthread.c (pthread_yield): New function.
1667 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1668 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1669 * internals.h: Declare __pthread_yield.
1671 * pthread.c (pthread_initialize): Avoid a bit more code if
1672 realtime signals are known to exist.
1674 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1675 to dynamically detect RT signals and avoid generating compatibility
1676 functions with old kernel.
1677 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1678 __pthread_restart_new directly.
1679 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1680 __pthread_wait_for_restart_signal directly.
1681 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1682 __pthread_timedsuspend_new directly.
1684 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1686 * condvar.c: Remove all the special code to handle cond_timedwait.
1687 Use timedsuspend instead.
1688 * internals.h: Declare __pthread_timedsuspend_old,
1689 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1690 Remove declaration of __pthread_init_condvar.
1691 * pthread.c: Define __pthread_timedsuspend variable.
1692 (__pthread_timedsuspend_old): New function. Timed suspension
1693 implementation for old Linux kernels.
1694 (__pthread_timedsuspend_new): New function. Timed suspension
1695 implementation for new Linux kernels.
1696 * restart.h (timedsuspend): New function. Call appropriate
1697 suspension function through __pthread_timedsuspend.
1698 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1700 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1702 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1704 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1706 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1707 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1709 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1710 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1712 2000-04-14 Andreas Jaeger <aj@suse.de>
1714 * weaks.c: Fix typo.
1716 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1717 2.2 for linuxthreads.
1719 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1721 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1722 (pthread_getcpuclockid): Fix typo.
1724 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1726 * Makefile (libpthread-routines): Add getcpuclockid.
1727 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1728 * sysdeps/pthread/getcpuclockid.c: New file.
1729 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1730 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1732 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1734 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1736 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1737 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1738 and pthread_spin_unlock.
1739 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1740 into pthread_spinlock_t. Change all uses.
1741 * spinlock.c: Implement pthread_spin_lock.
1742 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1743 alias for real name.
1744 Define pthread_spin_trylock, pthread_spin_init, and
1745 pthread_spin_destroy.
1746 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1747 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1748 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1749 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1750 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1751 and pthread_spin_unlock.
1752 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1753 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1754 * condvar.c: Likewise.
1755 * internals.h: Likewise.
1757 * manager.c: Likewise.
1758 * mutex.c: Likewise.
1759 * pthread.c: Likewise.
1760 * rwlock.c: Likewise.
1761 * semaphore.c: Likewise.
1762 * signals.c: Likewise.
1764 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1766 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1768 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1770 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1771 _POSIX_SHARED_MEMORY_OBJECTS.
1773 2000-04-11 Andreas Jaeger <aj@suse.de>
1775 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1776 (__compare_and_swap): Mark as modifying memory.
1778 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1780 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1782 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1783 Don't have the 'asm' __volatile__.
1785 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1787 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1788 * spinlock.c (__pthread_lock): Add memory barriers.
1789 (__pthread_unlock): Likewise.
1790 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1792 (RELEASE): Not needed anymore.
1793 (__compare_and_swap): Mark asm as modifying memory.
1794 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1796 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1797 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1798 (MEMORY_BARRIER): Define using stbar.
1799 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1801 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1802 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1803 Mike Burrows <m3b@pa.dec.com>.
1805 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1807 * signals.c (sigaction): Fix return value for the case SIG is one
1808 of the signals the implementation uses.
1809 Patch by Xavier.Leroy@inria.fr.
1811 2000-04-01 Andreas Jaeger <aj@suse.de>
1813 * attr.c: Use shlib-compat macros.
1814 * oldsemaphore.c: Likewise.
1815 * pthread.c: Likewise.
1816 * weaks.c: Likewise.
1818 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1820 * semaphore.c (sem_timedwait): New function.
1821 Patch by Carl Mailloux <carlm@oricom.ca>.
1822 * semaphore.h: Declare sem_timedwait.
1823 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1825 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1827 * sysdeps/pthread/Makefile: File removed.
1829 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1831 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1832 * internals.h (__pthread_reset_pthread_once): Add prototype.
1833 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1835 * manager.c (pthread_handle_create): Store ID of new thread before
1838 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1840 * attr.c: Use new macros from shlib-compat.h to define versions.
1841 * oldsemaphore.c: Likewise.
1842 * semaphore.c: Likewise.
1843 * weaks.c: Likewise.
1845 * pthread.c: Update for new SHLIB_COMPAT definition.
1847 * manager.c (__pthread_manager): Unmask debug signal.
1849 * pthread.c (pthread_initialize): Test for address of __dso_handle
1850 being NULL, not value. Use __on_exit, not on_exit.
1851 Patch by Andreas Jaeger <aj@suse.de>.
1853 * pthread.c: Use new macros from shlib-compat.h to define versions.
1855 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1857 * pthread.c (pthread_initialize): Instead of on_exit use
1858 __cxa_atexit if __dso_label is available to allow unloading the
1859 libpthread shared library.
1861 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1863 * condvar.c: Make tests for ownership of mutex less strict.
1865 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1867 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1868 current thread and return error if not.
1869 (pthread_cond_timedwait_relative_old): Likewise.
1870 (pthread_cond_timedwait_relative_new): Likewise.
1872 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1873 (pthread_once_cancelhandler): New function.
1874 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1876 2000-03-14 Andreas Jaeger <aj@suse.de>
1878 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1880 (pthread_handle_sigrestart_rt): Likewise.
1881 * signals.c (pthread_sighandler_rt): Likewise.
1883 2000-03-02 Andreas Jaeger <aj@suse.de>
1885 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1886 Reported by Sean Chen <sean.chen@turbolinux.com>.
1888 2000-02-28 Andreas Jaeger <aj@suse.de>
1890 * rwlock.c: Fix typo.
1892 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1894 * rwlock.c: Define __* variants of the functions and make old names
1896 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1897 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1899 2000-02-25 Andreas Jaeger <aj@suse.de>
1901 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1902 pwrite64, lseek64, open64, and __open64 with version 2.2.
1904 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1906 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1908 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1910 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1911 nanosleep does not work either. Get absolute time inside the
1913 (pthread_cond_timedwait_relative_new): Likewise.
1914 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1916 2000-02-13 Andreas Jaeger <aj@suse.de>
1918 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1919 (pthread_cond_timedwait_relative_old): Likewise.
1921 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1923 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1924 but keep the code around. A bug in the kernel prevent us from
1926 (pthread_cond_timedwait_relative_new): Likewise.
1927 (PR libc/1597 and libc/1598).
1929 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1931 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1932 loop around nanosleep calls instead of around most of the function
1933 (pthread_cond_timedwait_relative_new): Likewise.
1934 body. Got rid of backwards goto and one local.
1936 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1938 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1939 before every nanosleep call to account for time spent in the rest
1941 (pthread_cond_timedwait_relative_new): Likewise.
1942 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1944 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1946 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1947 from nanosleep call so that in case we restart we only wait for the
1949 (pthread_cond_timedwait_relative_new): Likewise.
1950 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1952 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1954 * manager.c (pthread_allocate_stack): Compute guard page address
1955 correctly. Patch by HJ Lu.
1957 * sysdeps/pthread/pthread.h: Define
1958 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1960 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1962 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1963 preference handling.
1964 (pthread_rwlockattr_setkind_np): Allow
1965 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1966 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1968 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1970 * internals.h (pthread_readlock_info): New structure.
1971 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1972 p_untracked_readlock_count.
1973 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1974 Add initializers for new fields.
1975 * manager.c (pthread_free): Free read/write lock lists.
1976 * queue.h (queue_is_empty): New function.
1977 * rwlock.c: Implement requirements about when readers should get
1979 * sysdeps/pthread/pthread.h
1980 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1981 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1982 Define this name as well.
1983 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1985 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1987 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1988 Adjust initializers for struct _pthread_descr_struct change.
1989 * internals.h (struct _pthread_descr_struct): Move new elements to
1992 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1994 Redesigned how cancellation unblocks a thread from internal
1995 cancellation points (sem_wait, pthread_join,
1996 pthread_cond_{wait,timedwait}).
1997 Cancellation won't eat a signal in any of these functions
1998 (*required* by POSIX and Single Unix Spec!).
1999 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2000 simultaneous condition variable signal (not required by POSIX
2001 or Single Unix Spec, but nice).
2002 * spinlock.c: __pthread_lock queues back any received restarts
2003 that don't belong to it instead of assuming ownership of lock
2004 upon any restart; fastlock can no longer be acquired by two threads
2006 * restart.h: Restarts queue even on kernels that don't have
2007 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2008 avoiding a rare race condition in pthread_cond_timedwait.
2010 1999-12-31 Andreas Jaeger <aj@suse.de>
2012 * internals.h: Remove duplicate prototype declarations.
2014 * weaks.c: Remove __THROW from prototypes since the file is not
2015 compiled by a C++ compiler.
2016 * internals.h: Likewise.
2018 1999-12-30 Andreas Jaeger <aj@suse.de>
2020 * sysdeps/pthread/pthread.h: Move internal functions to...
2021 * sysdeps/pthread/bits/libc-lock.h: ...here.
2023 1999-12-29 Andreas Jaeger <aj@suse.de>
2025 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2027 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2029 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2032 * manager.c (__pthread_start): Add one more cast to prevent
2033 warning on 64bit machines.
2035 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2037 * manager.c (pthread_handle_create): Set p_pid of new thread
2038 before calling the callback function to report a new thread.
2040 1999-12-20 Andreas Jaeger <aj@suse.de>
2042 * pthread.c (pthread_initialize): Move getrlimit call after
2045 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2047 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2048 pwrite64, lseek64, open64, and __open64.
2049 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2050 pwrite64, lseek64, open64, and __open64.
2052 * manager.c (pthread_allocate_stack): Correct computation of
2053 new_thread_bottom. Correct handling of stack size and when the
2054 rlimit method to guard for stack growth is used.
2055 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2056 minus one pagesize (not two).
2058 1999-12-03 Andreas Jaeger <aj@suse.de>
2060 * Versions: Add __res_state with version GLIBC_2.2.
2062 * errno.c (__res_state): New function to return thread specific
2065 * pthread.c (pthread_initialize): Initialize p_resp.
2066 (__pthread_reset_main_thread): Also set p_resp.
2068 * manager.c (pthread_handle_create): Initialize p_resp.
2070 * internals.h: Add thread specific resolver state.
2071 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2073 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2075 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2077 * sysdeps/i386/i686/pt-machine.h: Likewise.
2078 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2080 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2082 * manager.c (pthread_start_thread_event): Initialize p_pid already
2085 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2087 * internals.h: Add prototype for __pthread_manager_event.
2088 * manager.c (__pthread_manager_event): New function.
2089 (pthread_start_thread_event): Correct computation of self.
2090 Use INIT_THREAD_SELF.
2091 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2092 (__pthread_initialize_manager): Respect event flags also for creation
2093 of the manager thread.
2095 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2097 * pthread.c (__pthread_initialize_manager): Initialize
2098 __pthread_manager_thread.p_tid.
2100 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2102 * internals.h: Declare __pthread_last_event.
2103 * manager.c: Define __pthread_last_event.
2104 (pthread_handle_create): Set __pthread_last_event.
2105 (pthread_exited): Likewise.
2106 * join.c (pthread_exit): Likewise.
2108 * Makefile (libpthread-routines): Add events.
2109 * events.c: New file.
2110 * internals.h: Protect against multiple inclusion.
2111 Include thread_dbP.h header.
2112 (struct _pthread_descr_struct): Add new fields p_report_events and
2114 Declare event reporting functions.
2115 * join.c (pthread_exit): Signal event if this is wanted.
2116 * manager.c (__pthread_threads_events): New variable.
2117 (pthread_handle_create): Take new parameters with event information.
2118 Signal TD_CREATE event if wanted.
2119 (__pthread_manager): Adjust pthread_handle_create call.
2120 (pthread_start_thread_event): New function. Block until manager is
2121 finished and then call pthread_start_thread.
2122 (pthread_exited): Signal TD_REAP event if wanted.
2124 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2126 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2128 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2130 1999-10-25 Andreas Jaeger <aj@suse.de>
2132 * internals.h: Remove K&R compatibility.
2133 * no-tsd.c: Likewise.
2134 * semaphore.h: Likewise.
2135 * signals.c: Likewise.
2136 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2137 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2138 * weaks.c: Likewise.
2140 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2142 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2143 pthread_handle_sigcancel with functions that restore %gs from the
2144 signal context. For each signal handling function, two wrappers
2145 are required, one for a non-RT signal and one for a RT signal.
2146 * signal.c: For i386, add code to restore %gs from the signal
2147 context in pthread_sighandler and pthread_sighandler_rt.
2149 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2151 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2153 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2155 * pthread.c (__pthread_initial_thread): Pass argument to
2156 PTHREAD_START_ARGS_INITIALIZER.
2157 (__pthread_manager_thread): Likewise.
2159 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2160 initialize function.
2162 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2164 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2166 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2168 * internals.h: Correct return types for __libc_read and __libc_write.
2170 1999-10-09 Andreas Jaeger <aj@suse.de>
2172 * internals.h: Add __new_sem_post to get prototype in
2173 manager.c; include semaphore.h for needed types.
2175 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2177 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2178 directly instead of calling sem_post which should not be necessary
2179 but is faster and might help in some case to work around problems.
2180 Patch by khendricks@ivey.uwo.ca [libc/1382].
2182 1999-10-08 Andreas Schwab <schwab@suse.de>
2184 * sysdeps/pthread/Subdirs: New file.
2187 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2189 * Implies: New file.
2190 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2191 * manager.c (pthread_handle_create): Initialize p_startfct.
2192 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2194 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2196 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2197 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2198 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2200 * condvar.c (pthread_cond_timedwait_relative): Never return with
2201 EINTR. Patch by Andreas Schwab.
2203 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2205 * signals.c (sigaction): Correct last patch. Don't select
2206 pthread_sighandler_rt based on the signal number but instead of
2207 the SA_SIGINFO flag.
2209 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2211 * specific.c: Move definitions of struct pthread_key_struct and
2212 destr_function to ...
2213 * internals.h: ...here.
2215 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2217 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2218 this instead of pthread_handle_sigrestart if the signal is an RT
2221 * signals.c: Handle passing through of sighandler arguments also
2222 for real-time signals.
2224 1999-09-03 Andreas Schwab <schwab@suse.de>
2226 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2228 (__vfork): New function, alias vfork.
2229 * Versions: Export __fork, vfork, and __vfork in libpthread.
2231 1999-08-23 Andreas Schwab <schwab@suse.de>
2233 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2234 call to signal handler.
2236 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2238 * pthread.c (__pthread_reset_main_thread): Undo last change.
2239 (__pthread_kill_other_threads_np): Reset signal handlers for the
2240 signals we used in the thread implementation here.
2242 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2244 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2245 for the signals we used in the thread implementation [PR libc/1234].
2247 * Versions: Export __pthread_kill_other_threads_np from libpthread
2250 * signals.c: Pass sigcontext through wrapper to the user function.
2252 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2254 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2255 __libc_internal_tsd_set.
2257 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2259 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2262 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2264 * internals.h: Align _pthread_descr_struct to 32 bytes.
2265 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2268 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2270 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2273 1999-07-09 Cristian Gafton <gafton@redhat.com>
2275 * Makefile (libpthread-routines): Add oldsemaphore routine.
2276 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2277 sem_trywait, and sem_wait to GLIBC_2.1.
2278 * oldsemaphore.c: New file.
2279 * semaphore.c: Add default_symbol_versions for the changed functions.
2280 (__new_sem_init): Rename from sem_init.
2281 (__new_sem_post): Rename from sem_post.
2282 (__new_sem_wait): Rename from sem_wait.
2283 (__new_sem_trywait): Rename from sem_trywait.
2284 (__new_sem_getvalue): Rename from sem_getvalue.
2285 (__new_sem_destroy): Rename from sem_destroy.
2287 1999-06-23 Robey Pointer <robey@netscape.com>
2289 * internals.h: Added p_nextlock entry to separate queueing for a
2290 lock from queueing for a CV (sometimes a thread queues on a lock
2291 to serialize removing itself from a CV queue).
2292 * pthread.c: Added p_nextlock to initializers.
2293 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2295 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2297 * manager.c (pthread_handle_create): Free mmap region after stack
2298 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2300 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2302 * man/pthread_cond_init.man: Correct example.
2303 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2305 * linuxthreads.texi (Condition Variables): Likewise.
2307 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2309 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2310 casx not cas, also successful casx returns the old value in rd
2311 and not the new value.
2313 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2315 * manager.c: If pthread_create() is given a NULL attribute
2316 and the thread manager runs with a realtime policy, set the
2317 scheduling policy of the newly created thread back to SCHED_OTHER.
2318 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2319 initialize the schedpolicy field of new_thread->p_start_args
2320 to that of the calling thread.
2322 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2324 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2325 instruction does not allow memory element to use offset.
2327 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2329 * manager.c (pthread_allocate_stack): Optimize initialization of new
2332 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2333 Don't use initializer since it is all zeroes.
2334 (__libc_once_define): Likewise.
2336 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2338 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2339 doesn't exist anymore.
2340 * sysdeps/i386/Implies: Likewise.
2341 * sysdeps/m68k/Implies: Likewise.
2342 * sysdeps/mips/Implies: Likewise.
2343 * sysdeps/powerpc/Implies: Likewise.
2344 * sysdeps/sparc/sparc32/Implies: Likewise.
2345 * sysdeps/sparc/sparc64/Implies: Likewise.
2347 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2349 * sysdeps/alpha/bits/semaphore.h: Removed.
2350 * sysdeps/powerpc/bits/semaphore.h: Removed.
2351 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2352 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2353 * Makefile (headers): Remove bits/semaphore.h.
2355 * semaphore.h: Define _pthread_descr if necessary.
2356 Don't include limits.h. Define SEM_VALUE_MAX directly.
2358 (sem_t): Protect element names with leading __.
2359 Add declarations for sem_close, sem_open, and sem_unlink.
2360 * semaphore.c: Adjust all functions for new element names.
2361 Define sem_close, sem_open, and sem_unlink.
2362 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2364 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2367 1999-03-16 H.J. Lu <hjl@gnu.org>
2369 * specific.c (pthread_key_delete): Check th->p_terminated to see
2370 if the thread is running.
2372 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2373 Added to GLIBC_2.0 for libc.so.
2375 1999-02-12 H.J. Lu <hjl@gnu.org>
2377 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2378 __libc_allocate_rtsig): Added to GLIBC_2.1.
2380 * internals.h (DEFAULT_SIG_RESTART): Removed.
2381 (DEFAULT_SIG_CANCEL): Removed.
2383 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2384 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2385 (__pthread_sig_restart, __pthread_sig_cancel,
2386 __pthread_sig_debug): Initialized.
2387 (pthread_initialize): Call init_rtsigs () to initialize
2390 1999-02-03 H.J. Lu <hjl@gnu.org>
2392 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2393 Don't restart the thread which sent REQ_DEBUG.
2394 (pthread_start_thread): Check if __pthread_sig_debug > 0
2397 * pthread.c (__pthread_initialize_manager): Suspend ourself
2398 after sending __pthread_sig_debug to gdb instead of
2399 __pthread_sig_cancel.
2401 1999-01-24 H.J. Lu <hjl@gnu.org>
2403 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2404 from mask if __pthread_sig_debug > 0.
2405 (pthread_handle_create): Increment __pthread_handles_num.
2407 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2408 * pthread.c (__pthread_initialize_manager): Likewise.
2410 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2411 instead of __libc_allocate_rtsig (2).
2412 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2413 instead of __pthread_sig_cancel.
2414 (pthread_handle_sigdebug): Fix comments.
2416 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2418 * manager.c (pthread_allocate_stack): Set
2419 __pthread_nonstandard_stacks if user-specified stack is used.
2421 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2423 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2424 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2426 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2428 * pthread.c: Use a third signal __pthread_sig_debug distinct
2429 from __pthread_sig_cancel to notify gdb when a thread is
2431 * manager.c: Likewise.
2432 * internals.h: Likewise.
2433 * signals.c: The implementation of sigwait(s) assumed that
2434 all signals in s have signal handlers already attached.
2435 This is not required by the standard, so make it work
2436 also if some of the signals have no handlers.
2438 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2440 * linuxthreads.texi: Remove pointers from first @node. Move old
2441 @node spec inside comment.
2443 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2445 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2448 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2450 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2451 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2453 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2455 * manager.c: Threads now send __pthread_sig_cancel on termination.
2456 Change clone call and signal masks.
2457 * thread.c (pthread_handle_sigrestart): Remove special code for
2459 (pthread_handle_sigcancel): In manager thread call
2460 __pthread_manager_sighandler.
2461 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2462 * sysdeps/i386/i686/pt-machine.h: Likewise.
2463 Patches by Xavier Leroy.
2465 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2467 * spinlock.c (__pthread_unlock): Don't crash if called for an
2468 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2470 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2473 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2475 * Examples/ex3.c: Wait until all threads are started before
2476 searching for the number to avoid race condition on very fast
2479 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2481 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2482 declaration since it's not needed.
2484 * sysdeps/pthread/pthread.h: Move internal functions to ...
2485 * internals.h: ...here.
2487 1998-12-02 H.J. Lu <hjl@gnu.org>
2489 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2490 SIGRTMIN is defined.
2491 (__pthread_sig_cancel): Likewise.
2493 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2495 * wrapsyscall.c: Include <sys/mman.h> for msync,
2496 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2497 Correct msync declaration.
2499 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2501 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2502 __libc_tsd_set): New macros for new interface.
2503 * no-tsd.c: New file, provide uninitialized defns of
2504 __libc_internal_tsd_get and __libc_internal_tsd_set.
2505 * Makefile (routines): Add no-tsd.
2507 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2509 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2510 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2511 __libc_internal_tsd_set): Move decls to ...
2512 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2515 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2516 __libc_internal_tsd_set): Make these pointers to functions, not
2517 functions; remove #pragma weak decls for them.
2518 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2519 Define static functions and initialized pointers to them.
2521 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2523 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2524 (CFLAGS-specific.c): Likewise.
2525 (CFLAGS-pthread.c): Likewise.
2526 (CFLAGS-ptfork.c): Likewise.
2527 (CFLAGS-cancel.c): Likewise.
2528 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2529 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2531 * mutex.c (pthread_mutex_init): Define as strong symbol.
2532 (pthread_mutex_destroy): Likewise.
2533 (pthread_mutex_trylock): Likewise.
2534 (pthread_mutex_lock): Likewise.
2535 (pthread_mutex_unlock): Likewise.
2536 (pthread_mutexattr_init): Likewise.
2537 (pthread_mutexattr_destroy): Likewise.
2538 (pthread_once): Likewise.
2539 * ptfork.c (pthread_atfork): Likewise.
2540 * specific.c (pthread_key_create): Likewise.
2541 (pthread_setspecific): Likewise.
2542 (pthread_getspecific): Likewise.
2544 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2546 * linuxthreads.texi: Fix punctuation after xref.
2548 1998-11-10 H.J. Lu <hjl@gnu.org>
2550 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2551 if it is defined in <linux/limits.h>.
2553 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2555 * spinlock.h (__pthread_trylock): Define inline.
2556 (__pthread_lock): Add extra parameter to declaration. Declare
2557 using internal_function.
2558 (__pthread_unlock): Declare using internal_function.
2559 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2560 of local variable self. Avoid recomputing self. Define using
2562 (__pthread_trylock): Remove.
2563 (__pthread_unlock): Define using internal_function.
2564 * cancel.c: Adjust for __pthread_lock interface change. Use already
2565 computed self value is possible.
2566 * condvar.c: Likewise.
2568 * manager.c: Likewise.
2569 * mutex.c: Likewise.
2570 * pthread.c: Likewise.
2571 * rwlock.c: Likewise.
2572 * semaphore.c: Likewise.
2573 * signals.c: Likewise.
2575 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2577 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2578 __ to field names of the struct.
2579 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2581 (pthread_attr_t): Likewise.
2582 (pthread_cond_t): Likewise.
2583 (pthread_condattr_t): Likewise.
2584 (pthread_mutex_t): Likewise.
2585 (pthread_mutexattr_t): Likewise.
2586 (pthread_rwlock_t): Likewise.
2587 (pthread_rwlockattr_t): Likewise.
2588 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2589 * cancel.c: Likewise.
2590 * condvar.c: Likewise.
2591 * manager.c: Likewise.
2592 * mutex.c: Likewise.
2593 * pthread.c: Likewise.
2594 * ptlongjmp.c: Likewise.
2595 * rwlock.c: Likewise.
2596 * spinlock.c: Likewise.
2598 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2600 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2603 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2606 * Makefile (libpthread-routines): Add pt-machine.
2607 * pt-machine.c: New file.
2608 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2609 yet defined. Use PT_EI in extern inline definitions.
2610 * sysdeps/arm/pt-machine.h: Likewise.
2611 * sysdeps/i386/pt-machine.h: Likewise.
2612 * sysdeps/i386/i686/pt-machine.h: Likewise.
2613 * sysdeps/m68k/pt-machine.h: Likewise.
2614 * sysdeps/mips/pt-machine.h: Likewise.
2615 * sysdeps/powerpc/pt-machine.h: Likewise.
2616 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2617 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2619 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2621 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2624 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2626 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2628 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2630 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2632 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2635 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2637 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2638 array index overflow.
2640 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2642 * sysdeps/pthread/semaphore.h: New file.
2644 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2646 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2647 _LIBC_TSD_KEY_DL_ERROR.
2649 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2651 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2652 * sysdeps/i386/pt-machine.h: Likewise.
2653 Suggested by Roland McGrath.
2655 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2657 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2658 access thread data with non-constant offsets.
2659 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2662 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2663 THREAD_SETMEM_NC definitions.
2665 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2667 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2669 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2671 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2672 not already defined.
2673 (struct _pthread_descr_struct): Add p_self and p_nr field.
2674 * manager.c (__pthread_handles): Define second element to point
2676 (__pthread_handles_num): Initialize to 2.
2677 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2678 (pthread_start_thread): Likewise.
2679 (pthread_handle_create): Start search for free slot at entry 2.
2680 Initialize new fields p_self and p_nr.
2681 Call __clone with CLONE_PTRACE if available.
2682 (pthread_free): Call FREE_THREAD_SELF if available.
2683 * pthread.c (__pthread_initial_thread): Initialize new fields.
2684 (__pthread_manager_thread): Likewise.
2685 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2687 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2688 elements of the thread descriptor.
2689 * condvar.c: Likewise.
2690 * errno.c: Likewise.
2692 * manager.c: Likewise.
2693 * pthread.c: Likewise.
2694 * ptlongjmp.c: Likewise.
2695 * semaphore.c: Likewise.
2696 * signals.c: Likewise.
2697 * specific.c: Likewise.
2698 * spinlock.c: Likewise.
2700 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2702 * sysdeps/i386/useldt.h: New file.
2703 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2705 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2706 THREAD_SETMEM using __thread_self.
2707 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2709 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2711 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2712 turned out that we didn't need to queue after all.
2714 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2716 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2717 and wastes space; correct types.
2719 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2721 * signals.c (sigaction): Handle NULL argument.
2723 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2725 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2728 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2730 * Makefile (linuxthreads-version): Extract correct number from
2733 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2735 * Banner: Bump version number to 0.8
2736 * FAQ.html: Many updates, in particular w.r.t. debugging.
2737 * manager.c: Support for non-default stacksize for
2738 LinuxThreads-allocated stacks;
2739 don't use guard pages for stacks with default size, rely on
2740 rlimit(RLIMIT_STACK) instead (it's cheaper).
2742 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2743 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2744 * condvar.c: Likewise.
2745 * internals.h: Likewise.
2746 * restart.h: Likewise.
2747 * signals.c: Likewise.
2748 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2750 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2752 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2753 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2754 * Versions: Put __pthread_mutexattr_settype under version
2755 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2756 __pthread_mutexattr_gettype.
2758 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2760 * sysdeps/pthread/bits/libc-lock.h: Make
2761 __pthread_mutexattr_settype weak. Don't make
2762 __pthread_mutexattr_setkind_np weak.
2764 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2766 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2767 call can succeed here.
2769 * mutex.c: Define __pthread_mutexattr_settype and make
2770 __pthread_mutexattr_setkind_np an alias.
2771 Likewise for __pthread_mutexattr_gettype.
2773 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2775 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2778 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2780 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2782 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2784 * Examples/ex6.c: Include <unistd.h> for usleep.
2786 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2788 * Examples/ex4.c (main): Use exit, not pthread_exit.
2790 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2792 * Versions: Add __pthread_mutexattr_gettype and
2793 __pthread_mutexattr_settype.
2794 * lockfile.c: Use __pthread_mutexattr_settype instead of
2795 __pthread_mutexattr_setkind_np.
2796 * mutex.c: Define __pthread_mutexattr_gettype and
2797 __pthread_mutexattr_settype.
2799 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2800 __pthread_mutexattr_settype.
2801 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2802 Use __pthread_mutexattr_settype.
2804 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2806 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2807 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2808 pthread_mutexattr_settype.
2809 * sysdeps/pthread/pthread.h: Declare these functions.
2810 Move pthread_sigmask and pthread_kill declaration in separate header.
2811 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2813 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2815 * Makefile: Add rules to compile and run tests.
2816 * Examples/ex1.c: Little changes to fix warnings.
2817 * Examples/ex2.c: Likewise.
2818 * Examples/ex3.c: Likewise.
2819 * Examples/ex4.c: Likewise.
2820 * Examples/ex5.c: Likewise.
2821 * Examples/ex6.c: New file.
2823 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2825 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2827 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2829 * attr.c: Include <string.h>.
2831 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2833 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2834 * internals.h: Include limits.h.
2835 * manager.c: Use memcpy to copy sched_param.
2836 * ptfork.c: Include errno.h.
2837 * pthread.c: Likewise.
2838 * semaphore.c: Likewise.
2839 * specific.c: Likewise.
2840 * spinlock.h: Likewise.
2841 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2842 type definition to ...
2843 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2845 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2847 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2849 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2850 as macros as demanded in POSIX.1, Annex C.
2852 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2854 * internals.h (struct pthread_request): For free use pthread_t
2855 instead of pthread_descr.
2856 * join.c (pthread_join): Pass thread_id, not th to manager.
2857 (pthread_detach): Likewise.
2858 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2859 (pthread_exited): Remove detached queue code.
2860 (pthread_handle_free): Expect thread ID parameter and use it to
2861 validate the thread decsriptor. Don't use detached queue.
2862 Patches by Xavier Leroy.
2864 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2866 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2867 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2868 __pthread_atfork, __pthread_key_create, __pthread_once.
2869 * internals.h: Doc fix.
2870 * pthread.c (__pthread_initialize): Define again.
2872 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2874 * manager.c (pthread_exited): If thread is not detached put it on
2876 (pthread_handle_free): If thread is not on list with living threads
2877 search on list with detached threads.
2879 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2880 for new definition of pthread_rwlock_t.
2882 * spinlock.c: Correct test whether to compile
2883 __pthread_compare_and_swap or not.
2885 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2887 * attr.c: Finish user stack support. Change locking code to be safe
2888 in situations with different priorities.
2889 * cancel.c: Likewise.
2890 * condvar.c: Likewise.
2891 * internals.h: Likewise.
2893 * manager.c: Likewise.
2894 * mutex.c: Likewise.
2895 * pthread.c: Likewise.
2896 * ptlongjmp.c: Likewise.
2897 * queue.h: Likewise.
2898 * rwlock.c: Likewise.
2899 * semaphore.c: Likewise.
2900 * semaphore.h: Likewise.
2901 * signals.c: Likewise.
2902 * spinlock.c: Likewise.
2903 * spinlock.h: Likewise.
2904 * sysdeps/pthread/pthread.h: Likewise.
2905 Patches by Xavier Leroy.
2907 * sysdeps/i386/i686/pt-machine.h: New file.
2909 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2911 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2912 [sg]et_stackaddr prototypes always available.
2914 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2915 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2917 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2919 * manager.c (pthread_free): Undo patch from 980430.
2920 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2922 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2924 * manager.c: Define __pthread_manager_adjust_prio and use it to
2925 increase priority when needed.
2926 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2927 * mutex.c: Optimize mutexes to wake up only one thread.
2928 * pthread.c: Move PID of manager for global variable in structure
2930 Patches by Xavier Leroy.
2932 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2934 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2936 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2938 * attr.c: Correct typo.
2940 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2942 * manager.c (pthread_free): Unmap guard before the stack.
2943 Patch by Matthias Urlichs.
2945 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2947 * manager.c (pthread_free): Detect already free child.
2948 Patch by Xavier Leroy, reported by Matthias Urlichs.
2950 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2952 * Makefile (linuxthreads-version): Renamed back from
2955 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2957 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2960 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2962 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2963 * internals.h: Add definitions for new spinlock implementation.
2964 * ptlongjmp.c: New file.
2965 * spinlock.c: New file.
2966 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2967 new function __pthread_acquire to prevent deadlocks with thread
2968 with different priorities.
2969 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2971 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2973 * manager.c (__pthread_manager): Reduce first argument to select
2974 to include just the needed file descriptor.
2976 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2978 * manager.c: Fix last patch which caused core dumps.
2980 * pthread.c: Correctly handle missing SIGRTMIN.
2982 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2984 * libpthread.map: Add __libc_internal_tsd_get and
2985 __libc_internal_tsd_set. Add missing cancelable functions. Export
2986 libc internal versions of the cancelable functions.
2988 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2990 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2992 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2994 * attr.c: Implement pthread_attr_[gs]etguardsize,
2995 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2996 Change pthread_attr_init to have two interfaces.
2997 * internals.h (struct _pthread_descr_struct): Add new fields for
2999 * libpthread.map: Add names in GLIBC_2.1 section.
3000 * manager.c (pthread_handle_create): Implement guardsize and
3002 (pthread_free): Likewise.
3003 * pthread.c (pthread_create): Add new interface for changed
3005 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3006 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3009 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3011 * manager.c: Enable resetting of the thread scheduling policy
3012 to SCHED_OTHER when the parent thread has a different one.
3014 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3016 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3017 _POSIX_ASYNCHRONOUS_IO.
3019 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3021 * mutex.c: Implement new mutex types.
3023 * internals.h: Include <signal.h>.
3025 * libpthread.map: Add __erno_location and __h_errno_location.
3027 * errno.c: Return pointer to variable actually in use. This might
3028 not be the one in the thread structure.
3029 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3031 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3032 of manager thread structure.
3033 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3035 * pthread.c: Adapt initializer for thread structures.
3036 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3037 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3038 current thread to global variables.
3040 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3042 * rwlock.c: New file.
3043 * Makefile (libpthread-routines): Add rwlock.
3044 * sysdeps/pthread/pthread.h: Define data structures and declare
3046 * libpthread.map: Add new functions.
3048 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3050 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3051 * sysdeps/arm/Implies: likewise.
3052 * README: Document it.
3054 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3056 * signals.c: Remove unneeded initializer for sigwaited, saving a
3059 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3061 * semaphore.c (sem_init): Set sem_spinlock only if available.
3063 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3065 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3066 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3068 * Makefile: Update from LinuxThreads 0.7.
3069 * internals.h. Likewise.
3070 * manager.c: Likewise.
3071 * mutex.c: Likewise.
3072 * pthread.c: Likewise.
3073 * signals.c: Likewise.
3074 * specific.c: Likewise.
3075 * Examples/ex3.c: Likewise.
3077 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3079 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3082 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3084 * wrapsyscall.c: Add socket functions which are also cancelation
3087 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3089 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3090 New functions for fast thread specific data within libc.
3092 * internals.h: Add new array p_libc_specific to struct
3093 _pthread_descr_struct.
3095 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3097 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3099 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3100 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3102 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3104 * internals.h (struct _pthread_descr_struct): Add definitions for
3105 two-level specific key handling.
3106 * manager.c (pthread_handle_create): Initialize specific memory array.
3107 * specific.c: Implement two-level key handling.
3108 * weaks.c: Don't provide dummy key handling.
3109 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3110 Add definition of __libc_key_t.
3111 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3113 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3114 PTHREAD_DESTRUCTOR_ITERATIONS.
3116 * manager.c (pthread_handle_create): Compare mmap result with
3119 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3120 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3122 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3124 sysdeps/sparc -> sysdeps/sparc/sparc32
3125 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3127 * internals.h: Change definition of THREAD_SELF to be an expression,
3128 not a statement that did a return.
3129 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3130 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3131 Follow Solaris and use a "system reserved" register (%g6) to hold
3132 the thread descriptor.
3133 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3135 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3137 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3138 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3139 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3141 * semaphore.c: Include spinlock.h only when needed.
3143 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3144 keys for entries not in use.
3146 * weaks.c: Implement key handling functions for real.
3148 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3150 Initial sparc64-linux support:
3151 * sysdeps/sparc64/Implies: New file.
3152 * sysdeps/sparc64/pt-machine.h: Likewise.
3154 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3156 * semaphore.c: Include spinlock.h at correct place.
3159 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3161 The Great Bit File Move:
3162 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3163 * sysdeps/powerpc/semaphorebits.h: Likewise.
3164 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3165 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3166 * sysdeps/pthread/libc-lock.h: -> bits/
3167 * sysdeps/pthread/stdio-lock.h: Likewise.
3168 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3169 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3170 * semaphore.h: Likewise.
3171 * sysdeps/pthread/pthread.h: Likewise.
3173 * lockfile.c: <foo.h> -> <bits/foo.h>.
3174 * semaphore.h: Likewise.
3176 * Makefile: (headers): foo.h -> bits/foo.h.
3177 * sysdeps/pthread/Makefile: Likewise.
3179 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3181 * semaphore.c (sem_init): Set sem_spinlock only if available.
3183 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3186 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3188 Update from LinuxThreads 0.6.
3190 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3191 and __sched_get_priority_min instead of names without `__'.
3193 * manager.c: Rewrite large parts to implement opaque pthread_t.
3195 * cancel.c: Adapt for opaque pthread_t type.
3196 * condvar.c: Likewise.
3197 * errno.c: Likewise.
3199 * mutex.c: Likewise.
3200 * pthread.c: Likewise.
3201 * signals.c: Likewise.
3202 * specific.c: Likewise.
3203 * restart.h: Likewise.
3204 * queue.h: Likewise.
3205 * Examples/ex3.c: Likewise.
3206 * Examples/ex4.c: Likewise.
3207 * sysdeps/pthread/pthread.h: Likewise.
3209 * pthread.c: Accumulate time for all threads in thread manager.
3211 * semaphore.c: Implement fallback implementation for architectures
3212 sometimes missing compare-exchange operations.
3214 * cancel.c (pthread_cancel): Validate handle argument.
3215 * join.c (pthread_join): Likewise.
3216 (pthread_detach): Likewise.
3217 * signals.c (pthread_kill): Likewise.
3219 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3221 * queue.h (enqueue): Enqueue thread according to priority.
3223 * internals.c (struct pthread_start_args): New struct for passing
3224 args to cloning function.
3225 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3228 * Examples/Makefile (clean): Pass -f option to rm.
3230 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3231 and define TEST_FOR_COMPARE_AND_SWAP.
3232 * sysdeps/i386/i486/pt-machine.h: Removed.
3234 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3237 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3239 * restart.h (suspend): Clear p_signal before suspending.
3240 (suspend_with_cancellation): Likewise.
3241 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3243 * weaks.c: Make __pthread_key_create return 1.
3244 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3245 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3246 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3249 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3251 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3253 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3255 * sysdeps/powerpc/Implies: Added.
3256 * sysdeps/powerpc/pt-machine.h: Added.
3257 * sysdeps/powerpc/semaphorebits.h: Added.
3259 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3261 * pthread.c (__pthread_initial_thread): Correct
3263 (__pthread_manager_thread): Likewise.
3264 Reported by Andreas Jaeger.
3266 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3268 Since sigset_t no longer fits in a register, we can't pass in the
3269 thread's initial mask so easily. Take this opportunity to simplify
3270 the clone implementation by only accepting a single void* argument.
3272 * manager.c (__pthread_manager): Put thread vitals in the thread
3273 struct instead of as arguments through clone.
3274 (pthread_start_thread): Look for them there.
3275 * internals.h (struct _pthread): Add p_initial_fn,
3276 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3277 * pthread.c (pthread_initialize_manager): Revise clone invocation.