1 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3 * man/pthread_atfork.man: Adjust description of mutex handling
4 after fork for current implementation.
5 * linuxthreads.texi: Likewise [PR libc/2519].
7 2001-12-13 Andreas Schwab <schwab@suse.de>
9 * specific.c (pthread_key_delete): Don't contact the thread
10 manager if no threads have been created yet.
12 2001-12-12 NIIBE Yutaka <gniibe@.m17n.org>
14 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
17 2001-11-30 Andreas Schwab <schwab@suse.de>
19 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
20 that self is the manager thread, and initialize the thread
22 (thread_self_stack) [THREAD_SELF]: New function to find self via
24 * manager.c (pthread_handle_create): Don't block cancel signal any
27 2001-11-29 Andreas Jaeger <aj@suse.de>
29 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
31 (INIT_THREAD_SELF): New.
35 (THREAD_SETMEM_NC): New.
36 (FLOATING_STACKS): Define.
37 (ARCH_STACK_MAX_SIZE): Define.
39 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
41 Bugfix to pthread_key_delete. It was iterating over the thread
42 manager's linked list of threads, behind the thread manager's
43 back causing a race. The fix is to have the manager iterate over
44 the threads instead, using a new request type for doing so.
45 * internals.h (struct pthread_request): New manager request type
47 * manager.c (pthread_for_each_thread): New function.
48 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
49 * specific.c (struct pthread_key_delete_helper_args): New type.
50 (pthread_key_delete_helper): New static function.
51 (pthread_key_delete): Use the new thread manager
52 REQ_FOR_EACH_THREAD function to iterate over the threads and set
53 the delete key slot to a null value in each thread.
54 * Examples/ex18.c: New test.
55 * Makefile (tests): Add ex18.
57 2001-11-22 Wolfram Gloger <wg@malloc.de>
59 * pthread.c (pthread_onexit_process): Don't call free
60 after threads have been asynchronously terminated.
62 * manager.c (pthread_handle_exit): Surround cancellation
63 of threads with __flockfilelist()/__funlockfilelist().
65 2001-11-26 Andreas Schwab <schwab@suse.de>
67 * manager.c (pthread_handle_create): Start the child thread with
68 the cancel signal blocked, so that it does not handle it before
69 the thread register is set up. Save errno from failed clone call.
71 2001-11-15 Ulrich Drepper <drepper@redhat.com>
73 * sysdeps/i386/i686/Implies: Removed.
74 * sysdeps/i386/i686/Versions: New file.
76 2001-10-31 Andreas Jaeger <aj@suse.de>
78 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
80 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
82 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
83 to __linuxthreads_pthread_sizeof_descr to match name used by
84 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
85 linuxthreads_db/td_symbol_list.c.
87 2001-09-22 Andreas Jaeger <aj@suse.de>
89 * linuxthreads/tst-context.c: Avoid compile warning.
91 2001-09-20 Andreas Jaeger <aj@suse.de>
93 * shlib-versions: Add x86-64.
95 2001-09-19 Andreas Jaeger <aj@suse.de>
97 * sysdeps/x86_64/Makefile: New file.
98 * sysdeps/x86_64/pspinlock.c: New file.
99 * sysdeps/x86_64/pt-machine.h: New file.
101 2001-09-12 Jakub Jelinek <jakub@redhat.com>
103 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
105 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
107 2001-09-11 Ulrich Drepper <drepper@redhat.com>
108 Wolfram Gloger <wg@malloc.de>
110 * join.c: Protect all communications from and to manager with
112 * manager.c: Likewise.
113 * pthread.c: Likewise.
114 * smeaphore.c: Likewise.
116 2001-08-29 Ulrich Drepper <drepper@redhat.com>
118 * spinlock.c (__pthread_lock): Top max_count value with
119 MAX_ADAPTIVE_SPIN_COUNT.
120 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
122 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
125 2001-08-27 Jakub Jelinek <jakub@redhat.com>
127 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
128 non-opaque type if __USE_UNIX98.
130 2001-08-26 Jakub Jelinek <jakub@redhat.com>
132 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
133 non-opaque lock types also if _IO_MTSAFE_IO is defined.
135 2001-08-23 Roland McGrath <roland@frob.com>
137 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
138 new first argument, skip the cleanup handler if it's zero.
139 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
140 (__libc_lock_define_initialized_recursive): Use it.
141 * sysdeps/pthread/bits/stdio-lock.h: File removed.
142 The sysdeps/generic file from the main tree now suffices.
144 2001-08-22 Roland McGrath <roland@frob.com>
146 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
147 instead of <pthread.h>.
148 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
149 (_IO_lock_initializer): Add braces.
150 (_IO_lock_lock): Use __libc_lock_lock_recursive.
151 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
153 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
154 (__libc_lock_define_initialized_recursive): Use it.
155 (__libc_lock_init_recursive): Likewise.
156 (__libc_lock_fini_recursive): Likewise.
157 (__libc_lock_lock_recursive): Likewise.
158 (__libc_lock_trylock_recursive): Likewise.
159 (__libc_lock_unlock_recursive): Likewise.
160 (__libc_lock_define_recursive): New macro.
162 2001-08-14 Jakub Jelinek <jakub@redhat.com>
164 * lockfile.c (__pthread_provide_lockfile): New variable.
165 * pthread.c (__pthread_require_lockfile): New variable.
166 * cancel.c (__pthread_require_lockfile): New variable.
168 2001-07-31 Ulrich Drepper <drepper@redhat.com>
170 * tst-context.c (threadfct): Initialize context before calling
173 * Examples/ex17.c: Make sure test thread is around long enough.
175 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
177 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
179 2001-07-24 Ulrich Drepper <drepper@redhat.com>
181 * tst-context.c (main): Print explanation before bailing out
182 because context handling is not supported.
184 2001-07-23 Ulrich Drepper <drepper@redhat.com>
186 * Makefile (tests): Add tst-context.
187 * tst-context.c: New file.
189 * sysdeps/pthread/bits/stdio-lock.h: Define
190 _IO_cleanup_region_start_noarg.
192 2001-07-23 Jakub Jelinek <jakub@redhat.com>
194 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
195 (ARCH_STACK_MAX_SIZE): Define.
196 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
197 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
199 2001-07-19 Jakub Jelinek <jakub@redhat.com>
201 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
203 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
204 (ARCH_STACK_MAX_SIZE): Define.
205 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
206 NEED_SEPARATE_REGISTER_STACK.
208 2001-07-16 Andreas Schwab <schwab@suse.de>
210 * Makefile (before-compile): Don't add $(objpfx)crti.o.
211 (omit-deps): Add crti.
212 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
213 it is filtered out of the link command.
215 2001-07-16 Ulrich Drepper <drepper@redhat.com>
217 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
218 to find the right value for __pthread_initial_thread_bos, it's not
219 used. If not FLOATING_STACKS first run
220 __pthread_init_max_stacksize.
222 2001-06-16 H.J. Lu <hjl@gnu.org>
224 * internals.h: Include <stackinfo.h>.
226 * attr.c: Don't include <stackinfo.h> here.
227 * cancel.c: Likewise.
228 * manager.c: Likewise.
229 * pthread.c: Likewise.
230 * ptlongjmp.c: Likewise.
232 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
234 * attr.c: Make _STACK_GROWS_UP work.
235 * internals.h: Likewise.
236 * manager.c: Likewise.
237 * pthread.c: Likewise.
239 2001-06-15 H.J. Lu <hjl@gnu.org>
241 * pthread.c (__pthread_reset_main_thread): Fix a typo.
243 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
245 * semaphore.h: Use struct _pthread_fastlock as an element of
246 sem_t instead of an identical struct.
247 * rwlock.c: Remove casts.
248 * semaphore.c: Likewise.
250 2001-04-30 Alan Modra <amodra@one.net.au>
252 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
254 2001-05-25 Bruce Mitchener <bruce@cubik.org>
256 * linuxthreads.texi: Spelling corrections.
258 2001-05-25 Ulrich Drepper <drepper@redhat.com>
260 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
261 returning successfully.
262 Patch by Gene Cooperman <gene@ccs.neu.edu>.
264 2001-05-24 Ulrich Drepper <drepper@redhat.com>
266 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
267 serious work try once whether the lock is uncontested.
268 Remove duplicate reading of __status before loop.
269 Change suggested by Hans Boehm <hans_boehm@hp.com>.
271 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
272 (__pthread_alt_trylock): Likewise.
274 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
276 Memory barrier overhaul following line by line inspection.
277 * mutex.c (pthread_once): Missing memory barriers added.
278 * pthread.c (__pthread_wait_for_restart_signal,
279 __pthread_timedsuspend_new, __pthread_restart_new): Added
280 memory barriers ``just in case'' and for documentary value.
281 * spinlock.c (__pthread_release): New inline function for releasing
282 spinlock, to complement __pthread_acquire. Includes memory
283 barrier prior to assignment to spinlock, and __asm __volatile
284 dance to prevent reordering or optimization of the spinlock access.
285 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
286 __pthread_alt_timedlock, __pthread_alt_unlock,
287 __pthread_compare_and_swap): Updated to use new __pthread_release
288 instead of updating spinlock directly.
289 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
290 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
291 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
292 Memory barrier overhaul. Lots of missing memory barriers added,
293 a couple needless ones removed.
294 * spinlock.c (__pthread_compare_and_swap): testandset optimization
295 removed, just calls __pthread_acquire, which has the new read
296 barrier in it before its testandset.
298 2001-05-20 Roland McGrath <roland@frob.com>
300 * Makeconfig: New file, variables used to be in main libc Makeconfig.
302 2001-05-09 Geoff Keating <geoffk@redhat.com>
304 * sysdeps/powerpc/pt-machine.h
305 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
306 (__compare_and_swap): Remove memory barriers.
307 (__compare_and_swap_with_release_semantics): New function.
309 2001-04-24 Andreas Jaeger <aj@suse.de>
311 * wrapsyscall.c: send* and recv* return ssize_t.
313 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
314 mutex instead of double locking it.
315 Reported by Pierre Artaud <partaud@sodatec.com>.
317 2001-04-23 Ulrich Drepper <drepper@redhat.com>
319 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
320 using #ifdef whether the clock is available.
321 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
323 * sysdeps/ia64/Versions: New file.
325 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
326 have to call __gmon_start__ in the libpthread DSO.
327 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
329 * Makefile (libpthread-routines): Add ptclock_gettime and
331 * internals.h: Don't use cpuclock-init.h definitions, use
332 hp-timing.h definitions.
333 * pthread.c: Likewise.
334 * manager.c: Likewise.
335 * ptclock_gettime.c: New file.
336 * ptclock_settime.c: New file.
337 * internals.h: Fix parameter type for __pthread_clock_gettime and
338 __pthread_clock_settime.
340 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
341 * sysdeps/i386/i586/ptclock_settime.c: Removed.
342 * sysdeps/i386/i586/Makefile: Removed.
344 2001-04-22 Ulrich Drepper <drepper@redhat.com>
346 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
347 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
349 2001-04-21 Andreas Jaeger <aj@suse.de>
351 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
352 attribute, remove statements that will never be executed.
353 (thread_func): Remove mutex_unlock call since it's never executed.
354 (thread_func): Fix comment as suggested by Jakub Jelinek.
356 * manager.c (__pthread_manager): Add noreturn
358 (pthread_start_thread): Likewise, remove return statement.
359 (pthread_start_thread_event): Likewise.
360 Add noreturn attribute for pthread_handle_exit.
361 * weaks.c: Add noreturn attribute for pthread_exit.
363 * internals.h: Add __pthread_clock_gettime and
364 __pthread_clock_settime prototypes.
366 2001-04-21 Ulrich Drepper <drepper@redhat.com>
368 * internals.h: Include <cpuclock-init.h>.
369 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
370 CPUCLOCK_VARDEF is defined.
371 * pthread.c (__pthread_initialize_minimal): Initialize
372 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
373 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
374 for new thread to current CPU clock value.
376 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
378 * sysdeps/i386/i586/Makefile: New file.
379 * sysdeps/i386/i586/Versions: New file.
380 * sysdeps/i386/i586/ptclock_gettime.c: New file.
381 * sysdeps/i386/i586/ptclock_settime.c: New file.
382 * sysdeps/i386/i686/Implies: New file.
384 2001-04-18 Jakub Jelinek <jakub@redhat.com>
386 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
387 $generated, not $postclean-generated.
389 2001-04-18 Andreas Jaeger <aj@suse.de>
391 * Makefile (otherlibs): Added.
393 2001-04-18 Jakub Jelinek <jakub@redhat.com>
395 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
397 2001-04-16 Ulrich Drepper <drepper@redhat.com>
399 * signals.c (sigwait): NSIG is no signal number. Block all
400 signals while in signal handler for signals in SET.
401 Patch by Manfred Spraul <manfred@colorfullife.com>.
403 2001-04-12 Ulrich Drepper <drepper@redhat.com>
405 * tst-cancel.c: Disable most tests. Add new test where all
406 cleanup handlers must run.
407 * Makefile (tests): Add tst-cancel again.
409 * cancel.c (__pthread_perform_cleanup): Correct condition for
410 leaving cleanup loop early.
412 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
413 all the files which use CURRENT_STACK_FRAME.
414 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
415 __builtin_frame_address.
416 * sysdeps/i386/i686/pt-machine.h: Likewise.
418 2001-04-11 Ulrich Drepper <drepper@redhat.com>
420 * Makefile (tests): Comment out tst-cancel for now.
422 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
423 temporary file in object directory.
424 * Makefile: Don't allow inlining when compiling tst-cancel.c.
425 Pass $(objpfx) to tst-cancel.
427 2001-04-11 David S. Miller <davem@redhat.com>
429 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
430 up closer to user local variables so that new cleanup heuristics work.
431 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
433 2001-04-11 Ulrich Drepper <drepper@redhat.com>
435 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
437 (_pthread_cleanup_push_defer): Likewise.
439 * tst-cancel.c (main): Fix loop printing cleanup output.
441 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
443 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
445 (__pthread_spin_trylock): Likewise.
446 * sysdeps/sh/pt-machine.h (testandset): Likewise.
448 2001-04-10 Ulrich Drepper <drepper@redhat.com>
450 * join.c (pthread_exit): Move code to new function __pthread_do_exit
451 which takes an extra parameter with the current frame pointer.
452 Call new function with CURRENT_STACK_FRAME.
453 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
454 with the new parameter.
455 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
456 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
457 this parameter as the initial value the cleanup handler records are
458 compared against. No active cleanup handler record must have an
459 address lower than the previous one and the initial record must be
460 above (below on PA) the frame address passed in.
461 (pthread_setcancelstate): Call __pthread_do_exit instead of
463 (pthread_setcanceltype): Likewise.
464 (pthread_testcancel): Likewise.
465 (_pthread_cleanup_pop_restore): Likewise.
466 * condvar.c (pthread_cond_wait): Likewise.
467 (pthread_cond_timedwait_relative): Likewise.
468 * manager.c (pthread_start_thread): Likewise.
469 * oldsemaphore.c (__old_sem_wait): Likewise.
470 * pthread.c (pthread_handle_sigcancel): Likewise.
471 * semaphore.c (__new_sem_wait): Likewise.
472 (sem_timedwait): Likewise.
473 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
474 to limit the cleanup handlers which get run.
475 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
476 for __pthread_perform_cleanup.
478 * Makefile (tests): Add tst-cancel.
479 * tst-cancel.c: New file.
481 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
483 * sysdeps/cris/pt-machine.h: New file.
484 * sysdeps/cris/pspinlock.c: New file.
486 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
488 * shlib-versions: Add case for Linux on CRIS.
490 2001-03-26 Ulrich Drepper <drepper@redhat.com>
492 * attr.c (pthread_getattr_np): Correct computation of stack size
493 for machiens with register stack.
495 * Examples/ex17.c (main): Correct detection of failed mmap call.
497 2001-03-21 Jakub Jelinek <jakub@redhat.com>
499 * pthread.c (__pthread_initialize_manager): Fix a typo.
501 2001-03-21 Jakub Jelinek <jakub@redhat.com>
503 * attr.c (__pthread_attr_setstack): Fix alignment check.
504 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
505 * Makefile (tests): Add ex17 test.
506 * Examples/ex17.c: New test.
508 2001-03-20 Ulrich Drepper <drepper@redhat.com>
510 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
511 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
512 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
514 2001-03-18 Ulrich Drepper <drepper@redhat.com>
516 * Makefile: When generating DSO link with libc_nonshared.a.
518 2001-02-26 Jakub Jelinek <jakub@redhat.com>
520 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
522 2001-02-23 Jakub Jelinek <jakub@redhat.com>
524 * internals.h (__pthread_init_max_stacksize): New prototype.
525 * attr.c (__pthread_attr_setstacksize): Call
526 __pthread_init_max_stacksize if not yet initialized.
527 * pthread.c (__pthread_init_max_stacksize): New function.
528 (__pthread_initialize_manager): Call it.
529 Patch by <dtc@cmucl.cons.org>.
531 2001-03-16 Ulrich Drepper <drepper@redhat.com>
533 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
535 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
537 * shlib-versions: Add rule for Linux on 64 bit S/390.
538 * sysdeps/s390/s390-64/pt-machine.h: New file.
539 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
541 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
543 * sysdeps/s390/pt-machine.h: Move to...
544 * sysdeps/s390/s390-32/pt-machine.h: ...here.
545 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
547 2001-03-15 Ulrich Drepper <drepper@redhat.com>
549 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
550 * attr.c: Implement pthread_getattr_np.
551 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
552 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
553 * manager.c (pthread_handle_create): Initialize p_inheritsched.
555 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
557 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
560 2001-02-20 Hans Boehm <hans_boehm@hp.com>
562 * manager.c (manager_mask): Removed static vesion. Now always local
563 to __pthread_manager().
564 (manager_mask_all): Removed completely.
565 (__pthread_manager): Remove manager_mask_all initialization.
566 (pthread_handle_create): Remove code to set and reset signal mask
567 around __clone2() calls.
569 2001-02-17 Jakub Jelinek <jakub@redhat.com>
571 * spinlock.c (__pthread_lock): Force lock->__status to be read from
572 memory on every spin.
574 2001-02-10 Andreas Jaeger <aj@suse.de>
576 * Makefile (extra-objs): New.
578 2001-02-09 Jakub Jelinek <jakub@redhat.com>
580 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
581 __pthread_initialize_minimal prototype.
583 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
585 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
587 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
589 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
591 2001-02-06 Ulrich Drepper <drepper@redhat.com>
593 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
594 broken code. Patch by Jes Sorensen.
596 2001-02-06 Andreas Jaeger <aj@suse.de>
598 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
600 * internals.h: ...here.
602 2001-02-05 Jes Sorensen <jes@linuxcare.com>
604 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
606 2001-02-02 Ulrich Drepper <drepper@redhat.com>
608 * Versions: Remove __pthread_initialize_minimal.
610 2001-02-01 Ulrich Drepper <drepper@redhat.com>
612 * Makefile: Add rules to build crti.o and make it being used in
613 building libpthread.so.
614 * sysdeps/i386/Makefile: New file.
615 * sysdeps/pthread/pt-initfini.c: New file.
617 * pthread.c: Cleanups.
619 2001-01-28 Andreas Jaeger <aj@suse.de>
621 * oldsemaphore.c (__old_sem_init): Adjust for last change.
622 * sysdeps/pthread/bits/libc-lock.h: Likewise.
623 * spinlock.c: Likewise.
625 2001-01-28 Ulrich Drepper <drepper@redhat.com>
627 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
628 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
629 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
630 * pthread.c: Likewise.
631 * spinlock.h: Likewise.
632 * sysdeps/pthread/pthread.h: Likewise.
634 2001-01-26 Ulrich Drepper <drepper@redhat.com>
636 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
637 as struct __pthread_attr_s.
639 * semaphore.h (sem_t): Cleanup namespace, rename status and
642 2001-01-13 Jakub Jelinek <jakub@redhat.com>
644 * pthread.c (pthread_onexit_process): Clear
645 __pthread_manager_thread_bos after freeing it.
646 * Makefile (tests): Add ex16.
647 * Examples/ex16.c: New file.
649 2001-01-11 Jakub Jelinek <jakub@redhat.com>
651 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
653 * pthread.c (pthread_exit_process): Rename to...
654 (pthread_onexit_process): ...this.
655 (pthread_atexit_process, pthread_atexit_retcode): New.
656 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
657 and only if HAVE_Z_NODELETE is not defined.
658 (__pthread_initialize_manager): Register pthread_atexit_retcode
661 2001-01-11 Ulrich Drepper <drepper@redhat.com>
663 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
665 2001-01-11 Jakub Jelinek <jakub@redhat.com>
667 * Makefile (tests): Add ex15.
668 * Examples/ex15.c: New test.
670 2001-01-08 Ulrich Drepper <drepper@redhat.com>
672 * pthread.c (pthread_exit_process): Free memory allocated for
675 2000-12-31 Ulrich Drepper <drepper@redhat.com>
677 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
678 (pthread_free): Always unmap the stack. It's safe now that we don't
679 use MAP_FIXED to allocate stacks.
681 2000-12-31 Ulrich Drepper <drepper@redhat.com>
683 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
685 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
687 2000-11-15 Wolfram Gloger <wg@malloc.de>
689 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
690 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
692 2000-12-27 Andreas Jaeger <aj@suse.de>
694 * Examples/ex13.c: Make local functions static.
695 * ecmutex.c: Likewise.
696 * joinrace.c: Likewise.
697 * Examples/ex14.c: Likewise.
699 * Examples/ex2.c: Make local functions static; reformat.
700 * Examples/ex1.c: Likewise.
701 * Examples/ex4.c: Likewise.
702 * Examples/ex5.c: Likewise.
703 * Examples/ex7.c: Likewise.
705 * oldsemaphore.c: Add prototypes to shut up GCC.
706 * pt-machine.c: Likewise.
708 * weaks.c: Add prototype for pthread_exit.
710 * internals.h: Add some prototypes, format prototypes and add
712 Move __libc_waitpid prototype to include/sys/wait.h.
714 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
716 * specific.c: Likewise.
717 * ptfork.c: Likewise.
719 * lockfile.c: Include internals.h to get prototypes.
720 * events.c: Likewise.
721 * sysdeps/alpha/pspinlock.c: Likewise.
722 * sysdeps/arm/pspinlock.c: Likewise.
723 * sysdeps/hppa/pspinlock.c: Likewise.
724 * sysdeps/i386/pspinlock.c: Likewise.
725 * sysdeps/ia64/pspinlock.c: Likewise.
726 * sysdeps/m68k/pspinlock.c: Likewise.
727 * sysdeps/mips/pspinlock.c: Likewise.
728 * sysdeps/powerpc/pspinlock.c: Likewise.
729 * sysdeps/s390/pspinlock.c: Likewise.
730 * sysdeps/sh/pspinlock.c: Likewise.
731 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
732 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
733 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
735 2000-12-27 Ulrich Drepper <drepper@redhat.com>
737 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
738 (__pthread_attr_getstack): Return correct address.
739 Add warnings for using pthread_attr_getstackaddr and
740 pthread_attr_setstackaddr.
742 2000-12-26 Ulrich Drepper <drepper@redhat.com>
744 * Examples/ex6.c (test_thread): Make static.
745 * Examples/ex12.c (test_thread): Make static and add noreturn
748 2000-12-18 Jes Sorensen <jes@linuxcare.com>
750 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
751 and compare_and_swap_with_release_semantics returns int not long.
753 2000-12-17 Andreas Jaeger <aj@suse.de>
755 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
757 * sysdeps/arm/pt-machine.h (testandset): Likewise.
758 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
759 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
760 * sysdeps/sh/pt-machine.h (testandset): Likewise.
761 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
762 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
764 2000-12-17 Ulrich Drepper <drepper@redhat.com>
766 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
767 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
769 2000-12-17 Andreas Jaeger <aj@suse.de>
771 * internals.h: Add prototypes for testandset and
772 __compare_and_swap to shut up gcc warnings.
774 2000-12-06 Wolfram Gloger <wg@malloc.de>
776 * join.c (pthread_detach): Allow case where the thread has already
779 2000-12-05 Andreas Jaeger <aj@suse.de>
781 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
782 * sysdeps/mips/pt-machine.h (testandset): Likewise.
783 (__compare_and_swap): Likewise.
784 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
786 2000-11-20 Jakub Jelinek <jakub@redhat.com>
788 * Examples/ex3.c (main): Cast int to long before casting to void *.
789 (search): Cast void * to long, not int.
790 * Examples/ex8.c (main, thread): Similarly.
791 * Examples/ex11.c (main): Similarly.
792 * Examples/ex14.c (worker, do_test): Similarly.
793 * ecmutex.c (worker, do_test): Similarly.
794 (nlocks): Cast to int.
796 2000-11-08 Bruce Mitchener <bruce@cubik.org>
798 * linuxthreads.texi: Add documentation for pthreads attributes
799 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
800 patch. Document pthread_[sg]etconcurrency(). Mark
801 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
803 2000-11-07 Ulrich Drepper <drepper@redhat.com>
805 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
807 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
808 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
810 2000-11-06 Ulrich Drepper <drepper@redhat.com>
812 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
813 not doing it right now.
814 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
816 2000-10-30 Ulrich Drepper <drepper@redhat.com>
818 * Examples/ex4.c (main): Don't use exit() to avoid warning with
821 2000-10-29 Ulrich Drepper <drepper@redhat.com>
823 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
824 here. Reported by Bruce Mitchener <bruce@cubik.org>.
826 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
827 discussing mutexes. (As per the Unix98 name for the API.)
828 Changes documentation for pthread_mutexattr_setkind_np() and
829 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
830 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
831 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
832 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
833 Begins to introduce discussion of the ``timed'' mutex type. This
834 discussion is currently incomplete.
835 Patch by Bruce Mitchener <bruce@cubik.org>.
837 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
838 Yutaka Niibe <gniibe@chroot.org>
840 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
841 has restrictions, use register.
843 2000-10-23 Andreas Schwab <schwab@suse.de>
845 * Examples/ex14.c (TIMEOUT): Override default timeout.
847 2000-10-16 Ulrich Drepper <drepper@redhat.com>
849 * specific.c: Protect tsd array modification in thread data
850 structures by getting the thread lock in pthread_key_delete and
851 __pthread_destroy_specifics.
852 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
854 2000-10-12 Alan Modra <alan@linuxcare.com.au>
856 * sysdeps/pthread/bits/initspin.h: New file.
857 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
858 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
859 (__pthread_alt_init_lock): Likewise.
860 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
862 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
864 * oldsemaphore.c (__old_sem_init): Release lock with
865 LT_SPINLOCK_INIT, not zero.
866 * spinlock.c (__pthread_unlock): Likewise.
867 (__pthread_alt_lock): Likewise.
868 (__pthread_alt_timedlock): Likewise.
869 (__pthread_alt_unlock): Likewise.
870 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
871 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
872 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
873 LT_SPINLOCK_INIT do initialize spinlocks not 0.
875 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
877 * shlib-versions: Add version definitions for hppa-linux.
879 2000-10-12 Alan Modra <alan@linuxcare.com.au>
881 * sysdeps/hppa/pspinlock.c: New file.
882 * sysdeps/hppa/pt-machine.h: New file.
883 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
885 2000-10-05 Jakub Jelinek <jakub@redhat.com>
887 * mutex.c (__pthread_mutex_destroy): Correct test of
888 busy mutex for mutexes using alternate fastlocks.
889 Patch by dtc@cmucl.cons.org.
891 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
893 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
895 2000-09-28 Ulrich Drepper <drepper@redhat.com>
897 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
898 test for owner first.
899 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
901 * cancel.c (pthread_cancel): Don't do anything if cancelation is
904 2000-09-26 Ulrich Drepper <drepper@redhat.com>
906 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
907 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
909 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
910 _POSIX_MONOTONIC_CLOCK.
912 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
915 2000-09-20 Andreas Jaeger <aj@suse.de>
917 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
918 "testrtsig.h" conditional.
920 2000-09-11 Ulrich Drepper <drepper@redhat.com>
922 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
923 pthread_attr_setstack.
924 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
925 pthread_attr_setstack.
926 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
928 2000-09-05 Ulrich Drepper <drepper@redhat.com>
930 * Examples/ex14.c: New file.
931 * Makefile (tests): Add ex14.
933 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
934 mutex. Patch by dtc@cmucl.cons.org.
936 * ecmutex.c: New file.
937 * Makefile (tests): Add ecmutex.
939 2000-09-04 H.J. Lu <hjl@gnu.org>
941 * attr.c (__pthread_attr_setguardsize): Use page_roundup
942 instead of roundup to round up to the page size.
944 2000-09-03 Mark Kettenis <kettenis@gnu.org>
946 * manager.c (pthread_exited): Correctly report event as TD_REAP
947 instead of TD_DEATH. Fix comments.
949 2000-09-03 Ulrich Drepper <drepper@redhat.com>
951 * spinlock.h (testandset): Add cast to avoid warning.
952 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
954 2000-09-02 Andreas Jaeger <aj@suse.de>
956 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
959 2000-09-01 Ulrich Drepper <drepper@redhat.com>
961 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
962 Fix typo in last patch (_mode -> _flags).
964 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
965 Provide definition which respects _IO_USER_LOCK flag.
967 2000-08-30 Ulrich Drepper <drepper@redhat.com>
969 * manager.c (pthread_allocate_stack): Clear descriptor only if not
972 2000-08-25 Ulrich Drepper <drepper@redhat.com>
974 * Makefile: Add rules to build and run unload.
975 * unload.c: New file.
977 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
979 * sysdeps/pthread/pthread.h
980 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
981 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
983 2000-08-24 Andreas Jaeger <aj@suse.de>
985 * Examples/ex13.c: Include <string.h> for strerror prototype and
986 <stdlib.h> for abort prototype.
987 (pthr_cond_signal_mutex): Rewrite to silence GCC.
988 (thread_start): Remove unused variable err.
989 (main): Silence GCC warnings.
991 2000-08-22 Andreas Jaeger <aj@suse.de>
993 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
995 * Makefile (tests): Add ex13.
997 2000-08-20 Ulrich Drepper <drepper@redhat.com>
999 * semaphore.h: Add restrict where required by AGd4.
1000 * sysdeps/pthread/pthread.h: Likewise.
1001 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1003 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1005 * Makefile (tests): Add ex12. Add rule to build it.
1006 * Examples/ex12.c: New file.
1008 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1011 even though the implementation is not quite complete (but it reports
1012 it). Define _POSIX_MESSAGE_PASSING to -1.
1013 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1015 2000-08-12 Andreas Jaeger <aj@suse.de>
1017 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1019 (__compare_and_swap): Likewise.
1020 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1022 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1024 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1025 p_h_errnop correctly and not to NULL.
1027 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1029 * Banner: Bump version number to 0.9.
1031 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1033 * Makefile (tests): Add tststack. Add rule to build the program.
1034 * tststack.c: New file.
1036 * internals.h: Declare __pthread_max_stacksize.
1037 * pthread.c (__pthread_max_stacksize): New variable.
1038 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1040 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1041 (pthread_allocate_stack): Allow kernel to choose stack address if
1042 FLOATING_STACKS. This also handles variable-sized stacks.
1043 Always allocate stack and guardpage together. Use mprotect to
1044 change guardpage access.
1045 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1046 ARCH_STACK_MAX_SIZE.
1048 * attr.c (__pthread_attr_setstacksize): Also test value against
1051 * manager.c (__pthread_nonstandard_stacks): Define only if
1052 THREAD_SELF is not defined.
1053 (pthread_allocate_stack): Always initialize gardaddr to a correct
1055 (pthread_handle_create): Unmap thread with one call.
1056 (pthread_free): Remove test for initial thread before removing stack.
1057 Unmap stack with one call.
1059 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1060 1 to avoid removing the stack.
1062 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1064 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1065 load of spin lock to prime the cache before the atomic compare and
1066 exchange operation (cmpxchg4). This avoids the spinning on the
1067 cmpxchg4 instruction and reduces movement of the cache line back
1068 and forth between the processors (explanation by Asis K. Mallick
1069 from Intel). This basically makes the implementation operate the
1070 same as the Linux kernel implementation.
1072 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1073 * sysdeps/ia64/pspinlock.c: New file.
1075 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1077 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1078 * spinlock.h: ...here. Remove locking.
1079 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1081 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1082 (rwlock_rd_extricate_func): Don't determine self, let
1083 __pthread_lock do it.
1084 (rwlock_wr_extricate_func): Likewise.
1085 (rwlock_have_already): Optimize *pself handling a bit.
1087 * mutex.c: Use __builtin_expect.
1088 * pthread.c: Likewise.
1090 2000-08-02 Andreas Jaeger <aj@suse.de>
1092 * sysdeps/s390/pspinlock.c: New file.
1093 * sysdeps/s390/pt-machine.h: New file.
1094 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1096 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1098 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1100 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1102 2000-07-26 Andreas Jaeger <aj@suse.de>
1104 * pthread.c: Initialize p_sem_avail.
1106 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1108 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1109 * semaphore.c: Handle spurious wakeups.
1111 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1112 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1114 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1115 (__pthread_wait_for_restart): Likewise.
1117 * condvar.c (pthread_cond_wait): Also check whether thread is
1118 cancelable before aborting loop.
1119 (pthread_cond_timedwait): Likewise.
1121 * signals.c (pthread_sighandler): Remove special code to restrore
1123 (pthread_sighandler_t): Likewise.
1125 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1127 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1128 * pthread.c: Include <resolv.h>.
1129 (_res): Undefine. Add extern declaration.
1131 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1133 * pthread.c (__pthread_initial_thread): Update initializer.
1134 (__pthread_manager_thread): Likewise.
1135 (pthread_initialize): Move setrlimit call to...
1136 (__pthread_initialize_manager): ...here.
1137 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1139 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1140 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1142 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1144 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1145 __compare_and_swap to define testandset.
1146 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1147 Define IMPLEMENT_TAS_WITH_CAS.
1149 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1151 * Makefile: Pass -z nodelete to linker for libpthread.so
1152 generation if it understand this option.
1154 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1156 * manager.c (pthread_handle_create): Remove initialization of
1157 new_thread->p_res._sock.
1159 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1161 Bugfixes to the variant of the code for machines with no compare
1164 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1165 node was not being properly enqueued, due to failing to update
1166 the lock->__status field.
1168 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1169 being set inappropriately, causing the suspend function to be called
1170 with a null self pointer and crash.
1172 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1174 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1175 compare&swap is available.
1177 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1180 * pthread.c (pthread_initialize): Don't use sysconf to determine
1181 whether the machine has more than one processor.
1183 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1184 removed thread_self calls.
1186 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1188 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1189 __compare_and_swap to compare_and_swap in code which assumes
1190 compare swap is available.
1192 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1194 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1195 bug whereby thr field of waitnode structure would not be correctly
1196 set unless a null self pointer is passed to the functions.
1197 Eliminated redundant calls to thread_self().
1199 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1201 * pthread.c (__pthread_initialize_manager): Lock
1202 __pthread_manager_thread.p_lock before calling clone.
1204 2000-05-05 H.J. Lu <hjl@gnu.org>
1206 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1207 have acquire semantics.
1208 (__compare_and_swap_with_release_semantics): New inline
1210 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1212 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1214 * manager.c: Fix the problem with signals at startup.
1215 Change the way that thread stacks are allocated on IA64.
1216 Clean up some of the guard page allocation stuff.
1218 1999-12-19 H.J. Lu <hjl@gnu.org>
1220 * internals.h (page_roundup): New.
1221 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1223 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1224 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1227 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1229 * manager.c (pthread_allocate_stack): Unmap the stack top
1230 if failed to map the stack bottom.
1232 (pthread_free): Fix the guard page.
1234 * pthread.c (pthread_initialize): Set rlimit correctly for
1235 NEED_SEPARATE_REGISTER_STACK.
1237 1999-12-16 H.J. Lu <hjl@gnu.org>
1239 * pthread.c (__pthread_initialize_manager): Pass
1240 __pthread_manager_thread_bos instead of
1241 __pthread_manager_thread_tos to __clone2.
1243 1999-12-16 H.J. Lu <hjl@gnu.org>
1245 * manager.c (pthread_allocate_stack): Correct the calculation
1246 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1249 1999-12-13 H.J. Lu <hjl@gnu.org>
1251 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1252 bit after setting ar.ccv.
1254 1999-12-12 H.J. Lu <hjl@gnu.org>
1256 * manager.c (pthread_allocate_stack): Make the starting
1257 address of the stack bottom page aligned. FIXME: it may
1258 need changes in other places.
1259 (pthread_handle_create): Likewise.
1261 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1263 * manager.c (pthread_allocate_stack): Handle
1264 NEED_SEPARATE_REGISTER_STACK.
1265 (pthread_handle_create): Likewise.
1266 * pthread.c (__pthread_initialize_manager): Likewise.
1268 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1270 1999-12-02 H.J. Lu <hjl@gnu.org>
1272 * sysdeps/ia64/pt-machine.h: New.
1274 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1276 * wrapsyscall.c: Mark non-__ protected names as weak.
1279 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1281 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1283 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1285 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1286 Add tests also to new alternative spinlock implementation.
1287 * spinlock.h: Likewise.
1288 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1290 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1292 * Version: Export __sigaction.
1293 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1295 * pthread.c: Use __libc_sigaction instead of __sigaction.
1297 * condvar.c: Implement pthread_condattr_getpshared and
1298 pthread_condattr_setpshared.
1299 * mutex.c: Implement pthread_mutexattr_getpshared and
1300 pthread_mutexattr_setpshared.
1301 * Versions: Export new functions.
1302 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1304 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1305 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1308 2000-07-04 Greg McGary <greg@mcgary.org>
1310 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1311 pragmas. Include bp-sym.h only if _LIBC.
1313 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1315 * spinlock.c (__pthread_unlock): Properly place write barrier.
1316 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1318 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1320 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1321 faster on SMP systems. No more emulation of compare&swap for adaptive
1323 * spinlock.h: Likewise.
1324 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1325 Replace fast with adaptive mutex.
1326 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1327 * condvar.c: Likewise.
1328 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1329 * internals.h: Declare __pthread_smp_kernel.
1330 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1331 _pthread_fastlock structure.
1332 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1334 * pthread.c: Remove initialization to zero from global variables.
1336 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1338 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1340 2000-06-28 Greg McGary <greg@mcgary.org>
1342 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1343 pthread functions that have pointers in their return+arg signatures.
1345 2000-06-27 Greg McGary <greg@mcgary.org>
1347 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1348 extern declarations of pthread functions that have pointers in
1349 their return+arg signatures.
1351 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1353 * Makefile (tests): Add ex11. Add rules to build it.
1354 * Examples/ex11.c: New file.
1355 * rwlock.c: Fix complete braindamaged previous try to implement
1358 * spinlock.c: Pretty print.
1360 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1362 * Makefile (tests): Add ex10. Add rules to build it.
1363 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1364 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1365 * condvar.c (pthread_cond_wait): Allow mutex of kind
1366 PTHREAD_MUTEX_TIMED_NP.
1367 (pthread_cond_timedwait_relative): Likewise.
1368 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1369 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1370 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1371 (__pthread_mutex_lock): Use __pthread_alt_lock for
1372 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1373 (__pthread_mutex_timedlock): New function.
1374 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1375 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1376 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1377 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1378 * spinlock.c: Implement alternate fastlocks.
1379 * spinlock.h: Add prototypes.
1380 * Examples/ex10.c: New file.
1381 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1382 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1384 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1385 (__pthread_rwlock_timedrdlock): New function.
1386 (__pthread_rwlock_timedwrlock): New function.
1387 Use laternate fastlock function everywhere.
1389 2000-06-21 Andreas Jaeger <aj@suse.de>
1391 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1394 * join.c: Include <stdlib.h> for exit prototype.
1396 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1398 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1400 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1401 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1403 * Makefile (libpthread-routines): Add barrier.
1404 (tests): Add ex9. Add rule to build ex9.
1405 * Versions: Export barrier functions.
1406 * barrier.c: New file.
1407 * Examples/ex9.c: New file.
1408 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1409 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1410 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1412 2000-06-19 H.J. Lu <hjl@gnu.org>
1414 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1415 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1416 (compare_and_swap_with_release_semantics): New. Default to
1417 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1420 * spinlock.c (__pthread_unlock): Call
1421 compare_and_swap_with_release_semantics () instead of
1422 compare_and_swap ().
1424 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1426 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1428 * sysdeps/pthread/timer_delete.c: Likewise.
1429 * sysdeps/pthread/timer_getoverr.c: Likewise.
1430 * sysdeps/pthread/timer_gettime.c: Likewise.
1431 * sysdeps/pthread/timer_settime.c: Likewise.
1433 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1435 Timer nodes are now reference counted, and can be marked
1436 as deleted. This allows for the safe release of the global mutex
1437 in the middle without losing the timer being operated on.
1439 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1440 member is now an enum with three values, so that an intermediate
1441 state can be represented (deleted but not free for reuse yet).
1442 New refcount member added.
1443 * sysdeps/pthread/timer_routines.c: Likewise.
1445 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1446 timer_valid): New inline functions added.
1448 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1449 restructured, recursive deadlock bug fixed.
1451 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1452 timer_addref to ensure that timer won't be deleted while mutex is not
1453 held. Also uses timer_invalid to perform validation of timer handle.
1454 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1455 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1457 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1459 * shlib-versions: Add entry for SH.
1460 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1462 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1464 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1465 tightened up some critical regions and micro-optimized some list
1468 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1469 Returns int value now to indicate whether timer was queued at head.
1470 * sysdeps/pthread/posix-timer.h: Likewise.
1471 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1472 new return value from __timer_thread_queue_timer to avoid waking
1473 up timer thread unnecessarily.
1475 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1476 inuse flag, because this requires mutex to be held. Callers updated
1477 to do the check when they have the mutex.
1478 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1480 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1481 regions: avoids making system calls while holding timer mutex, and
1482 a few computations were moved outside of the mutex as well.
1483 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1485 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1486 to list_unlink_ip, meaning idempotent. Pointer manipulation
1487 changed to get better better code out of gcc.
1488 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1489 version of list_unlink added here.
1490 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1491 function in all places: idempotent one for timers, non-idempotent
1492 one for thread nodes.
1493 * sysdeps/pthread/timer_settime: Likewise.
1494 * sysdeps/pthread/timer_routines.c: Likewise.
1496 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1498 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1499 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1501 * sysdeps/pthread/Makefile: Remove tests definition.
1503 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1504 Yutaka Niibe <gniibe@chroot.org>
1506 * sysdeps/sh/pspinlock.c: New file.
1507 * sysdeps/sh/pt-machine.h: New file.
1509 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1511 * Makefile (tests): Add joinrace.
1513 * Examples/ex6.c: Test return value of pthread_join.
1515 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1517 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1518 (__pthread_spin_trylock): Implement.
1519 (__pthread_spin_unlock): Implement.
1520 (__pthread_spin_init): Implement.
1521 (__pthread_spin_destroy): Implement.
1523 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1525 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1526 really append the entry.
1528 2000-06-10 Andreas Jaeger <aj@suse.de>
1530 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1532 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1534 * sysdeps/pthread/timer_create.c: Thread matching now done on
1535 clock type as well as thread attributes.
1536 There are individual global signal-delivering threads for
1537 different clock types.
1538 * sysdeps/pthread/posix-timer.h: Likewise.
1539 * sysdeps/pthread/timer_routines.c: Likewise.
1541 * sysdeps/pthread/timer_routines.c: Thread allocation and
1542 deallocation function now remembers to put thread on active
1543 list and remove from active list.
1544 Thus now the feature of binding multiple timers
1545 to a single thread actually works.
1547 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1549 * pthread.c (__pthread_create_2_1): Optimize a bit.
1551 * internals.h (invalid_handle): Also test for p_terminated != 0.
1552 (nonexisting_handle): New function. Same as old invalid_handle.
1553 * join.c (pthread_join): Use nonexisting_handle instead of
1554 invalid_handle to test for acceptable thread handle.
1555 * manager.c (pthread_handle_free): Likewise.
1556 * joinrace.c: New file.
1557 Reported by Permaine Cheung <pcheung@cygnus.com>.
1559 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1561 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1562 Correct handling of matching variable.
1564 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1567 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1568 Be prepared for empty timer list.
1570 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1571 CPUTIME clock ID. Add support for thread clocks.
1573 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1574 subtraction were switched.
1576 * sysdeps/pthread/timer_routines.c (init_module): Use
1577 THREAD_MAXNODES threads.
1579 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1580 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1581 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1582 with sigqueueinfo is this system call is available.
1584 * sysdeps/pthread/timer_create.c (timer_create): Allow
1585 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1587 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1589 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1591 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1593 * sysdeps/pthread/posix-timer.h: New file.
1594 * sysdeps/pthread/timer_create.c: New file.
1595 * sysdeps/pthread/timer_delete.c: New file.
1596 * sysdeps/pthread/timer_getoverr.c: New file.
1597 * sysdeps/pthread/timer_gettime.c: New file.
1598 * sysdeps/pthread/timer_routines.c: New file.
1599 * sysdeps/pthread/timer_settime.c: New file.
1600 * sysdeps/pthread/tst-timer.c: New file.
1602 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1605 LINK_MAX definitions if necessary.
1607 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1609 Added missing fork time handling of global libio lock.
1611 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1612 not just the individual stream locks. Rewritten to use new
1613 iterator interface provided by libio rather than accessing
1616 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1617 which lock and unlock the stream list using the new interface
1619 * internals.h: Likewise.
1621 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1622 and __funlockfilelist in the parent after the fork.
1623 Child still calls __fresetlockfiles as before.
1625 * linuxthreads.texi: Now explains what happens to streams at
1626 fork time. Also whole new section on forking and thread added.
1627 Definition of pthread_atfork moved out of Miscellaneous Functions
1628 to this new section.
1630 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1632 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1633 Add missing register.
1634 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1636 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1638 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1639 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1640 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1642 2000-05-31 Andreas Jaeger <aj@suse.de>
1644 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1646 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1648 * spinlock.c (__pthread_lock): Remove ASSERT.
1650 * Makefile (tests): Add ex8.
1651 * Examples/ex8.c: New file.
1653 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1655 Bugfix: The pthread_atfork mechanism now takes care of its
1656 own internal mutex at fork time.
1658 * ptfork.c (__fork): Revised so that the mutex is held across
1659 the fork operation and while the handlers are called, and so that
1660 the child resets the mutex.
1662 * linuxthreads.texi: Updated pthread_atfork documentation to make
1663 it clear that fork and pthread_atfork can't be reentered from
1664 atfork handlers, that pthread_atfork and fork are mutually atomic,
1665 and that the handlers are inherited by the child process.
1667 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1669 * Makefile (libpthread-routines): Add pspinlock.
1670 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1671 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1672 * condvar.c: Likewise.
1673 * internals.h: Likewise.
1675 * manager.c: Likewise.
1676 * mutex.c: Likewise.
1677 * pthread.c: Likewise.
1678 * rwlock.c: Likewise.
1679 * semaphore.c: Likewise.
1680 * signals.c: Likewise.
1681 * spinlock.h: Likewise.
1682 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1683 * sysdeps/alpha/pspinlock.c: New file.
1684 * sysdeps/arm/pspinlock.c: New file.
1685 * sysdeps/i386/pspinlock.c: New file.
1686 * sysdeps/m68k/pspinlock.c: New file.
1687 * sysdeps/mips/pspinlock.c: New file.
1688 * sysdeps/powerpc/pspinlock.c: New file.
1689 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1690 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1691 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1692 back to _pthread_fastlock. Define new pthread_spinlock_t.
1694 2000-05-24 Andreas Jaeger <aj@suse.de>
1696 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1698 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1700 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1702 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1704 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1706 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1708 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1709 object state is represented with additional bits which distinguish
1710 whether that state was set up in the current process, or
1711 in an ancestor process. If that state was set in an ancestor,
1712 it means that a fork happened while thread was executing the init
1713 function. In that case, the state is reset to NEVER.
1714 * mutex.c (__pthread_once_fork_prepare): New function.
1715 (__pthread_once_fork_child): Likewise
1716 (__pthread_once_fork_parent): Likewise
1717 (__pthread_reset_pthread_once): Removed.
1718 * ptfork.c (__fork): Call new handlers in mutex.c.
1719 * internals.h: Declarations of new mutex.c functions added.
1720 Declaration of removed function deleted.
1721 * linuxthreads.texi: Updated documentation about pthread_once
1722 to clarify what happens under cancellation and forking.
1724 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1726 * internals.h: New thread manager request type, REQ_KICK.
1727 * join.c (pthread_exit): main thread now calls exit() instead
1728 of _exit() in order to proper process cleanup.
1729 * manager.c (__pthread_manager): Do not terminate manager
1730 after unblocking main thread; wait for main thread's
1731 REQ_PROCESS_EXIT request instead.
1732 Also, added REQ_KICK case to handle new request; this just does
1734 * manager.c (pthread_exited): Do not terminate manager after
1735 unblocking main thread.
1736 * manager.c (__pthread_manager_sighandler): If the main thread
1737 is waiting for all other threads to die, send a REQ_KICK into
1738 the thread manager request pipe to get it to clean out the threads
1739 and unblock the main thread as soon as possible. This fixes
1740 the 2000 millisecond hang on shutdown bug.
1741 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1742 including the main one call pthread_exit(), or implicitly do so.
1743 * Makefile (tests): Add ex7.
1745 2000-05-05 Andreas Jaeger <aj@suse.de>
1747 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1748 (pthread_getcpuclockid): Correct test for ourselves.
1750 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1752 * internals.h (struct _pthread_descr_struct): Reorganization.
1753 Allocate room for 16 pointers at head of the structure for future
1754 thread-local data handling. Move p_self member in this area.
1755 * manager.c (pthread_handle_create): Adjust use of p_self.
1756 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1757 * pthread.c (__pthread_initial_thread): Adjust initialization.
1758 (__pthread_manager_thread): Likewise.
1760 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1762 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1763 for eventmask larger than 1 word.
1765 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1767 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1768 * pthread.c (__pthread_initialize_minimal): New function. Perform
1769 minimal initialization.
1770 (pthread_initialize): Remove this code here.
1771 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1772 are working around the problem in glibc.
1774 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1776 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1777 now. First gcc must be fixed (more concrete: libgcc).
1779 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1781 * pthread.c: Remove special treatement for interrupt handlers on x86.
1782 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1783 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1785 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1787 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1789 * join.c (pthread_exit): Set p_terminated after reporting the
1790 termination event instead of before.
1792 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1794 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1797 2000-04-18 Andreas Jaeger <aj@suse.de>
1799 * Versions: Use ld instead of ld.so.
1801 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1803 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1804 Remove the typedef keyword.
1806 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1808 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1810 (READ_MEMORY_BARRIER): Define.
1811 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1813 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1816 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1818 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1819 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1820 use thread_handle().
1822 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1824 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1825 if fast mutex is used. Don't initialize `already_canceled' twice.
1826 Correctly test for return value of timedsuspend.
1828 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1829 therefore don't need the _rt versions of the signal handlers.
1831 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1833 * pthread.c (pthread_yield): New function.
1834 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1835 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1836 * internals.h: Declare __pthread_yield.
1838 * pthread.c (pthread_initialize): Avoid a bit more code if
1839 realtime signals are known to exist.
1841 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1842 to dynamically detect RT signals and avoid generating compatibility
1843 functions with old kernel.
1844 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1845 __pthread_restart_new directly.
1846 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1847 __pthread_wait_for_restart_signal directly.
1848 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1849 __pthread_timedsuspend_new directly.
1851 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1853 * condvar.c: Remove all the special code to handle cond_timedwait.
1854 Use timedsuspend instead.
1855 * internals.h: Declare __pthread_timedsuspend_old,
1856 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1857 Remove declaration of __pthread_init_condvar.
1858 * pthread.c: Define __pthread_timedsuspend variable.
1859 (__pthread_timedsuspend_old): New function. Timed suspension
1860 implementation for old Linux kernels.
1861 (__pthread_timedsuspend_new): New function. Timed suspension
1862 implementation for new Linux kernels.
1863 * restart.h (timedsuspend): New function. Call appropriate
1864 suspension function through __pthread_timedsuspend.
1865 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1867 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1869 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1871 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1873 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1874 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1876 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1877 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1879 2000-04-14 Andreas Jaeger <aj@suse.de>
1881 * weaks.c: Fix typo.
1883 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1884 2.2 for linuxthreads.
1886 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1888 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1889 (pthread_getcpuclockid): Fix typo.
1891 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1893 * Makefile (libpthread-routines): Add getcpuclockid.
1894 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1895 * sysdeps/pthread/getcpuclockid.c: New file.
1896 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1897 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1899 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1901 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1903 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1904 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1905 and pthread_spin_unlock.
1906 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1907 into pthread_spinlock_t. Change all uses.
1908 * spinlock.c: Implement pthread_spin_lock.
1909 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1910 alias for real name.
1911 Define pthread_spin_trylock, pthread_spin_init, and
1912 pthread_spin_destroy.
1913 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1914 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1915 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1916 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1917 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1918 and pthread_spin_unlock.
1919 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1920 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1921 * condvar.c: Likewise.
1922 * internals.h: Likewise.
1924 * manager.c: Likewise.
1925 * mutex.c: Likewise.
1926 * pthread.c: Likewise.
1927 * rwlock.c: Likewise.
1928 * semaphore.c: Likewise.
1929 * signals.c: Likewise.
1931 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1933 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1935 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1937 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1938 _POSIX_SHARED_MEMORY_OBJECTS.
1940 2000-04-11 Andreas Jaeger <aj@suse.de>
1942 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1943 (__compare_and_swap): Mark as modifying memory.
1945 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1947 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1949 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1950 Don't have the 'asm' __volatile__.
1952 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1954 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1955 * spinlock.c (__pthread_lock): Add memory barriers.
1956 (__pthread_unlock): Likewise.
1957 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1959 (RELEASE): Not needed anymore.
1960 (__compare_and_swap): Mark asm as modifying memory.
1961 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1963 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1964 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1965 (MEMORY_BARRIER): Define using stbar.
1966 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1968 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1969 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1970 Mike Burrows <m3b@pa.dec.com>.
1972 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1974 * signals.c (sigaction): Fix return value for the case SIG is one
1975 of the signals the implementation uses.
1976 Patch by Xavier.Leroy@inria.fr.
1978 2000-04-01 Andreas Jaeger <aj@suse.de>
1980 * attr.c: Use shlib-compat macros.
1981 * oldsemaphore.c: Likewise.
1982 * pthread.c: Likewise.
1983 * weaks.c: Likewise.
1985 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1987 * semaphore.c (sem_timedwait): New function.
1988 Patch by Carl Mailloux <carlm@oricom.ca>.
1989 * semaphore.h: Declare sem_timedwait.
1990 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1992 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1994 * sysdeps/pthread/Makefile: File removed.
1996 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1998 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1999 * internals.h (__pthread_reset_pthread_once): Add prototype.
2000 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2002 * manager.c (pthread_handle_create): Store ID of new thread before
2005 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2007 * attr.c: Use new macros from shlib-compat.h to define versions.
2008 * oldsemaphore.c: Likewise.
2009 * semaphore.c: Likewise.
2010 * weaks.c: Likewise.
2012 * pthread.c: Update for new SHLIB_COMPAT definition.
2014 * manager.c (__pthread_manager): Unmask debug signal.
2016 * pthread.c (pthread_initialize): Test for address of __dso_handle
2017 being NULL, not value. Use __on_exit, not on_exit.
2018 Patch by Andreas Jaeger <aj@suse.de>.
2020 * pthread.c: Use new macros from shlib-compat.h to define versions.
2022 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2024 * pthread.c (pthread_initialize): Instead of on_exit use
2025 __cxa_atexit if __dso_label is available to allow unloading the
2026 libpthread shared library.
2028 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2030 * condvar.c: Make tests for ownership of mutex less strict.
2032 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2034 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2035 current thread and return error if not.
2036 (pthread_cond_timedwait_relative_old): Likewise.
2037 (pthread_cond_timedwait_relative_new): Likewise.
2039 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2040 (pthread_once_cancelhandler): New function.
2041 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2043 2000-03-14 Andreas Jaeger <aj@suse.de>
2045 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2047 (pthread_handle_sigrestart_rt): Likewise.
2048 * signals.c (pthread_sighandler_rt): Likewise.
2050 2000-03-02 Andreas Jaeger <aj@suse.de>
2052 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2053 Reported by Sean Chen <sean.chen@turbolinux.com>.
2055 2000-02-28 Andreas Jaeger <aj@suse.de>
2057 * rwlock.c: Fix typo.
2059 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2061 * rwlock.c: Define __* variants of the functions and make old names
2063 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2064 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2066 2000-02-25 Andreas Jaeger <aj@suse.de>
2068 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2069 pwrite64, lseek64, open64, and __open64 with version 2.2.
2071 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2073 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2075 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2077 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2078 nanosleep does not work either. Get absolute time inside the
2080 (pthread_cond_timedwait_relative_new): Likewise.
2081 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2083 2000-02-13 Andreas Jaeger <aj@suse.de>
2085 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2086 (pthread_cond_timedwait_relative_old): Likewise.
2088 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2090 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2091 but keep the code around. A bug in the kernel prevent us from
2093 (pthread_cond_timedwait_relative_new): Likewise.
2094 (PR libc/1597 and libc/1598).
2096 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2098 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2099 loop around nanosleep calls instead of around most of the function
2100 (pthread_cond_timedwait_relative_new): Likewise.
2101 body. Got rid of backwards goto and one local.
2103 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2105 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2106 before every nanosleep call to account for time spent in the rest
2108 (pthread_cond_timedwait_relative_new): Likewise.
2109 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2111 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2113 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2114 from nanosleep call so that in case we restart we only wait for the
2116 (pthread_cond_timedwait_relative_new): Likewise.
2117 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2119 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2121 * manager.c (pthread_allocate_stack): Compute guard page address
2122 correctly. Patch by HJ Lu.
2124 * sysdeps/pthread/pthread.h: Define
2125 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2127 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2129 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2130 preference handling.
2131 (pthread_rwlockattr_setkind_np): Allow
2132 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2133 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2135 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2137 * internals.h (pthread_readlock_info): New structure.
2138 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2139 p_untracked_readlock_count.
2140 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2141 Add initializers for new fields.
2142 * manager.c (pthread_free): Free read/write lock lists.
2143 * queue.h (queue_is_empty): New function.
2144 * rwlock.c: Implement requirements about when readers should get
2146 * sysdeps/pthread/pthread.h
2147 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2148 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2149 Define this name as well.
2150 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2152 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2154 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2155 Adjust initializers for struct _pthread_descr_struct change.
2156 * internals.h (struct _pthread_descr_struct): Move new elements to
2159 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2161 Redesigned how cancellation unblocks a thread from internal
2162 cancellation points (sem_wait, pthread_join,
2163 pthread_cond_{wait,timedwait}).
2164 Cancellation won't eat a signal in any of these functions
2165 (*required* by POSIX and Single Unix Spec!).
2166 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2167 simultaneous condition variable signal (not required by POSIX
2168 or Single Unix Spec, but nice).
2169 * spinlock.c: __pthread_lock queues back any received restarts
2170 that don't belong to it instead of assuming ownership of lock
2171 upon any restart; fastlock can no longer be acquired by two threads
2173 * restart.h: Restarts queue even on kernels that don't have
2174 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2175 avoiding a rare race condition in pthread_cond_timedwait.
2177 1999-12-31 Andreas Jaeger <aj@suse.de>
2179 * internals.h: Remove duplicate prototype declarations.
2181 * weaks.c: Remove __THROW from prototypes since the file is not
2182 compiled by a C++ compiler.
2183 * internals.h: Likewise.
2185 1999-12-30 Andreas Jaeger <aj@suse.de>
2187 * sysdeps/pthread/pthread.h: Move internal functions to...
2188 * sysdeps/pthread/bits/libc-lock.h: ...here.
2190 1999-12-29 Andreas Jaeger <aj@suse.de>
2192 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2194 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2196 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2199 * manager.c (__pthread_start): Add one more cast to prevent
2200 warning on 64bit machines.
2202 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2204 * manager.c (pthread_handle_create): Set p_pid of new thread
2205 before calling the callback function to report a new thread.
2207 1999-12-20 Andreas Jaeger <aj@suse.de>
2209 * pthread.c (pthread_initialize): Move getrlimit call after
2212 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2214 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2215 pwrite64, lseek64, open64, and __open64.
2216 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2217 pwrite64, lseek64, open64, and __open64.
2219 * manager.c (pthread_allocate_stack): Correct computation of
2220 new_thread_bottom. Correct handling of stack size and when the
2221 rlimit method to guard for stack growth is used.
2222 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2223 minus one pagesize (not two).
2225 1999-12-03 Andreas Jaeger <aj@suse.de>
2227 * Versions: Add __res_state with version GLIBC_2.2.
2229 * errno.c (__res_state): New function to return thread specific
2232 * pthread.c (pthread_initialize): Initialize p_resp.
2233 (__pthread_reset_main_thread): Also set p_resp.
2235 * manager.c (pthread_handle_create): Initialize p_resp.
2237 * internals.h: Add thread specific resolver state.
2238 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2240 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2242 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2244 * sysdeps/i386/i686/pt-machine.h: Likewise.
2245 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2247 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2249 * manager.c (pthread_start_thread_event): Initialize p_pid already
2252 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2254 * internals.h: Add prototype for __pthread_manager_event.
2255 * manager.c (__pthread_manager_event): New function.
2256 (pthread_start_thread_event): Correct computation of self.
2257 Use INIT_THREAD_SELF.
2258 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2259 (__pthread_initialize_manager): Respect event flags also for creation
2260 of the manager thread.
2262 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2264 * pthread.c (__pthread_initialize_manager): Initialize
2265 __pthread_manager_thread.p_tid.
2267 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2269 * internals.h: Declare __pthread_last_event.
2270 * manager.c: Define __pthread_last_event.
2271 (pthread_handle_create): Set __pthread_last_event.
2272 (pthread_exited): Likewise.
2273 * join.c (pthread_exit): Likewise.
2275 * Makefile (libpthread-routines): Add events.
2276 * events.c: New file.
2277 * internals.h: Protect against multiple inclusion.
2278 Include thread_dbP.h header.
2279 (struct _pthread_descr_struct): Add new fields p_report_events and
2281 Declare event reporting functions.
2282 * join.c (pthread_exit): Signal event if this is wanted.
2283 * manager.c (__pthread_threads_events): New variable.
2284 (pthread_handle_create): Take new parameters with event information.
2285 Signal TD_CREATE event if wanted.
2286 (__pthread_manager): Adjust pthread_handle_create call.
2287 (pthread_start_thread_event): New function. Block until manager is
2288 finished and then call pthread_start_thread.
2289 (pthread_exited): Signal TD_REAP event if wanted.
2291 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2293 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2295 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2297 1999-10-25 Andreas Jaeger <aj@suse.de>
2299 * internals.h: Remove K&R compatibility.
2300 * no-tsd.c: Likewise.
2301 * semaphore.h: Likewise.
2302 * signals.c: Likewise.
2303 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2304 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2305 * weaks.c: Likewise.
2307 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2309 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2310 pthread_handle_sigcancel with functions that restore %gs from the
2311 signal context. For each signal handling function, two wrappers
2312 are required, one for a non-RT signal and one for a RT signal.
2313 * signal.c: For i386, add code to restore %gs from the signal
2314 context in pthread_sighandler and pthread_sighandler_rt.
2316 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2318 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2320 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2322 * pthread.c (__pthread_initial_thread): Pass argument to
2323 PTHREAD_START_ARGS_INITIALIZER.
2324 (__pthread_manager_thread): Likewise.
2326 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2327 initialize function.
2329 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2331 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2333 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2335 * internals.h: Correct return types for __libc_read and __libc_write.
2337 1999-10-09 Andreas Jaeger <aj@suse.de>
2339 * internals.h: Add __new_sem_post to get prototype in
2340 manager.c; include semaphore.h for needed types.
2342 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2344 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2345 directly instead of calling sem_post which should not be necessary
2346 but is faster and might help in some case to work around problems.
2347 Patch by khendricks@ivey.uwo.ca [libc/1382].
2349 1999-10-08 Andreas Schwab <schwab@suse.de>
2351 * sysdeps/pthread/Subdirs: New file.
2354 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2356 * Implies: New file.
2357 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2358 * manager.c (pthread_handle_create): Initialize p_startfct.
2359 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2361 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2363 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2364 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2365 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2367 * condvar.c (pthread_cond_timedwait_relative): Never return with
2368 EINTR. Patch by Andreas Schwab.
2370 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2372 * signals.c (sigaction): Correct last patch. Don't select
2373 pthread_sighandler_rt based on the signal number but instead of
2374 the SA_SIGINFO flag.
2376 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2378 * specific.c: Move definitions of struct pthread_key_struct and
2379 destr_function to ...
2380 * internals.h: ...here.
2382 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2384 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2385 this instead of pthread_handle_sigrestart if the signal is an RT
2388 * signals.c: Handle passing through of sighandler arguments also
2389 for real-time signals.
2391 1999-09-03 Andreas Schwab <schwab@suse.de>
2393 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2395 (__vfork): New function, alias vfork.
2396 * Versions: Export __fork, vfork, and __vfork in libpthread.
2398 1999-08-23 Andreas Schwab <schwab@suse.de>
2400 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2401 call to signal handler.
2403 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2405 * pthread.c (__pthread_reset_main_thread): Undo last change.
2406 (__pthread_kill_other_threads_np): Reset signal handlers for the
2407 signals we used in the thread implementation here.
2409 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2411 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2412 for the signals we used in the thread implementation [PR libc/1234].
2414 * Versions: Export __pthread_kill_other_threads_np from libpthread
2417 * signals.c: Pass sigcontext through wrapper to the user function.
2419 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2421 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2422 __libc_internal_tsd_set.
2424 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2426 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2429 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2431 * internals.h: Align _pthread_descr_struct to 32 bytes.
2432 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2435 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2437 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2440 1999-07-09 Cristian Gafton <gafton@redhat.com>
2442 * Makefile (libpthread-routines): Add oldsemaphore routine.
2443 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2444 sem_trywait, and sem_wait to GLIBC_2.1.
2445 * oldsemaphore.c: New file.
2446 * semaphore.c: Add default_symbol_versions for the changed functions.
2447 (__new_sem_init): Rename from sem_init.
2448 (__new_sem_post): Rename from sem_post.
2449 (__new_sem_wait): Rename from sem_wait.
2450 (__new_sem_trywait): Rename from sem_trywait.
2451 (__new_sem_getvalue): Rename from sem_getvalue.
2452 (__new_sem_destroy): Rename from sem_destroy.
2454 1999-06-23 Robey Pointer <robey@netscape.com>
2456 * internals.h: Added p_nextlock entry to separate queueing for a
2457 lock from queueing for a CV (sometimes a thread queues on a lock
2458 to serialize removing itself from a CV queue).
2459 * pthread.c: Added p_nextlock to initializers.
2460 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2462 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2464 * manager.c (pthread_handle_create): Free mmap region after stack
2465 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2467 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2469 * man/pthread_cond_init.man: Correct example.
2470 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2472 * linuxthreads.texi (Condition Variables): Likewise.
2474 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2476 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2477 casx not cas, also successful casx returns the old value in rd
2478 and not the new value.
2480 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2482 * manager.c: If pthread_create() is given a NULL attribute
2483 and the thread manager runs with a realtime policy, set the
2484 scheduling policy of the newly created thread back to SCHED_OTHER.
2485 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2486 initialize the schedpolicy field of new_thread->p_start_args
2487 to that of the calling thread.
2489 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2491 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2492 instruction does not allow memory element to use offset.
2494 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2496 * manager.c (pthread_allocate_stack): Optimize initialization of new
2499 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2500 Don't use initializer since it is all zeroes.
2501 (__libc_once_define): Likewise.
2503 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2505 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2506 doesn't exist anymore.
2507 * sysdeps/i386/Implies: Likewise.
2508 * sysdeps/m68k/Implies: Likewise.
2509 * sysdeps/mips/Implies: Likewise.
2510 * sysdeps/powerpc/Implies: Likewise.
2511 * sysdeps/sparc/sparc32/Implies: Likewise.
2512 * sysdeps/sparc/sparc64/Implies: Likewise.
2514 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2516 * sysdeps/alpha/bits/semaphore.h: Removed.
2517 * sysdeps/powerpc/bits/semaphore.h: Removed.
2518 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2519 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2520 * Makefile (headers): Remove bits/semaphore.h.
2522 * semaphore.h: Define _pthread_descr if necessary.
2523 Don't include limits.h. Define SEM_VALUE_MAX directly.
2525 (sem_t): Protect element names with leading __.
2526 Add declarations for sem_close, sem_open, and sem_unlink.
2527 * semaphore.c: Adjust all functions for new element names.
2528 Define sem_close, sem_open, and sem_unlink.
2529 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2531 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2534 1999-03-16 H.J. Lu <hjl@gnu.org>
2536 * specific.c (pthread_key_delete): Check th->p_terminated to see
2537 if the thread is running.
2539 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2540 Added to GLIBC_2.0 for libc.so.
2542 1999-02-12 H.J. Lu <hjl@gnu.org>
2544 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2545 __libc_allocate_rtsig): Added to GLIBC_2.1.
2547 * internals.h (DEFAULT_SIG_RESTART): Removed.
2548 (DEFAULT_SIG_CANCEL): Removed.
2550 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2551 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2552 (__pthread_sig_restart, __pthread_sig_cancel,
2553 __pthread_sig_debug): Initialized.
2554 (pthread_initialize): Call init_rtsigs () to initialize
2557 1999-02-03 H.J. Lu <hjl@gnu.org>
2559 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2560 Don't restart the thread which sent REQ_DEBUG.
2561 (pthread_start_thread): Check if __pthread_sig_debug > 0
2564 * pthread.c (__pthread_initialize_manager): Suspend ourself
2565 after sending __pthread_sig_debug to gdb instead of
2566 __pthread_sig_cancel.
2568 1999-01-24 H.J. Lu <hjl@gnu.org>
2570 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2571 from mask if __pthread_sig_debug > 0.
2572 (pthread_handle_create): Increment __pthread_handles_num.
2574 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2575 * pthread.c (__pthread_initialize_manager): Likewise.
2577 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2578 instead of __libc_allocate_rtsig (2).
2579 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2580 instead of __pthread_sig_cancel.
2581 (pthread_handle_sigdebug): Fix comments.
2583 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2585 * manager.c (pthread_allocate_stack): Set
2586 __pthread_nonstandard_stacks if user-specified stack is used.
2588 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2590 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2591 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2593 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2595 * pthread.c: Use a third signal __pthread_sig_debug distinct
2596 from __pthread_sig_cancel to notify gdb when a thread is
2598 * manager.c: Likewise.
2599 * internals.h: Likewise.
2600 * signals.c: The implementation of sigwait(s) assumed that
2601 all signals in s have signal handlers already attached.
2602 This is not required by the standard, so make it work
2603 also if some of the signals have no handlers.
2605 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2607 * linuxthreads.texi: Remove pointers from first @node. Move old
2608 @node spec inside comment.
2610 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2612 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2615 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2617 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2618 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2620 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2622 * manager.c: Threads now send __pthread_sig_cancel on termination.
2623 Change clone call and signal masks.
2624 * thread.c (pthread_handle_sigrestart): Remove special code for
2626 (pthread_handle_sigcancel): In manager thread call
2627 __pthread_manager_sighandler.
2628 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2629 * sysdeps/i386/i686/pt-machine.h: Likewise.
2630 Patches by Xavier Leroy.
2632 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2634 * spinlock.c (__pthread_unlock): Don't crash if called for an
2635 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2637 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2640 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2642 * Examples/ex3.c: Wait until all threads are started before
2643 searching for the number to avoid race condition on very fast
2646 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2648 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2649 declaration since it's not needed.
2651 * sysdeps/pthread/pthread.h: Move internal functions to ...
2652 * internals.h: ...here.
2654 1998-12-02 H.J. Lu <hjl@gnu.org>
2656 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2657 SIGRTMIN is defined.
2658 (__pthread_sig_cancel): Likewise.
2660 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2662 * wrapsyscall.c: Include <sys/mman.h> for msync,
2663 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2664 Correct msync declaration.
2666 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2668 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2669 __libc_tsd_set): New macros for new interface.
2670 * no-tsd.c: New file, provide uninitialized defns of
2671 __libc_internal_tsd_get and __libc_internal_tsd_set.
2672 * Makefile (routines): Add no-tsd.
2674 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2676 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2677 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2678 __libc_internal_tsd_set): Move decls to ...
2679 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2682 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2683 __libc_internal_tsd_set): Make these pointers to functions, not
2684 functions; remove #pragma weak decls for them.
2685 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2686 Define static functions and initialized pointers to them.
2688 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2690 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2691 (CFLAGS-specific.c): Likewise.
2692 (CFLAGS-pthread.c): Likewise.
2693 (CFLAGS-ptfork.c): Likewise.
2694 (CFLAGS-cancel.c): Likewise.
2695 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2696 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2698 * mutex.c (pthread_mutex_init): Define as strong symbol.
2699 (pthread_mutex_destroy): Likewise.
2700 (pthread_mutex_trylock): Likewise.
2701 (pthread_mutex_lock): Likewise.
2702 (pthread_mutex_unlock): Likewise.
2703 (pthread_mutexattr_init): Likewise.
2704 (pthread_mutexattr_destroy): Likewise.
2705 (pthread_once): Likewise.
2706 * ptfork.c (pthread_atfork): Likewise.
2707 * specific.c (pthread_key_create): Likewise.
2708 (pthread_setspecific): Likewise.
2709 (pthread_getspecific): Likewise.
2711 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2713 * linuxthreads.texi: Fix punctuation after xref.
2715 1998-11-10 H.J. Lu <hjl@gnu.org>
2717 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2718 if it is defined in <linux/limits.h>.
2720 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2722 * spinlock.h (__pthread_trylock): Define inline.
2723 (__pthread_lock): Add extra parameter to declaration. Declare
2724 using internal_function.
2725 (__pthread_unlock): Declare using internal_function.
2726 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2727 of local variable self. Avoid recomputing self. Define using
2729 (__pthread_trylock): Remove.
2730 (__pthread_unlock): Define using internal_function.
2731 * cancel.c: Adjust for __pthread_lock interface change. Use already
2732 computed self value is possible.
2733 * condvar.c: Likewise.
2735 * manager.c: Likewise.
2736 * mutex.c: Likewise.
2737 * pthread.c: Likewise.
2738 * rwlock.c: Likewise.
2739 * semaphore.c: Likewise.
2740 * signals.c: Likewise.
2742 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2744 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2745 __ to field names of the struct.
2746 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2748 (pthread_attr_t): Likewise.
2749 (pthread_cond_t): Likewise.
2750 (pthread_condattr_t): Likewise.
2751 (pthread_mutex_t): Likewise.
2752 (pthread_mutexattr_t): Likewise.
2753 (pthread_rwlock_t): Likewise.
2754 (pthread_rwlockattr_t): Likewise.
2755 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2756 * cancel.c: Likewise.
2757 * condvar.c: Likewise.
2758 * manager.c: Likewise.
2759 * mutex.c: Likewise.
2760 * pthread.c: Likewise.
2761 * ptlongjmp.c: Likewise.
2762 * rwlock.c: Likewise.
2763 * spinlock.c: Likewise.
2765 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2767 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2770 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2773 * Makefile (libpthread-routines): Add pt-machine.
2774 * pt-machine.c: New file.
2775 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2776 yet defined. Use PT_EI in extern inline definitions.
2777 * sysdeps/arm/pt-machine.h: Likewise.
2778 * sysdeps/i386/pt-machine.h: Likewise.
2779 * sysdeps/i386/i686/pt-machine.h: Likewise.
2780 * sysdeps/m68k/pt-machine.h: Likewise.
2781 * sysdeps/mips/pt-machine.h: Likewise.
2782 * sysdeps/powerpc/pt-machine.h: Likewise.
2783 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2784 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2786 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2788 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2791 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2793 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2795 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2797 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2799 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2802 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2804 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2805 array index overflow.
2807 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2809 * sysdeps/pthread/semaphore.h: New file.
2811 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2813 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2814 _LIBC_TSD_KEY_DL_ERROR.
2816 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2818 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2819 * sysdeps/i386/pt-machine.h: Likewise.
2820 Suggested by Roland McGrath.
2822 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2824 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2825 access thread data with non-constant offsets.
2826 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2829 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2830 THREAD_SETMEM_NC definitions.
2832 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2834 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2836 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2838 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2839 not already defined.
2840 (struct _pthread_descr_struct): Add p_self and p_nr field.
2841 * manager.c (__pthread_handles): Define second element to point
2843 (__pthread_handles_num): Initialize to 2.
2844 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2845 (pthread_start_thread): Likewise.
2846 (pthread_handle_create): Start search for free slot at entry 2.
2847 Initialize new fields p_self and p_nr.
2848 Call __clone with CLONE_PTRACE if available.
2849 (pthread_free): Call FREE_THREAD_SELF if available.
2850 * pthread.c (__pthread_initial_thread): Initialize new fields.
2851 (__pthread_manager_thread): Likewise.
2852 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2854 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2855 elements of the thread descriptor.
2856 * condvar.c: Likewise.
2857 * errno.c: Likewise.
2859 * manager.c: Likewise.
2860 * pthread.c: Likewise.
2861 * ptlongjmp.c: Likewise.
2862 * semaphore.c: Likewise.
2863 * signals.c: Likewise.
2864 * specific.c: Likewise.
2865 * spinlock.c: Likewise.
2867 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2869 * sysdeps/i386/useldt.h: New file.
2870 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2872 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2873 THREAD_SETMEM using __thread_self.
2874 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2876 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2878 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2879 turned out that we didn't need to queue after all.
2881 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2883 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2884 and wastes space; correct types.
2886 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2888 * signals.c (sigaction): Handle NULL argument.
2890 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2892 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2895 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2897 * Makefile (linuxthreads-version): Extract correct number from
2900 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2902 * Banner: Bump version number to 0.8
2903 * FAQ.html: Many updates, in particular w.r.t. debugging.
2904 * manager.c: Support for non-default stacksize for
2905 LinuxThreads-allocated stacks;
2906 don't use guard pages for stacks with default size, rely on
2907 rlimit(RLIMIT_STACK) instead (it's cheaper).
2909 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2910 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2911 * condvar.c: Likewise.
2912 * internals.h: Likewise.
2913 * restart.h: Likewise.
2914 * signals.c: Likewise.
2915 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2917 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2919 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2920 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2921 * Versions: Put __pthread_mutexattr_settype under version
2922 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2923 __pthread_mutexattr_gettype.
2925 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2927 * sysdeps/pthread/bits/libc-lock.h: Make
2928 __pthread_mutexattr_settype weak. Don't make
2929 __pthread_mutexattr_setkind_np weak.
2931 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2933 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2934 call can succeed here.
2936 * mutex.c: Define __pthread_mutexattr_settype and make
2937 __pthread_mutexattr_setkind_np an alias.
2938 Likewise for __pthread_mutexattr_gettype.
2940 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2942 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2945 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2947 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2949 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2951 * Examples/ex6.c: Include <unistd.h> for usleep.
2953 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2955 * Examples/ex4.c (main): Use exit, not pthread_exit.
2957 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2959 * Versions: Add __pthread_mutexattr_gettype and
2960 __pthread_mutexattr_settype.
2961 * lockfile.c: Use __pthread_mutexattr_settype instead of
2962 __pthread_mutexattr_setkind_np.
2963 * mutex.c: Define __pthread_mutexattr_gettype and
2964 __pthread_mutexattr_settype.
2966 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2967 __pthread_mutexattr_settype.
2968 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2969 Use __pthread_mutexattr_settype.
2971 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2973 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2974 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2975 pthread_mutexattr_settype.
2976 * sysdeps/pthread/pthread.h: Declare these functions.
2977 Move pthread_sigmask and pthread_kill declaration in separate header.
2978 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2980 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2982 * Makefile: Add rules to compile and run tests.
2983 * Examples/ex1.c: Little changes to fix warnings.
2984 * Examples/ex2.c: Likewise.
2985 * Examples/ex3.c: Likewise.
2986 * Examples/ex4.c: Likewise.
2987 * Examples/ex5.c: Likewise.
2988 * Examples/ex6.c: New file.
2990 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2992 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2994 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2996 * attr.c: Include <string.h>.
2998 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3000 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3001 * internals.h: Include limits.h.
3002 * manager.c: Use memcpy to copy sched_param.
3003 * ptfork.c: Include errno.h.
3004 * pthread.c: Likewise.
3005 * semaphore.c: Likewise.
3006 * specific.c: Likewise.
3007 * spinlock.h: Likewise.
3008 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3009 type definition to ...
3010 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3012 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3014 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3016 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3017 as macros as demanded in POSIX.1, Annex C.
3019 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3021 * internals.h (struct pthread_request): For free use pthread_t
3022 instead of pthread_descr.
3023 * join.c (pthread_join): Pass thread_id, not th to manager.
3024 (pthread_detach): Likewise.
3025 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3026 (pthread_exited): Remove detached queue code.
3027 (pthread_handle_free): Expect thread ID parameter and use it to
3028 validate the thread decsriptor. Don't use detached queue.
3029 Patches by Xavier Leroy.
3031 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3033 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3034 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3035 __pthread_atfork, __pthread_key_create, __pthread_once.
3036 * internals.h: Doc fix.
3037 * pthread.c (__pthread_initialize): Define again.
3039 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3041 * manager.c (pthread_exited): If thread is not detached put it on
3043 (pthread_handle_free): If thread is not on list with living threads
3044 search on list with detached threads.
3046 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3047 for new definition of pthread_rwlock_t.
3049 * spinlock.c: Correct test whether to compile
3050 __pthread_compare_and_swap or not.
3052 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3054 * attr.c: Finish user stack support. Change locking code to be safe
3055 in situations with different priorities.
3056 * cancel.c: Likewise.
3057 * condvar.c: Likewise.
3058 * internals.h: Likewise.
3060 * manager.c: Likewise.
3061 * mutex.c: Likewise.
3062 * pthread.c: Likewise.
3063 * ptlongjmp.c: Likewise.
3064 * queue.h: Likewise.
3065 * rwlock.c: Likewise.
3066 * semaphore.c: Likewise.
3067 * semaphore.h: Likewise.
3068 * signals.c: Likewise.
3069 * spinlock.c: Likewise.
3070 * spinlock.h: Likewise.
3071 * sysdeps/pthread/pthread.h: Likewise.
3072 Patches by Xavier Leroy.
3074 * sysdeps/i386/i686/pt-machine.h: New file.
3076 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3078 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3079 [sg]et_stackaddr prototypes always available.
3081 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3082 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3084 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3086 * manager.c (pthread_free): Undo patch from 980430.
3087 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3089 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3091 * manager.c: Define __pthread_manager_adjust_prio and use it to
3092 increase priority when needed.
3093 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3094 * mutex.c: Optimize mutexes to wake up only one thread.
3095 * pthread.c: Move PID of manager for global variable in structure
3097 Patches by Xavier Leroy.
3099 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3101 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3103 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3105 * attr.c: Correct typo.
3107 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3109 * manager.c (pthread_free): Unmap guard before the stack.
3110 Patch by Matthias Urlichs.
3112 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3114 * manager.c (pthread_free): Detect already free child.
3115 Patch by Xavier Leroy, reported by Matthias Urlichs.
3117 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3119 * Makefile (linuxthreads-version): Renamed back from
3122 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3124 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3127 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3129 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3130 * internals.h: Add definitions for new spinlock implementation.
3131 * ptlongjmp.c: New file.
3132 * spinlock.c: New file.
3133 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3134 new function __pthread_acquire to prevent deadlocks with thread
3135 with different priorities.
3136 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3138 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3140 * manager.c (__pthread_manager): Reduce first argument to select
3141 to include just the needed file descriptor.
3143 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3145 * manager.c: Fix last patch which caused core dumps.
3147 * pthread.c: Correctly handle missing SIGRTMIN.
3149 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3151 * libpthread.map: Add __libc_internal_tsd_get and
3152 __libc_internal_tsd_set. Add missing cancelable functions. Export
3153 libc internal versions of the cancelable functions.
3155 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3157 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3159 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3161 * attr.c: Implement pthread_attr_[gs]etguardsize,
3162 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3163 Change pthread_attr_init to have two interfaces.
3164 * internals.h (struct _pthread_descr_struct): Add new fields for
3166 * libpthread.map: Add names in GLIBC_2.1 section.
3167 * manager.c (pthread_handle_create): Implement guardsize and
3169 (pthread_free): Likewise.
3170 * pthread.c (pthread_create): Add new interface for changed
3172 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3173 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3176 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3178 * manager.c: Enable resetting of the thread scheduling policy
3179 to SCHED_OTHER when the parent thread has a different one.
3181 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3183 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3184 _POSIX_ASYNCHRONOUS_IO.
3186 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3188 * mutex.c: Implement new mutex types.
3190 * internals.h: Include <signal.h>.
3192 * libpthread.map: Add __erno_location and __h_errno_location.
3194 * errno.c: Return pointer to variable actually in use. This might
3195 not be the one in the thread structure.
3196 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3198 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3199 of manager thread structure.
3200 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3202 * pthread.c: Adapt initializer for thread structures.
3203 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3204 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3205 current thread to global variables.
3207 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3209 * rwlock.c: New file.
3210 * Makefile (libpthread-routines): Add rwlock.
3211 * sysdeps/pthread/pthread.h: Define data structures and declare
3213 * libpthread.map: Add new functions.
3215 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3217 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3218 * sysdeps/arm/Implies: likewise.
3219 * README: Document it.
3221 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3223 * signals.c: Remove unneeded initializer for sigwaited, saving a
3226 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3228 * semaphore.c (sem_init): Set sem_spinlock only if available.
3230 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3232 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3233 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3235 * Makefile: Update from LinuxThreads 0.7.
3236 * internals.h. Likewise.
3237 * manager.c: Likewise.
3238 * mutex.c: Likewise.
3239 * pthread.c: Likewise.
3240 * signals.c: Likewise.
3241 * specific.c: Likewise.
3242 * Examples/ex3.c: Likewise.
3244 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3246 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3249 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3251 * wrapsyscall.c: Add socket functions which are also cancelation
3254 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3256 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3257 New functions for fast thread specific data within libc.
3259 * internals.h: Add new array p_libc_specific to struct
3260 _pthread_descr_struct.
3262 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3264 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3266 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3267 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3269 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3271 * internals.h (struct _pthread_descr_struct): Add definitions for
3272 two-level specific key handling.
3273 * manager.c (pthread_handle_create): Initialize specific memory array.
3274 * specific.c: Implement two-level key handling.
3275 * weaks.c: Don't provide dummy key handling.
3276 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3277 Add definition of __libc_key_t.
3278 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3280 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3281 PTHREAD_DESTRUCTOR_ITERATIONS.
3283 * manager.c (pthread_handle_create): Compare mmap result with
3286 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3287 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3289 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3291 sysdeps/sparc -> sysdeps/sparc/sparc32
3292 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3294 * internals.h: Change definition of THREAD_SELF to be an expression,
3295 not a statement that did a return.
3296 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3297 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3298 Follow Solaris and use a "system reserved" register (%g6) to hold
3299 the thread descriptor.
3300 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3302 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3304 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3305 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3306 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3308 * semaphore.c: Include spinlock.h only when needed.
3310 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3311 keys for entries not in use.
3313 * weaks.c: Implement key handling functions for real.
3315 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3317 Initial sparc64-linux support:
3318 * sysdeps/sparc64/Implies: New file.
3319 * sysdeps/sparc64/pt-machine.h: Likewise.
3321 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3323 * semaphore.c: Include spinlock.h at correct place.
3326 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3328 The Great Bit File Move:
3329 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3330 * sysdeps/powerpc/semaphorebits.h: Likewise.
3331 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3332 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3333 * sysdeps/pthread/libc-lock.h: -> bits/
3334 * sysdeps/pthread/stdio-lock.h: Likewise.
3335 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3336 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3337 * semaphore.h: Likewise.
3338 * sysdeps/pthread/pthread.h: Likewise.
3340 * lockfile.c: <foo.h> -> <bits/foo.h>.
3341 * semaphore.h: Likewise.
3343 * Makefile: (headers): foo.h -> bits/foo.h.
3344 * sysdeps/pthread/Makefile: Likewise.
3346 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3348 * semaphore.c (sem_init): Set sem_spinlock only if available.
3350 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3353 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3355 Update from LinuxThreads 0.6.
3357 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3358 and __sched_get_priority_min instead of names without `__'.
3360 * manager.c: Rewrite large parts to implement opaque pthread_t.
3362 * cancel.c: Adapt for opaque pthread_t type.
3363 * condvar.c: Likewise.
3364 * errno.c: Likewise.
3366 * mutex.c: Likewise.
3367 * pthread.c: Likewise.
3368 * signals.c: Likewise.
3369 * specific.c: Likewise.
3370 * restart.h: Likewise.
3371 * queue.h: Likewise.
3372 * Examples/ex3.c: Likewise.
3373 * Examples/ex4.c: Likewise.
3374 * sysdeps/pthread/pthread.h: Likewise.
3376 * pthread.c: Accumulate time for all threads in thread manager.
3378 * semaphore.c: Implement fallback implementation for architectures
3379 sometimes missing compare-exchange operations.
3381 * cancel.c (pthread_cancel): Validate handle argument.
3382 * join.c (pthread_join): Likewise.
3383 (pthread_detach): Likewise.
3384 * signals.c (pthread_kill): Likewise.
3386 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3388 * queue.h (enqueue): Enqueue thread according to priority.
3390 * internals.c (struct pthread_start_args): New struct for passing
3391 args to cloning function.
3392 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3395 * Examples/Makefile (clean): Pass -f option to rm.
3397 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3398 and define TEST_FOR_COMPARE_AND_SWAP.
3399 * sysdeps/i386/i486/pt-machine.h: Removed.
3401 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3404 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3406 * restart.h (suspend): Clear p_signal before suspending.
3407 (suspend_with_cancellation): Likewise.
3408 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3410 * weaks.c: Make __pthread_key_create return 1.
3411 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3412 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3413 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3416 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3418 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3420 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3422 * sysdeps/powerpc/Implies: Added.
3423 * sysdeps/powerpc/pt-machine.h: Added.
3424 * sysdeps/powerpc/semaphorebits.h: Added.
3426 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3428 * pthread.c (__pthread_initial_thread): Correct
3430 (__pthread_manager_thread): Likewise.
3431 Reported by Andreas Jaeger.
3433 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3435 Since sigset_t no longer fits in a register, we can't pass in the
3436 thread's initial mask so easily. Take this opportunity to simplify
3437 the clone implementation by only accepting a single void* argument.
3439 * manager.c (__pthread_manager): Put thread vitals in the thread
3440 struct instead of as arguments through clone.
3441 (pthread_start_thread): Look for them there.
3442 * internals.h (struct _pthread): Add p_initial_fn,
3443 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3444 * pthread.c (pthread_initialize_manager): Revise clone invocation.