1 2002-01-11 Andreas Schwab <schwab@suse.de>
3 * signals.c (sighandler): Initialize all elements to SIG_ERR.
4 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
6 2002-01-06 Richard Henderson <rth@redhat.com>
8 * sysdeps/alpha/elf/pt-initfini.c: New file.
10 2001-12-29 Andreas Jaeger <aj@suse.de>
12 * Examples/ex9.c: Add noreturn attribute for thread.
13 * Examples/ex10.c: Likewise.
14 * Examples/ex13.c (thread_start): Likewise.
15 * Examples/ex15.c (worker): Likewise.
17 * Examples/ex18.c: Include unistd.h for prototype of sleep.
19 2001-12-14 Ulrich Drepper <drepper@redhat.com>
21 * man/pthread_atfork.man: Adjust description of mutex handling
22 after fork for current implementation.
23 * linuxthreads.texi: Likewise [PR libc/2519].
25 2001-12-13 Andreas Schwab <schwab@suse.de>
27 * specific.c (pthread_key_delete): Don't contact the thread
28 manager if no threads have been created yet.
30 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
32 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
35 2001-11-30 Andreas Schwab <schwab@suse.de>
37 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
38 that self is the manager thread, and initialize the thread
40 (thread_self_stack) [THREAD_SELF]: New function to find self via
42 * manager.c (pthread_handle_create): Don't block cancel signal any
45 2001-11-29 Andreas Jaeger <aj@suse.de>
47 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
49 (INIT_THREAD_SELF): New.
53 (THREAD_SETMEM_NC): New.
54 (FLOATING_STACKS): Define.
55 (ARCH_STACK_MAX_SIZE): Define.
57 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
59 Bugfix to pthread_key_delete. It was iterating over the thread
60 manager's linked list of threads, behind the thread manager's
61 back causing a race. The fix is to have the manager iterate over
62 the threads instead, using a new request type for doing so.
63 * internals.h (struct pthread_request): New manager request type
65 * manager.c (pthread_for_each_thread): New function.
66 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
67 * specific.c (struct pthread_key_delete_helper_args): New type.
68 (pthread_key_delete_helper): New static function.
69 (pthread_key_delete): Use the new thread manager
70 REQ_FOR_EACH_THREAD function to iterate over the threads and set
71 the delete key slot to a null value in each thread.
72 * Examples/ex18.c: New test.
73 * Makefile (tests): Add ex18.
75 2001-11-22 Wolfram Gloger <wg@malloc.de>
77 * pthread.c (pthread_onexit_process): Don't call free
78 after threads have been asynchronously terminated.
80 * manager.c (pthread_handle_exit): Surround cancellation
81 of threads with __flockfilelist()/__funlockfilelist().
83 2001-11-26 Andreas Schwab <schwab@suse.de>
85 * manager.c (pthread_handle_create): Start the child thread with
86 the cancel signal blocked, so that it does not handle it before
87 the thread register is set up. Save errno from failed clone call.
89 2001-11-15 Ulrich Drepper <drepper@redhat.com>
91 * sysdeps/i386/i686/Implies: Removed.
92 * sysdeps/i386/i686/Versions: New file.
94 2001-10-31 Andreas Jaeger <aj@suse.de>
96 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
98 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
100 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
101 to __linuxthreads_pthread_sizeof_descr to match name used by
102 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
103 linuxthreads_db/td_symbol_list.c.
105 2001-09-22 Andreas Jaeger <aj@suse.de>
107 * linuxthreads/tst-context.c: Avoid compile warning.
109 2001-09-20 Andreas Jaeger <aj@suse.de>
111 * shlib-versions: Add x86-64.
113 2001-09-19 Andreas Jaeger <aj@suse.de>
115 * sysdeps/x86_64/Makefile: New file.
116 * sysdeps/x86_64/pspinlock.c: New file.
117 * sysdeps/x86_64/pt-machine.h: New file.
119 2001-09-12 Jakub Jelinek <jakub@redhat.com>
121 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
123 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
125 2001-09-11 Ulrich Drepper <drepper@redhat.com>
126 Wolfram Gloger <wg@malloc.de>
128 * join.c: Protect all communications from and to manager with
130 * manager.c: Likewise.
131 * pthread.c: Likewise.
132 * smeaphore.c: Likewise.
134 2001-08-29 Ulrich Drepper <drepper@redhat.com>
136 * spinlock.c (__pthread_lock): Top max_count value with
137 MAX_ADAPTIVE_SPIN_COUNT.
138 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
140 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
143 2001-08-27 Jakub Jelinek <jakub@redhat.com>
145 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
146 non-opaque type if __USE_UNIX98.
148 2001-08-26 Jakub Jelinek <jakub@redhat.com>
150 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
151 non-opaque lock types also if _IO_MTSAFE_IO is defined.
153 2001-08-23 Roland McGrath <roland@frob.com>
155 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
156 new first argument, skip the cleanup handler if it's zero.
157 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
158 (__libc_lock_define_initialized_recursive): Use it.
159 * sysdeps/pthread/bits/stdio-lock.h: File removed.
160 The sysdeps/generic file from the main tree now suffices.
162 2001-08-22 Roland McGrath <roland@frob.com>
164 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
165 instead of <pthread.h>.
166 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
167 (_IO_lock_initializer): Add braces.
168 (_IO_lock_lock): Use __libc_lock_lock_recursive.
169 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
171 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
172 (__libc_lock_define_initialized_recursive): Use it.
173 (__libc_lock_init_recursive): Likewise.
174 (__libc_lock_fini_recursive): Likewise.
175 (__libc_lock_lock_recursive): Likewise.
176 (__libc_lock_trylock_recursive): Likewise.
177 (__libc_lock_unlock_recursive): Likewise.
178 (__libc_lock_define_recursive): New macro.
180 2001-08-14 Jakub Jelinek <jakub@redhat.com>
182 * lockfile.c (__pthread_provide_lockfile): New variable.
183 * pthread.c (__pthread_require_lockfile): New variable.
184 * cancel.c (__pthread_require_lockfile): New variable.
186 2001-07-31 Ulrich Drepper <drepper@redhat.com>
188 * tst-context.c (threadfct): Initialize context before calling
191 * Examples/ex17.c: Make sure test thread is around long enough.
193 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
195 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
197 2001-07-24 Ulrich Drepper <drepper@redhat.com>
199 * tst-context.c (main): Print explanation before bailing out
200 because context handling is not supported.
202 2001-07-23 Ulrich Drepper <drepper@redhat.com>
204 * Makefile (tests): Add tst-context.
205 * tst-context.c: New file.
207 * sysdeps/pthread/bits/stdio-lock.h: Define
208 _IO_cleanup_region_start_noarg.
210 2001-07-23 Jakub Jelinek <jakub@redhat.com>
212 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
213 (ARCH_STACK_MAX_SIZE): Define.
214 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
215 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
217 2001-07-19 Jakub Jelinek <jakub@redhat.com>
219 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
221 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
222 (ARCH_STACK_MAX_SIZE): Define.
223 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
224 NEED_SEPARATE_REGISTER_STACK.
226 2001-07-16 Andreas Schwab <schwab@suse.de>
228 * Makefile (before-compile): Don't add $(objpfx)crti.o.
229 (omit-deps): Add crti.
230 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
231 it is filtered out of the link command.
233 2001-07-16 Ulrich Drepper <drepper@redhat.com>
235 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
236 to find the right value for __pthread_initial_thread_bos, it's not
237 used. If not FLOATING_STACKS first run
238 __pthread_init_max_stacksize.
240 2001-06-16 H.J. Lu <hjl@gnu.org>
242 * internals.h: Include <stackinfo.h>.
244 * attr.c: Don't include <stackinfo.h> here.
245 * cancel.c: Likewise.
246 * manager.c: Likewise.
247 * pthread.c: Likewise.
248 * ptlongjmp.c: Likewise.
250 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
252 * attr.c: Make _STACK_GROWS_UP work.
253 * internals.h: Likewise.
254 * manager.c: Likewise.
255 * pthread.c: Likewise.
257 2001-06-15 H.J. Lu <hjl@gnu.org>
259 * pthread.c (__pthread_reset_main_thread): Fix a typo.
261 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
263 * semaphore.h: Use struct _pthread_fastlock as an element of
264 sem_t instead of an identical struct.
265 * rwlock.c: Remove casts.
266 * semaphore.c: Likewise.
268 2001-04-30 Alan Modra <amodra@one.net.au>
270 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
272 2001-05-25 Bruce Mitchener <bruce@cubik.org>
274 * linuxthreads.texi: Spelling corrections.
276 2001-05-25 Ulrich Drepper <drepper@redhat.com>
278 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
279 returning successfully.
280 Patch by Gene Cooperman <gene@ccs.neu.edu>.
282 2001-05-24 Ulrich Drepper <drepper@redhat.com>
284 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
285 serious work try once whether the lock is uncontested.
286 Remove duplicate reading of __status before loop.
287 Change suggested by Hans Boehm <hans_boehm@hp.com>.
289 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
290 (__pthread_alt_trylock): Likewise.
292 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
294 Memory barrier overhaul following line by line inspection.
295 * mutex.c (pthread_once): Missing memory barriers added.
296 * pthread.c (__pthread_wait_for_restart_signal,
297 __pthread_timedsuspend_new, __pthread_restart_new): Added
298 memory barriers ``just in case'' and for documentary value.
299 * spinlock.c (__pthread_release): New inline function for releasing
300 spinlock, to complement __pthread_acquire. Includes memory
301 barrier prior to assignment to spinlock, and __asm __volatile
302 dance to prevent reordering or optimization of the spinlock access.
303 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
304 __pthread_alt_timedlock, __pthread_alt_unlock,
305 __pthread_compare_and_swap): Updated to use new __pthread_release
306 instead of updating spinlock directly.
307 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
308 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
309 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
310 Memory barrier overhaul. Lots of missing memory barriers added,
311 a couple needless ones removed.
312 * spinlock.c (__pthread_compare_and_swap): testandset optimization
313 removed, just calls __pthread_acquire, which has the new read
314 barrier in it before its testandset.
316 2001-05-20 Roland McGrath <roland@frob.com>
318 * Makeconfig: New file, variables used to be in main libc Makeconfig.
320 2001-05-09 Geoff Keating <geoffk@redhat.com>
322 * sysdeps/powerpc/pt-machine.h
323 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
324 (__compare_and_swap): Remove memory barriers.
325 (__compare_and_swap_with_release_semantics): New function.
327 2001-04-24 Andreas Jaeger <aj@suse.de>
329 * wrapsyscall.c: send* and recv* return ssize_t.
331 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
332 mutex instead of double locking it.
333 Reported by Pierre Artaud <partaud@sodatec.com>.
335 2001-04-23 Ulrich Drepper <drepper@redhat.com>
337 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
338 using #ifdef whether the clock is available.
339 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
341 * sysdeps/ia64/Versions: New file.
343 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
344 have to call __gmon_start__ in the libpthread DSO.
345 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
347 * Makefile (libpthread-routines): Add ptclock_gettime and
349 * internals.h: Don't use cpuclock-init.h definitions, use
350 hp-timing.h definitions.
351 * pthread.c: Likewise.
352 * manager.c: Likewise.
353 * ptclock_gettime.c: New file.
354 * ptclock_settime.c: New file.
355 * internals.h: Fix parameter type for __pthread_clock_gettime and
356 __pthread_clock_settime.
358 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
359 * sysdeps/i386/i586/ptclock_settime.c: Removed.
360 * sysdeps/i386/i586/Makefile: Removed.
362 2001-04-22 Ulrich Drepper <drepper@redhat.com>
364 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
365 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
367 2001-04-21 Andreas Jaeger <aj@suse.de>
369 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
370 attribute, remove statements that will never be executed.
371 (thread_func): Remove mutex_unlock call since it's never executed.
372 (thread_func): Fix comment as suggested by Jakub Jelinek.
374 * manager.c (__pthread_manager): Add noreturn
376 (pthread_start_thread): Likewise, remove return statement.
377 (pthread_start_thread_event): Likewise.
378 Add noreturn attribute for pthread_handle_exit.
379 * weaks.c: Add noreturn attribute for pthread_exit.
381 * internals.h: Add __pthread_clock_gettime and
382 __pthread_clock_settime prototypes.
384 2001-04-21 Ulrich Drepper <drepper@redhat.com>
386 * internals.h: Include <cpuclock-init.h>.
387 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
388 CPUCLOCK_VARDEF is defined.
389 * pthread.c (__pthread_initialize_minimal): Initialize
390 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
391 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
392 for new thread to current CPU clock value.
394 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
396 * sysdeps/i386/i586/Makefile: New file.
397 * sysdeps/i386/i586/Versions: New file.
398 * sysdeps/i386/i586/ptclock_gettime.c: New file.
399 * sysdeps/i386/i586/ptclock_settime.c: New file.
400 * sysdeps/i386/i686/Implies: New file.
402 2001-04-18 Jakub Jelinek <jakub@redhat.com>
404 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
405 $generated, not $postclean-generated.
407 2001-04-18 Andreas Jaeger <aj@suse.de>
409 * Makefile (otherlibs): Added.
411 2001-04-18 Jakub Jelinek <jakub@redhat.com>
413 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
415 2001-04-16 Ulrich Drepper <drepper@redhat.com>
417 * signals.c (sigwait): NSIG is no signal number. Block all
418 signals while in signal handler for signals in SET.
419 Patch by Manfred Spraul <manfred@colorfullife.com>.
421 2001-04-12 Ulrich Drepper <drepper@redhat.com>
423 * tst-cancel.c: Disable most tests. Add new test where all
424 cleanup handlers must run.
425 * Makefile (tests): Add tst-cancel again.
427 * cancel.c (__pthread_perform_cleanup): Correct condition for
428 leaving cleanup loop early.
430 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
431 all the files which use CURRENT_STACK_FRAME.
432 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
433 __builtin_frame_address.
434 * sysdeps/i386/i686/pt-machine.h: Likewise.
436 2001-04-11 Ulrich Drepper <drepper@redhat.com>
438 * Makefile (tests): Comment out tst-cancel for now.
440 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
441 temporary file in object directory.
442 * Makefile: Don't allow inlining when compiling tst-cancel.c.
443 Pass $(objpfx) to tst-cancel.
445 2001-04-11 David S. Miller <davem@redhat.com>
447 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
448 up closer to user local variables so that new cleanup heuristics work.
449 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
451 2001-04-11 Ulrich Drepper <drepper@redhat.com>
453 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
455 (_pthread_cleanup_push_defer): Likewise.
457 * tst-cancel.c (main): Fix loop printing cleanup output.
459 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
461 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
463 (__pthread_spin_trylock): Likewise.
464 * sysdeps/sh/pt-machine.h (testandset): Likewise.
466 2001-04-10 Ulrich Drepper <drepper@redhat.com>
468 * join.c (pthread_exit): Move code to new function __pthread_do_exit
469 which takes an extra parameter with the current frame pointer.
470 Call new function with CURRENT_STACK_FRAME.
471 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
472 with the new parameter.
473 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
474 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
475 this parameter as the initial value the cleanup handler records are
476 compared against. No active cleanup handler record must have an
477 address lower than the previous one and the initial record must be
478 above (below on PA) the frame address passed in.
479 (pthread_setcancelstate): Call __pthread_do_exit instead of
481 (pthread_setcanceltype): Likewise.
482 (pthread_testcancel): Likewise.
483 (_pthread_cleanup_pop_restore): Likewise.
484 * condvar.c (pthread_cond_wait): Likewise.
485 (pthread_cond_timedwait_relative): Likewise.
486 * manager.c (pthread_start_thread): Likewise.
487 * oldsemaphore.c (__old_sem_wait): Likewise.
488 * pthread.c (pthread_handle_sigcancel): Likewise.
489 * semaphore.c (__new_sem_wait): Likewise.
490 (sem_timedwait): Likewise.
491 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
492 to limit the cleanup handlers which get run.
493 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
494 for __pthread_perform_cleanup.
496 * Makefile (tests): Add tst-cancel.
497 * tst-cancel.c: New file.
499 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
501 * sysdeps/cris/pt-machine.h: New file.
502 * sysdeps/cris/pspinlock.c: New file.
504 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
506 * shlib-versions: Add case for Linux on CRIS.
508 2001-03-26 Ulrich Drepper <drepper@redhat.com>
510 * attr.c (pthread_getattr_np): Correct computation of stack size
511 for machiens with register stack.
513 * Examples/ex17.c (main): Correct detection of failed mmap call.
515 2001-03-21 Jakub Jelinek <jakub@redhat.com>
517 * pthread.c (__pthread_initialize_manager): Fix a typo.
519 2001-03-21 Jakub Jelinek <jakub@redhat.com>
521 * attr.c (__pthread_attr_setstack): Fix alignment check.
522 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
523 * Makefile (tests): Add ex17 test.
524 * Examples/ex17.c: New test.
526 2001-03-20 Ulrich Drepper <drepper@redhat.com>
528 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
529 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
530 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
532 2001-03-18 Ulrich Drepper <drepper@redhat.com>
534 * Makefile: When generating DSO link with libc_nonshared.a.
536 2001-02-26 Jakub Jelinek <jakub@redhat.com>
538 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
540 2001-02-23 Jakub Jelinek <jakub@redhat.com>
542 * internals.h (__pthread_init_max_stacksize): New prototype.
543 * attr.c (__pthread_attr_setstacksize): Call
544 __pthread_init_max_stacksize if not yet initialized.
545 * pthread.c (__pthread_init_max_stacksize): New function.
546 (__pthread_initialize_manager): Call it.
547 Patch by <dtc@cmucl.cons.org>.
549 2001-03-16 Ulrich Drepper <drepper@redhat.com>
551 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
553 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
555 * shlib-versions: Add rule for Linux on 64 bit S/390.
556 * sysdeps/s390/s390-64/pt-machine.h: New file.
557 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
559 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
561 * sysdeps/s390/pt-machine.h: Move to...
562 * sysdeps/s390/s390-32/pt-machine.h: ...here.
563 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
565 2001-03-15 Ulrich Drepper <drepper@redhat.com>
567 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
568 * attr.c: Implement pthread_getattr_np.
569 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
570 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
571 * manager.c (pthread_handle_create): Initialize p_inheritsched.
573 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
575 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
578 2001-02-20 Hans Boehm <hans_boehm@hp.com>
580 * manager.c (manager_mask): Removed static vesion. Now always local
581 to __pthread_manager().
582 (manager_mask_all): Removed completely.
583 (__pthread_manager): Remove manager_mask_all initialization.
584 (pthread_handle_create): Remove code to set and reset signal mask
585 around __clone2() calls.
587 2001-02-17 Jakub Jelinek <jakub@redhat.com>
589 * spinlock.c (__pthread_lock): Force lock->__status to be read from
590 memory on every spin.
592 2001-02-10 Andreas Jaeger <aj@suse.de>
594 * Makefile (extra-objs): New.
596 2001-02-09 Jakub Jelinek <jakub@redhat.com>
598 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
599 __pthread_initialize_minimal prototype.
601 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
603 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
605 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
607 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
609 2001-02-06 Ulrich Drepper <drepper@redhat.com>
611 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
612 broken code. Patch by Jes Sorensen.
614 2001-02-06 Andreas Jaeger <aj@suse.de>
616 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
618 * internals.h: ...here.
620 2001-02-05 Jes Sorensen <jes@linuxcare.com>
622 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
624 2001-02-02 Ulrich Drepper <drepper@redhat.com>
626 * Versions: Remove __pthread_initialize_minimal.
628 2001-02-01 Ulrich Drepper <drepper@redhat.com>
630 * Makefile: Add rules to build crti.o and make it being used in
631 building libpthread.so.
632 * sysdeps/i386/Makefile: New file.
633 * sysdeps/pthread/pt-initfini.c: New file.
635 * pthread.c: Cleanups.
637 2001-01-28 Andreas Jaeger <aj@suse.de>
639 * oldsemaphore.c (__old_sem_init): Adjust for last change.
640 * sysdeps/pthread/bits/libc-lock.h: Likewise.
641 * spinlock.c: Likewise.
643 2001-01-28 Ulrich Drepper <drepper@redhat.com>
645 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
646 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
647 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
648 * pthread.c: Likewise.
649 * spinlock.h: Likewise.
650 * sysdeps/pthread/pthread.h: Likewise.
652 2001-01-26 Ulrich Drepper <drepper@redhat.com>
654 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
655 as struct __pthread_attr_s.
657 * semaphore.h (sem_t): Cleanup namespace, rename status and
660 2001-01-13 Jakub Jelinek <jakub@redhat.com>
662 * pthread.c (pthread_onexit_process): Clear
663 __pthread_manager_thread_bos after freeing it.
664 * Makefile (tests): Add ex16.
665 * Examples/ex16.c: New file.
667 2001-01-11 Jakub Jelinek <jakub@redhat.com>
669 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
671 * pthread.c (pthread_exit_process): Rename to...
672 (pthread_onexit_process): ...this.
673 (pthread_atexit_process, pthread_atexit_retcode): New.
674 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
675 and only if HAVE_Z_NODELETE is not defined.
676 (__pthread_initialize_manager): Register pthread_atexit_retcode
679 2001-01-11 Ulrich Drepper <drepper@redhat.com>
681 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
683 2001-01-11 Jakub Jelinek <jakub@redhat.com>
685 * Makefile (tests): Add ex15.
686 * Examples/ex15.c: New test.
688 2001-01-08 Ulrich Drepper <drepper@redhat.com>
690 * pthread.c (pthread_exit_process): Free memory allocated for
693 2000-12-31 Ulrich Drepper <drepper@redhat.com>
695 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
696 (pthread_free): Always unmap the stack. It's safe now that we don't
697 use MAP_FIXED to allocate stacks.
699 2000-12-31 Ulrich Drepper <drepper@redhat.com>
701 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
703 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
705 2000-11-15 Wolfram Gloger <wg@malloc.de>
707 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
708 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
710 2000-12-27 Andreas Jaeger <aj@suse.de>
712 * Examples/ex13.c: Make local functions static.
713 * ecmutex.c: Likewise.
714 * joinrace.c: Likewise.
715 * Examples/ex14.c: Likewise.
717 * Examples/ex2.c: Make local functions static; reformat.
718 * Examples/ex1.c: Likewise.
719 * Examples/ex4.c: Likewise.
720 * Examples/ex5.c: Likewise.
721 * Examples/ex7.c: Likewise.
723 * oldsemaphore.c: Add prototypes to shut up GCC.
724 * pt-machine.c: Likewise.
726 * weaks.c: Add prototype for pthread_exit.
728 * internals.h: Add some prototypes, format prototypes and add
730 Move __libc_waitpid prototype to include/sys/wait.h.
732 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
734 * specific.c: Likewise.
735 * ptfork.c: Likewise.
737 * lockfile.c: Include internals.h to get prototypes.
738 * events.c: Likewise.
739 * sysdeps/alpha/pspinlock.c: Likewise.
740 * sysdeps/arm/pspinlock.c: Likewise.
741 * sysdeps/hppa/pspinlock.c: Likewise.
742 * sysdeps/i386/pspinlock.c: Likewise.
743 * sysdeps/ia64/pspinlock.c: Likewise.
744 * sysdeps/m68k/pspinlock.c: Likewise.
745 * sysdeps/mips/pspinlock.c: Likewise.
746 * sysdeps/powerpc/pspinlock.c: Likewise.
747 * sysdeps/s390/pspinlock.c: Likewise.
748 * sysdeps/sh/pspinlock.c: Likewise.
749 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
750 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
751 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
753 2000-12-27 Ulrich Drepper <drepper@redhat.com>
755 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
756 (__pthread_attr_getstack): Return correct address.
757 Add warnings for using pthread_attr_getstackaddr and
758 pthread_attr_setstackaddr.
760 2000-12-26 Ulrich Drepper <drepper@redhat.com>
762 * Examples/ex6.c (test_thread): Make static.
763 * Examples/ex12.c (test_thread): Make static and add noreturn
766 2000-12-18 Jes Sorensen <jes@linuxcare.com>
768 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
769 and compare_and_swap_with_release_semantics returns int not long.
771 2000-12-17 Andreas Jaeger <aj@suse.de>
773 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
775 * sysdeps/arm/pt-machine.h (testandset): Likewise.
776 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
777 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
778 * sysdeps/sh/pt-machine.h (testandset): Likewise.
779 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
780 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
782 2000-12-17 Ulrich Drepper <drepper@redhat.com>
784 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
785 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
787 2000-12-17 Andreas Jaeger <aj@suse.de>
789 * internals.h: Add prototypes for testandset and
790 __compare_and_swap to shut up gcc warnings.
792 2000-12-06 Wolfram Gloger <wg@malloc.de>
794 * join.c (pthread_detach): Allow case where the thread has already
797 2000-12-05 Andreas Jaeger <aj@suse.de>
799 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
800 * sysdeps/mips/pt-machine.h (testandset): Likewise.
801 (__compare_and_swap): Likewise.
802 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
804 2000-11-20 Jakub Jelinek <jakub@redhat.com>
806 * Examples/ex3.c (main): Cast int to long before casting to void *.
807 (search): Cast void * to long, not int.
808 * Examples/ex8.c (main, thread): Similarly.
809 * Examples/ex11.c (main): Similarly.
810 * Examples/ex14.c (worker, do_test): Similarly.
811 * ecmutex.c (worker, do_test): Similarly.
812 (nlocks): Cast to int.
814 2000-11-08 Bruce Mitchener <bruce@cubik.org>
816 * linuxthreads.texi: Add documentation for pthreads attributes
817 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
818 patch. Document pthread_[sg]etconcurrency(). Mark
819 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
821 2000-11-07 Ulrich Drepper <drepper@redhat.com>
823 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
825 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
826 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
828 2000-11-06 Ulrich Drepper <drepper@redhat.com>
830 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
831 not doing it right now.
832 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
834 2000-10-30 Ulrich Drepper <drepper@redhat.com>
836 * Examples/ex4.c (main): Don't use exit() to avoid warning with
839 2000-10-29 Ulrich Drepper <drepper@redhat.com>
841 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
842 here. Reported by Bruce Mitchener <bruce@cubik.org>.
844 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
845 discussing mutexes. (As per the Unix98 name for the API.)
846 Changes documentation for pthread_mutexattr_setkind_np() and
847 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
848 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
849 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
850 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
851 Begins to introduce discussion of the ``timed'' mutex type. This
852 discussion is currently incomplete.
853 Patch by Bruce Mitchener <bruce@cubik.org>.
855 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
856 Yutaka Niibe <gniibe@chroot.org>
858 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
859 has restrictions, use register.
861 2000-10-23 Andreas Schwab <schwab@suse.de>
863 * Examples/ex14.c (TIMEOUT): Override default timeout.
865 2000-10-16 Ulrich Drepper <drepper@redhat.com>
867 * specific.c: Protect tsd array modification in thread data
868 structures by getting the thread lock in pthread_key_delete and
869 __pthread_destroy_specifics.
870 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
872 2000-10-12 Alan Modra <alan@linuxcare.com.au>
874 * sysdeps/pthread/bits/initspin.h: New file.
875 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
876 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
877 (__pthread_alt_init_lock): Likewise.
878 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
880 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
882 * oldsemaphore.c (__old_sem_init): Release lock with
883 LT_SPINLOCK_INIT, not zero.
884 * spinlock.c (__pthread_unlock): Likewise.
885 (__pthread_alt_lock): Likewise.
886 (__pthread_alt_timedlock): Likewise.
887 (__pthread_alt_unlock): Likewise.
888 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
889 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
890 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
891 LT_SPINLOCK_INIT do initialize spinlocks not 0.
893 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
895 * shlib-versions: Add version definitions for hppa-linux.
897 2000-10-12 Alan Modra <alan@linuxcare.com.au>
899 * sysdeps/hppa/pspinlock.c: New file.
900 * sysdeps/hppa/pt-machine.h: New file.
901 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
903 2000-10-05 Jakub Jelinek <jakub@redhat.com>
905 * mutex.c (__pthread_mutex_destroy): Correct test of
906 busy mutex for mutexes using alternate fastlocks.
907 Patch by dtc@cmucl.cons.org.
909 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
911 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
913 2000-09-28 Ulrich Drepper <drepper@redhat.com>
915 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
916 test for owner first.
917 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
919 * cancel.c (pthread_cancel): Don't do anything if cancelation is
922 2000-09-26 Ulrich Drepper <drepper@redhat.com>
924 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
925 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
927 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
928 _POSIX_MONOTONIC_CLOCK.
930 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
933 2000-09-20 Andreas Jaeger <aj@suse.de>
935 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
936 "testrtsig.h" conditional.
938 2000-09-11 Ulrich Drepper <drepper@redhat.com>
940 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
941 pthread_attr_setstack.
942 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
943 pthread_attr_setstack.
944 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
946 2000-09-05 Ulrich Drepper <drepper@redhat.com>
948 * Examples/ex14.c: New file.
949 * Makefile (tests): Add ex14.
951 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
952 mutex. Patch by dtc@cmucl.cons.org.
954 * ecmutex.c: New file.
955 * Makefile (tests): Add ecmutex.
957 2000-09-04 H.J. Lu <hjl@gnu.org>
959 * attr.c (__pthread_attr_setguardsize): Use page_roundup
960 instead of roundup to round up to the page size.
962 2000-09-03 Mark Kettenis <kettenis@gnu.org>
964 * manager.c (pthread_exited): Correctly report event as TD_REAP
965 instead of TD_DEATH. Fix comments.
967 2000-09-03 Ulrich Drepper <drepper@redhat.com>
969 * spinlock.h (testandset): Add cast to avoid warning.
970 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
972 2000-09-02 Andreas Jaeger <aj@suse.de>
974 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
977 2000-09-01 Ulrich Drepper <drepper@redhat.com>
979 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
980 Fix typo in last patch (_mode -> _flags).
982 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
983 Provide definition which respects _IO_USER_LOCK flag.
985 2000-08-30 Ulrich Drepper <drepper@redhat.com>
987 * manager.c (pthread_allocate_stack): Clear descriptor only if not
990 2000-08-25 Ulrich Drepper <drepper@redhat.com>
992 * Makefile: Add rules to build and run unload.
993 * unload.c: New file.
995 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
997 * sysdeps/pthread/pthread.h
998 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
999 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1001 2000-08-24 Andreas Jaeger <aj@suse.de>
1003 * Examples/ex13.c: Include <string.h> for strerror prototype and
1004 <stdlib.h> for abort prototype.
1005 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1006 (thread_start): Remove unused variable err.
1007 (main): Silence GCC warnings.
1009 2000-08-22 Andreas Jaeger <aj@suse.de>
1011 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1013 * Makefile (tests): Add ex13.
1015 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1017 * semaphore.h: Add restrict where required by AGd4.
1018 * sysdeps/pthread/pthread.h: Likewise.
1019 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1021 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1023 * Makefile (tests): Add ex12. Add rule to build it.
1024 * Examples/ex12.c: New file.
1026 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1028 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1029 even though the implementation is not quite complete (but it reports
1030 it). Define _POSIX_MESSAGE_PASSING to -1.
1031 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1033 2000-08-12 Andreas Jaeger <aj@suse.de>
1035 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1037 (__compare_and_swap): Likewise.
1038 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1040 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1042 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1043 p_h_errnop correctly and not to NULL.
1045 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1047 * Banner: Bump version number to 0.9.
1049 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1051 * Makefile (tests): Add tststack. Add rule to build the program.
1052 * tststack.c: New file.
1054 * internals.h: Declare __pthread_max_stacksize.
1055 * pthread.c (__pthread_max_stacksize): New variable.
1056 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1058 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1059 (pthread_allocate_stack): Allow kernel to choose stack address if
1060 FLOATING_STACKS. This also handles variable-sized stacks.
1061 Always allocate stack and guardpage together. Use mprotect to
1062 change guardpage access.
1063 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1064 ARCH_STACK_MAX_SIZE.
1066 * attr.c (__pthread_attr_setstacksize): Also test value against
1069 * manager.c (__pthread_nonstandard_stacks): Define only if
1070 THREAD_SELF is not defined.
1071 (pthread_allocate_stack): Always initialize gardaddr to a correct
1073 (pthread_handle_create): Unmap thread with one call.
1074 (pthread_free): Remove test for initial thread before removing stack.
1075 Unmap stack with one call.
1077 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1078 1 to avoid removing the stack.
1080 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1082 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1083 load of spin lock to prime the cache before the atomic compare and
1084 exchange operation (cmpxchg4). This avoids the spinning on the
1085 cmpxchg4 instruction and reduces movement of the cache line back
1086 and forth between the processors (explanation by Asis K. Mallick
1087 from Intel). This basically makes the implementation operate the
1088 same as the Linux kernel implementation.
1090 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1091 * sysdeps/ia64/pspinlock.c: New file.
1093 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1095 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1096 * spinlock.h: ...here. Remove locking.
1097 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1099 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1100 (rwlock_rd_extricate_func): Don't determine self, let
1101 __pthread_lock do it.
1102 (rwlock_wr_extricate_func): Likewise.
1103 (rwlock_have_already): Optimize *pself handling a bit.
1105 * mutex.c: Use __builtin_expect.
1106 * pthread.c: Likewise.
1108 2000-08-02 Andreas Jaeger <aj@suse.de>
1110 * sysdeps/s390/pspinlock.c: New file.
1111 * sysdeps/s390/pt-machine.h: New file.
1112 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1114 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1116 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1118 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1120 2000-07-26 Andreas Jaeger <aj@suse.de>
1122 * pthread.c: Initialize p_sem_avail.
1124 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1126 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1127 * semaphore.c: Handle spurious wakeups.
1129 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1130 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1132 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1133 (__pthread_wait_for_restart): Likewise.
1135 * condvar.c (pthread_cond_wait): Also check whether thread is
1136 cancelable before aborting loop.
1137 (pthread_cond_timedwait): Likewise.
1139 * signals.c (pthread_sighandler): Remove special code to restrore
1141 (pthread_sighandler_t): Likewise.
1143 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1145 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1146 * pthread.c: Include <resolv.h>.
1147 (_res): Undefine. Add extern declaration.
1149 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1151 * pthread.c (__pthread_initial_thread): Update initializer.
1152 (__pthread_manager_thread): Likewise.
1153 (pthread_initialize): Move setrlimit call to...
1154 (__pthread_initialize_manager): ...here.
1155 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1157 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1158 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1160 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1162 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1163 __compare_and_swap to define testandset.
1164 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1165 Define IMPLEMENT_TAS_WITH_CAS.
1167 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1169 * Makefile: Pass -z nodelete to linker for libpthread.so
1170 generation if it understand this option.
1172 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1174 * manager.c (pthread_handle_create): Remove initialization of
1175 new_thread->p_res._sock.
1177 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1179 Bugfixes to the variant of the code for machines with no compare
1182 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1183 node was not being properly enqueued, due to failing to update
1184 the lock->__status field.
1186 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1187 being set inappropriately, causing the suspend function to be called
1188 with a null self pointer and crash.
1190 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1192 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1193 compare&swap is available.
1195 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1198 * pthread.c (pthread_initialize): Don't use sysconf to determine
1199 whether the machine has more than one processor.
1201 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1202 removed thread_self calls.
1204 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1206 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1207 __compare_and_swap to compare_and_swap in code which assumes
1208 compare swap is available.
1210 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1212 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1213 bug whereby thr field of waitnode structure would not be correctly
1214 set unless a null self pointer is passed to the functions.
1215 Eliminated redundant calls to thread_self().
1217 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1219 * pthread.c (__pthread_initialize_manager): Lock
1220 __pthread_manager_thread.p_lock before calling clone.
1222 2000-05-05 H.J. Lu <hjl@gnu.org>
1224 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1225 have acquire semantics.
1226 (__compare_and_swap_with_release_semantics): New inline
1228 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1230 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1232 * manager.c: Fix the problem with signals at startup.
1233 Change the way that thread stacks are allocated on IA64.
1234 Clean up some of the guard page allocation stuff.
1236 1999-12-19 H.J. Lu <hjl@gnu.org>
1238 * internals.h (page_roundup): New.
1239 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1241 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1242 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1245 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1247 * manager.c (pthread_allocate_stack): Unmap the stack top
1248 if failed to map the stack bottom.
1250 (pthread_free): Fix the guard page.
1252 * pthread.c (pthread_initialize): Set rlimit correctly for
1253 NEED_SEPARATE_REGISTER_STACK.
1255 1999-12-16 H.J. Lu <hjl@gnu.org>
1257 * pthread.c (__pthread_initialize_manager): Pass
1258 __pthread_manager_thread_bos instead of
1259 __pthread_manager_thread_tos to __clone2.
1261 1999-12-16 H.J. Lu <hjl@gnu.org>
1263 * manager.c (pthread_allocate_stack): Correct the calculation
1264 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1267 1999-12-13 H.J. Lu <hjl@gnu.org>
1269 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1270 bit after setting ar.ccv.
1272 1999-12-12 H.J. Lu <hjl@gnu.org>
1274 * manager.c (pthread_allocate_stack): Make the starting
1275 address of the stack bottom page aligned. FIXME: it may
1276 need changes in other places.
1277 (pthread_handle_create): Likewise.
1279 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1281 * manager.c (pthread_allocate_stack): Handle
1282 NEED_SEPARATE_REGISTER_STACK.
1283 (pthread_handle_create): Likewise.
1284 * pthread.c (__pthread_initialize_manager): Likewise.
1286 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1288 1999-12-02 H.J. Lu <hjl@gnu.org>
1290 * sysdeps/ia64/pt-machine.h: New.
1292 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1294 * wrapsyscall.c: Mark non-__ protected names as weak.
1297 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1299 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1301 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1303 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1304 Add tests also to new alternative spinlock implementation.
1305 * spinlock.h: Likewise.
1306 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1308 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1310 * Version: Export __sigaction.
1311 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1313 * pthread.c: Use __libc_sigaction instead of __sigaction.
1315 * condvar.c: Implement pthread_condattr_getpshared and
1316 pthread_condattr_setpshared.
1317 * mutex.c: Implement pthread_mutexattr_getpshared and
1318 pthread_mutexattr_setpshared.
1319 * Versions: Export new functions.
1320 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1322 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1323 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1326 2000-07-04 Greg McGary <greg@mcgary.org>
1328 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1329 pragmas. Include bp-sym.h only if _LIBC.
1331 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1333 * spinlock.c (__pthread_unlock): Properly place write barrier.
1334 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1336 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1338 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1339 faster on SMP systems. No more emulation of compare&swap for adaptive
1341 * spinlock.h: Likewise.
1342 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1343 Replace fast with adaptive mutex.
1344 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1345 * condvar.c: Likewise.
1346 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1347 * internals.h: Declare __pthread_smp_kernel.
1348 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1349 _pthread_fastlock structure.
1350 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1352 * pthread.c: Remove initialization to zero from global variables.
1354 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1356 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1358 2000-06-28 Greg McGary <greg@mcgary.org>
1360 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1361 pthread functions that have pointers in their return+arg signatures.
1363 2000-06-27 Greg McGary <greg@mcgary.org>
1365 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1366 extern declarations of pthread functions that have pointers in
1367 their return+arg signatures.
1369 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1371 * Makefile (tests): Add ex11. Add rules to build it.
1372 * Examples/ex11.c: New file.
1373 * rwlock.c: Fix complete braindamaged previous try to implement
1376 * spinlock.c: Pretty print.
1378 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1380 * Makefile (tests): Add ex10. Add rules to build it.
1381 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1382 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1383 * condvar.c (pthread_cond_wait): Allow mutex of kind
1384 PTHREAD_MUTEX_TIMED_NP.
1385 (pthread_cond_timedwait_relative): Likewise.
1386 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1387 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1388 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1389 (__pthread_mutex_lock): Use __pthread_alt_lock for
1390 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1391 (__pthread_mutex_timedlock): New function.
1392 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1393 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1394 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1395 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1396 * spinlock.c: Implement alternate fastlocks.
1397 * spinlock.h: Add prototypes.
1398 * Examples/ex10.c: New file.
1399 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1400 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1402 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1403 (__pthread_rwlock_timedrdlock): New function.
1404 (__pthread_rwlock_timedwrlock): New function.
1405 Use laternate fastlock function everywhere.
1407 2000-06-21 Andreas Jaeger <aj@suse.de>
1409 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1412 * join.c: Include <stdlib.h> for exit prototype.
1414 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1416 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1418 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1419 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1421 * Makefile (libpthread-routines): Add barrier.
1422 (tests): Add ex9. Add rule to build ex9.
1423 * Versions: Export barrier functions.
1424 * barrier.c: New file.
1425 * Examples/ex9.c: New file.
1426 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1427 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1428 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1430 2000-06-19 H.J. Lu <hjl@gnu.org>
1432 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1433 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1434 (compare_and_swap_with_release_semantics): New. Default to
1435 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1438 * spinlock.c (__pthread_unlock): Call
1439 compare_and_swap_with_release_semantics () instead of
1440 compare_and_swap ().
1442 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1444 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1446 * sysdeps/pthread/timer_delete.c: Likewise.
1447 * sysdeps/pthread/timer_getoverr.c: Likewise.
1448 * sysdeps/pthread/timer_gettime.c: Likewise.
1449 * sysdeps/pthread/timer_settime.c: Likewise.
1451 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1453 Timer nodes are now reference counted, and can be marked
1454 as deleted. This allows for the safe release of the global mutex
1455 in the middle without losing the timer being operated on.
1457 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1458 member is now an enum with three values, so that an intermediate
1459 state can be represented (deleted but not free for reuse yet).
1460 New refcount member added.
1461 * sysdeps/pthread/timer_routines.c: Likewise.
1463 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1464 timer_valid): New inline functions added.
1466 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1467 restructured, recursive deadlock bug fixed.
1469 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1470 timer_addref to ensure that timer won't be deleted while mutex is not
1471 held. Also uses timer_invalid to perform validation of timer handle.
1472 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1473 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1475 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1477 * shlib-versions: Add entry for SH.
1478 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1480 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1482 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1483 tightened up some critical regions and micro-optimized some list
1486 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1487 Returns int value now to indicate whether timer was queued at head.
1488 * sysdeps/pthread/posix-timer.h: Likewise.
1489 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1490 new return value from __timer_thread_queue_timer to avoid waking
1491 up timer thread unnecessarily.
1493 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1494 inuse flag, because this requires mutex to be held. Callers updated
1495 to do the check when they have the mutex.
1496 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1498 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1499 regions: avoids making system calls while holding timer mutex, and
1500 a few computations were moved outside of the mutex as well.
1501 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1503 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1504 to list_unlink_ip, meaning idempotent. Pointer manipulation
1505 changed to get better better code out of gcc.
1506 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1507 version of list_unlink added here.
1508 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1509 function in all places: idempotent one for timers, non-idempotent
1510 one for thread nodes.
1511 * sysdeps/pthread/timer_settime: Likewise.
1512 * sysdeps/pthread/timer_routines.c: Likewise.
1514 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1516 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1517 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1519 * sysdeps/pthread/Makefile: Remove tests definition.
1521 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1522 Yutaka Niibe <gniibe@chroot.org>
1524 * sysdeps/sh/pspinlock.c: New file.
1525 * sysdeps/sh/pt-machine.h: New file.
1527 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1529 * Makefile (tests): Add joinrace.
1531 * Examples/ex6.c: Test return value of pthread_join.
1533 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1535 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1536 (__pthread_spin_trylock): Implement.
1537 (__pthread_spin_unlock): Implement.
1538 (__pthread_spin_init): Implement.
1539 (__pthread_spin_destroy): Implement.
1541 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1543 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1544 really append the entry.
1546 2000-06-10 Andreas Jaeger <aj@suse.de>
1548 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1550 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1552 * sysdeps/pthread/timer_create.c: Thread matching now done on
1553 clock type as well as thread attributes.
1554 There are individual global signal-delivering threads for
1555 different clock types.
1556 * sysdeps/pthread/posix-timer.h: Likewise.
1557 * sysdeps/pthread/timer_routines.c: Likewise.
1559 * sysdeps/pthread/timer_routines.c: Thread allocation and
1560 deallocation function now remembers to put thread on active
1561 list and remove from active list.
1562 Thus now the feature of binding multiple timers
1563 to a single thread actually works.
1565 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1567 * pthread.c (__pthread_create_2_1): Optimize a bit.
1569 * internals.h (invalid_handle): Also test for p_terminated != 0.
1570 (nonexisting_handle): New function. Same as old invalid_handle.
1571 * join.c (pthread_join): Use nonexisting_handle instead of
1572 invalid_handle to test for acceptable thread handle.
1573 * manager.c (pthread_handle_free): Likewise.
1574 * joinrace.c: New file.
1575 Reported by Permaine Cheung <pcheung@cygnus.com>.
1577 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1579 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1580 Correct handling of matching variable.
1582 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1585 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1586 Be prepared for empty timer list.
1588 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1589 CPUTIME clock ID. Add support for thread clocks.
1591 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1592 subtraction were switched.
1594 * sysdeps/pthread/timer_routines.c (init_module): Use
1595 THREAD_MAXNODES threads.
1597 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1598 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1599 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1600 with sigqueueinfo is this system call is available.
1602 * sysdeps/pthread/timer_create.c (timer_create): Allow
1603 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1605 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1607 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1609 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1611 * sysdeps/pthread/posix-timer.h: New file.
1612 * sysdeps/pthread/timer_create.c: New file.
1613 * sysdeps/pthread/timer_delete.c: New file.
1614 * sysdeps/pthread/timer_getoverr.c: New file.
1615 * sysdeps/pthread/timer_gettime.c: New file.
1616 * sysdeps/pthread/timer_routines.c: New file.
1617 * sysdeps/pthread/timer_settime.c: New file.
1618 * sysdeps/pthread/tst-timer.c: New file.
1620 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1622 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1623 LINK_MAX definitions if necessary.
1625 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1627 Added missing fork time handling of global libio lock.
1629 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1630 not just the individual stream locks. Rewritten to use new
1631 iterator interface provided by libio rather than accessing
1634 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1635 which lock and unlock the stream list using the new interface
1637 * internals.h: Likewise.
1639 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1640 and __funlockfilelist in the parent after the fork.
1641 Child still calls __fresetlockfiles as before.
1643 * linuxthreads.texi: Now explains what happens to streams at
1644 fork time. Also whole new section on forking and thread added.
1645 Definition of pthread_atfork moved out of Miscellaneous Functions
1646 to this new section.
1648 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1650 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1651 Add missing register.
1652 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1654 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1656 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1657 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1658 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1660 2000-05-31 Andreas Jaeger <aj@suse.de>
1662 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1664 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1666 * spinlock.c (__pthread_lock): Remove ASSERT.
1668 * Makefile (tests): Add ex8.
1669 * Examples/ex8.c: New file.
1671 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1673 Bugfix: The pthread_atfork mechanism now takes care of its
1674 own internal mutex at fork time.
1676 * ptfork.c (__fork): Revised so that the mutex is held across
1677 the fork operation and while the handlers are called, and so that
1678 the child resets the mutex.
1680 * linuxthreads.texi: Updated pthread_atfork documentation to make
1681 it clear that fork and pthread_atfork can't be reentered from
1682 atfork handlers, that pthread_atfork and fork are mutually atomic,
1683 and that the handlers are inherited by the child process.
1685 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1687 * Makefile (libpthread-routines): Add pspinlock.
1688 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1689 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1690 * condvar.c: Likewise.
1691 * internals.h: Likewise.
1693 * manager.c: Likewise.
1694 * mutex.c: Likewise.
1695 * pthread.c: Likewise.
1696 * rwlock.c: Likewise.
1697 * semaphore.c: Likewise.
1698 * signals.c: Likewise.
1699 * spinlock.h: Likewise.
1700 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1701 * sysdeps/alpha/pspinlock.c: New file.
1702 * sysdeps/arm/pspinlock.c: New file.
1703 * sysdeps/i386/pspinlock.c: New file.
1704 * sysdeps/m68k/pspinlock.c: New file.
1705 * sysdeps/mips/pspinlock.c: New file.
1706 * sysdeps/powerpc/pspinlock.c: New file.
1707 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1708 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1709 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1710 back to _pthread_fastlock. Define new pthread_spinlock_t.
1712 2000-05-24 Andreas Jaeger <aj@suse.de>
1714 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1716 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1718 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1720 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1722 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1724 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1726 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1727 object state is represented with additional bits which distinguish
1728 whether that state was set up in the current process, or
1729 in an ancestor process. If that state was set in an ancestor,
1730 it means that a fork happened while thread was executing the init
1731 function. In that case, the state is reset to NEVER.
1732 * mutex.c (__pthread_once_fork_prepare): New function.
1733 (__pthread_once_fork_child): Likewise
1734 (__pthread_once_fork_parent): Likewise
1735 (__pthread_reset_pthread_once): Removed.
1736 * ptfork.c (__fork): Call new handlers in mutex.c.
1737 * internals.h: Declarations of new mutex.c functions added.
1738 Declaration of removed function deleted.
1739 * linuxthreads.texi: Updated documentation about pthread_once
1740 to clarify what happens under cancellation and forking.
1742 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1744 * internals.h: New thread manager request type, REQ_KICK.
1745 * join.c (pthread_exit): main thread now calls exit() instead
1746 of _exit() in order to proper process cleanup.
1747 * manager.c (__pthread_manager): Do not terminate manager
1748 after unblocking main thread; wait for main thread's
1749 REQ_PROCESS_EXIT request instead.
1750 Also, added REQ_KICK case to handle new request; this just does
1752 * manager.c (pthread_exited): Do not terminate manager after
1753 unblocking main thread.
1754 * manager.c (__pthread_manager_sighandler): If the main thread
1755 is waiting for all other threads to die, send a REQ_KICK into
1756 the thread manager request pipe to get it to clean out the threads
1757 and unblock the main thread as soon as possible. This fixes
1758 the 2000 millisecond hang on shutdown bug.
1759 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1760 including the main one call pthread_exit(), or implicitly do so.
1761 * Makefile (tests): Add ex7.
1763 2000-05-05 Andreas Jaeger <aj@suse.de>
1765 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1766 (pthread_getcpuclockid): Correct test for ourselves.
1768 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1770 * internals.h (struct _pthread_descr_struct): Reorganization.
1771 Allocate room for 16 pointers at head of the structure for future
1772 thread-local data handling. Move p_self member in this area.
1773 * manager.c (pthread_handle_create): Adjust use of p_self.
1774 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1775 * pthread.c (__pthread_initial_thread): Adjust initialization.
1776 (__pthread_manager_thread): Likewise.
1778 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1780 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1781 for eventmask larger than 1 word.
1783 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1785 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1786 * pthread.c (__pthread_initialize_minimal): New function. Perform
1787 minimal initialization.
1788 (pthread_initialize): Remove this code here.
1789 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1790 are working around the problem in glibc.
1792 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1794 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1795 now. First gcc must be fixed (more concrete: libgcc).
1797 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1799 * pthread.c: Remove special treatement for interrupt handlers on x86.
1800 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1801 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1803 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1805 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1807 * join.c (pthread_exit): Set p_terminated after reporting the
1808 termination event instead of before.
1810 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1812 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1815 2000-04-18 Andreas Jaeger <aj@suse.de>
1817 * Versions: Use ld instead of ld.so.
1819 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1821 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1822 Remove the typedef keyword.
1824 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1826 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1828 (READ_MEMORY_BARRIER): Define.
1829 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1831 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1834 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1836 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1837 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1838 use thread_handle().
1840 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1842 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1843 if fast mutex is used. Don't initialize `already_canceled' twice.
1844 Correctly test for return value of timedsuspend.
1846 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1847 therefore don't need the _rt versions of the signal handlers.
1849 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1851 * pthread.c (pthread_yield): New function.
1852 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1853 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1854 * internals.h: Declare __pthread_yield.
1856 * pthread.c (pthread_initialize): Avoid a bit more code if
1857 realtime signals are known to exist.
1859 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1860 to dynamically detect RT signals and avoid generating compatibility
1861 functions with old kernel.
1862 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1863 __pthread_restart_new directly.
1864 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1865 __pthread_wait_for_restart_signal directly.
1866 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1867 __pthread_timedsuspend_new directly.
1869 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1871 * condvar.c: Remove all the special code to handle cond_timedwait.
1872 Use timedsuspend instead.
1873 * internals.h: Declare __pthread_timedsuspend_old,
1874 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1875 Remove declaration of __pthread_init_condvar.
1876 * pthread.c: Define __pthread_timedsuspend variable.
1877 (__pthread_timedsuspend_old): New function. Timed suspension
1878 implementation for old Linux kernels.
1879 (__pthread_timedsuspend_new): New function. Timed suspension
1880 implementation for new Linux kernels.
1881 * restart.h (timedsuspend): New function. Call appropriate
1882 suspension function through __pthread_timedsuspend.
1883 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1885 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1887 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1889 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1891 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1892 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1894 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1895 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1897 2000-04-14 Andreas Jaeger <aj@suse.de>
1899 * weaks.c: Fix typo.
1901 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1902 2.2 for linuxthreads.
1904 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1906 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1907 (pthread_getcpuclockid): Fix typo.
1909 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1911 * Makefile (libpthread-routines): Add getcpuclockid.
1912 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1913 * sysdeps/pthread/getcpuclockid.c: New file.
1914 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1915 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1917 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1919 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1921 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1922 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1923 and pthread_spin_unlock.
1924 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1925 into pthread_spinlock_t. Change all uses.
1926 * spinlock.c: Implement pthread_spin_lock.
1927 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1928 alias for real name.
1929 Define pthread_spin_trylock, pthread_spin_init, and
1930 pthread_spin_destroy.
1931 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1932 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1933 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1934 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1935 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1936 and pthread_spin_unlock.
1937 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1938 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1939 * condvar.c: Likewise.
1940 * internals.h: Likewise.
1942 * manager.c: Likewise.
1943 * mutex.c: Likewise.
1944 * pthread.c: Likewise.
1945 * rwlock.c: Likewise.
1946 * semaphore.c: Likewise.
1947 * signals.c: Likewise.
1949 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1951 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1953 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1955 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1956 _POSIX_SHARED_MEMORY_OBJECTS.
1958 2000-04-11 Andreas Jaeger <aj@suse.de>
1960 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1961 (__compare_and_swap): Mark as modifying memory.
1963 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1965 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1967 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1968 Don't have the 'asm' __volatile__.
1970 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1972 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1973 * spinlock.c (__pthread_lock): Add memory barriers.
1974 (__pthread_unlock): Likewise.
1975 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1977 (RELEASE): Not needed anymore.
1978 (__compare_and_swap): Mark asm as modifying memory.
1979 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1981 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1982 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1983 (MEMORY_BARRIER): Define using stbar.
1984 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1986 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1987 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1988 Mike Burrows <m3b@pa.dec.com>.
1990 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1992 * signals.c (sigaction): Fix return value for the case SIG is one
1993 of the signals the implementation uses.
1994 Patch by Xavier.Leroy@inria.fr.
1996 2000-04-01 Andreas Jaeger <aj@suse.de>
1998 * attr.c: Use shlib-compat macros.
1999 * oldsemaphore.c: Likewise.
2000 * pthread.c: Likewise.
2001 * weaks.c: Likewise.
2003 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2005 * semaphore.c (sem_timedwait): New function.
2006 Patch by Carl Mailloux <carlm@oricom.ca>.
2007 * semaphore.h: Declare sem_timedwait.
2008 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2010 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2012 * sysdeps/pthread/Makefile: File removed.
2014 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2016 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2017 * internals.h (__pthread_reset_pthread_once): Add prototype.
2018 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2020 * manager.c (pthread_handle_create): Store ID of new thread before
2023 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2025 * attr.c: Use new macros from shlib-compat.h to define versions.
2026 * oldsemaphore.c: Likewise.
2027 * semaphore.c: Likewise.
2028 * weaks.c: Likewise.
2030 * pthread.c: Update for new SHLIB_COMPAT definition.
2032 * manager.c (__pthread_manager): Unmask debug signal.
2034 * pthread.c (pthread_initialize): Test for address of __dso_handle
2035 being NULL, not value. Use __on_exit, not on_exit.
2036 Patch by Andreas Jaeger <aj@suse.de>.
2038 * pthread.c: Use new macros from shlib-compat.h to define versions.
2040 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2042 * pthread.c (pthread_initialize): Instead of on_exit use
2043 __cxa_atexit if __dso_label is available to allow unloading the
2044 libpthread shared library.
2046 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2048 * condvar.c: Make tests for ownership of mutex less strict.
2050 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2052 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2053 current thread and return error if not.
2054 (pthread_cond_timedwait_relative_old): Likewise.
2055 (pthread_cond_timedwait_relative_new): Likewise.
2057 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2058 (pthread_once_cancelhandler): New function.
2059 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2061 2000-03-14 Andreas Jaeger <aj@suse.de>
2063 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2065 (pthread_handle_sigrestart_rt): Likewise.
2066 * signals.c (pthread_sighandler_rt): Likewise.
2068 2000-03-02 Andreas Jaeger <aj@suse.de>
2070 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2071 Reported by Sean Chen <sean.chen@turbolinux.com>.
2073 2000-02-28 Andreas Jaeger <aj@suse.de>
2075 * rwlock.c: Fix typo.
2077 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2079 * rwlock.c: Define __* variants of the functions and make old names
2081 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2082 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2084 2000-02-25 Andreas Jaeger <aj@suse.de>
2086 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2087 pwrite64, lseek64, open64, and __open64 with version 2.2.
2089 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2091 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2093 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2095 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2096 nanosleep does not work either. Get absolute time inside the
2098 (pthread_cond_timedwait_relative_new): Likewise.
2099 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2101 2000-02-13 Andreas Jaeger <aj@suse.de>
2103 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2104 (pthread_cond_timedwait_relative_old): Likewise.
2106 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2108 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2109 but keep the code around. A bug in the kernel prevent us from
2111 (pthread_cond_timedwait_relative_new): Likewise.
2112 (PR libc/1597 and libc/1598).
2114 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2116 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2117 loop around nanosleep calls instead of around most of the function
2118 (pthread_cond_timedwait_relative_new): Likewise.
2119 body. Got rid of backwards goto and one local.
2121 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2123 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2124 before every nanosleep call to account for time spent in the rest
2126 (pthread_cond_timedwait_relative_new): Likewise.
2127 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2129 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2131 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2132 from nanosleep call so that in case we restart we only wait for the
2134 (pthread_cond_timedwait_relative_new): Likewise.
2135 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2137 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2139 * manager.c (pthread_allocate_stack): Compute guard page address
2140 correctly. Patch by HJ Lu.
2142 * sysdeps/pthread/pthread.h: Define
2143 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2145 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2147 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2148 preference handling.
2149 (pthread_rwlockattr_setkind_np): Allow
2150 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2151 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2153 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2155 * internals.h (pthread_readlock_info): New structure.
2156 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2157 p_untracked_readlock_count.
2158 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2159 Add initializers for new fields.
2160 * manager.c (pthread_free): Free read/write lock lists.
2161 * queue.h (queue_is_empty): New function.
2162 * rwlock.c: Implement requirements about when readers should get
2164 * sysdeps/pthread/pthread.h
2165 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2166 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2167 Define this name as well.
2168 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2170 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2172 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2173 Adjust initializers for struct _pthread_descr_struct change.
2174 * internals.h (struct _pthread_descr_struct): Move new elements to
2177 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2179 Redesigned how cancellation unblocks a thread from internal
2180 cancellation points (sem_wait, pthread_join,
2181 pthread_cond_{wait,timedwait}).
2182 Cancellation won't eat a signal in any of these functions
2183 (*required* by POSIX and Single Unix Spec!).
2184 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2185 simultaneous condition variable signal (not required by POSIX
2186 or Single Unix Spec, but nice).
2187 * spinlock.c: __pthread_lock queues back any received restarts
2188 that don't belong to it instead of assuming ownership of lock
2189 upon any restart; fastlock can no longer be acquired by two threads
2191 * restart.h: Restarts queue even on kernels that don't have
2192 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2193 avoiding a rare race condition in pthread_cond_timedwait.
2195 1999-12-31 Andreas Jaeger <aj@suse.de>
2197 * internals.h: Remove duplicate prototype declarations.
2199 * weaks.c: Remove __THROW from prototypes since the file is not
2200 compiled by a C++ compiler.
2201 * internals.h: Likewise.
2203 1999-12-30 Andreas Jaeger <aj@suse.de>
2205 * sysdeps/pthread/pthread.h: Move internal functions to...
2206 * sysdeps/pthread/bits/libc-lock.h: ...here.
2208 1999-12-29 Andreas Jaeger <aj@suse.de>
2210 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2212 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2214 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2217 * manager.c (__pthread_start): Add one more cast to prevent
2218 warning on 64bit machines.
2220 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2222 * manager.c (pthread_handle_create): Set p_pid of new thread
2223 before calling the callback function to report a new thread.
2225 1999-12-20 Andreas Jaeger <aj@suse.de>
2227 * pthread.c (pthread_initialize): Move getrlimit call after
2230 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2232 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2233 pwrite64, lseek64, open64, and __open64.
2234 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2235 pwrite64, lseek64, open64, and __open64.
2237 * manager.c (pthread_allocate_stack): Correct computation of
2238 new_thread_bottom. Correct handling of stack size and when the
2239 rlimit method to guard for stack growth is used.
2240 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2241 minus one pagesize (not two).
2243 1999-12-03 Andreas Jaeger <aj@suse.de>
2245 * Versions: Add __res_state with version GLIBC_2.2.
2247 * errno.c (__res_state): New function to return thread specific
2250 * pthread.c (pthread_initialize): Initialize p_resp.
2251 (__pthread_reset_main_thread): Also set p_resp.
2253 * manager.c (pthread_handle_create): Initialize p_resp.
2255 * internals.h: Add thread specific resolver state.
2256 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2258 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2260 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2262 * sysdeps/i386/i686/pt-machine.h: Likewise.
2263 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2265 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2267 * manager.c (pthread_start_thread_event): Initialize p_pid already
2270 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2272 * internals.h: Add prototype for __pthread_manager_event.
2273 * manager.c (__pthread_manager_event): New function.
2274 (pthread_start_thread_event): Correct computation of self.
2275 Use INIT_THREAD_SELF.
2276 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2277 (__pthread_initialize_manager): Respect event flags also for creation
2278 of the manager thread.
2280 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2282 * pthread.c (__pthread_initialize_manager): Initialize
2283 __pthread_manager_thread.p_tid.
2285 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2287 * internals.h: Declare __pthread_last_event.
2288 * manager.c: Define __pthread_last_event.
2289 (pthread_handle_create): Set __pthread_last_event.
2290 (pthread_exited): Likewise.
2291 * join.c (pthread_exit): Likewise.
2293 * Makefile (libpthread-routines): Add events.
2294 * events.c: New file.
2295 * internals.h: Protect against multiple inclusion.
2296 Include thread_dbP.h header.
2297 (struct _pthread_descr_struct): Add new fields p_report_events and
2299 Declare event reporting functions.
2300 * join.c (pthread_exit): Signal event if this is wanted.
2301 * manager.c (__pthread_threads_events): New variable.
2302 (pthread_handle_create): Take new parameters with event information.
2303 Signal TD_CREATE event if wanted.
2304 (__pthread_manager): Adjust pthread_handle_create call.
2305 (pthread_start_thread_event): New function. Block until manager is
2306 finished and then call pthread_start_thread.
2307 (pthread_exited): Signal TD_REAP event if wanted.
2309 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2311 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2313 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2315 1999-10-25 Andreas Jaeger <aj@suse.de>
2317 * internals.h: Remove K&R compatibility.
2318 * no-tsd.c: Likewise.
2319 * semaphore.h: Likewise.
2320 * signals.c: Likewise.
2321 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2322 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2323 * weaks.c: Likewise.
2325 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2327 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2328 pthread_handle_sigcancel with functions that restore %gs from the
2329 signal context. For each signal handling function, two wrappers
2330 are required, one for a non-RT signal and one for a RT signal.
2331 * signal.c: For i386, add code to restore %gs from the signal
2332 context in pthread_sighandler and pthread_sighandler_rt.
2334 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2336 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2338 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2340 * pthread.c (__pthread_initial_thread): Pass argument to
2341 PTHREAD_START_ARGS_INITIALIZER.
2342 (__pthread_manager_thread): Likewise.
2344 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2345 initialize function.
2347 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2349 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2351 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2353 * internals.h: Correct return types for __libc_read and __libc_write.
2355 1999-10-09 Andreas Jaeger <aj@suse.de>
2357 * internals.h: Add __new_sem_post to get prototype in
2358 manager.c; include semaphore.h for needed types.
2360 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2362 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2363 directly instead of calling sem_post which should not be necessary
2364 but is faster and might help in some case to work around problems.
2365 Patch by khendricks@ivey.uwo.ca [libc/1382].
2367 1999-10-08 Andreas Schwab <schwab@suse.de>
2369 * sysdeps/pthread/Subdirs: New file.
2372 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2374 * Implies: New file.
2375 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2376 * manager.c (pthread_handle_create): Initialize p_startfct.
2377 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2379 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2381 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2382 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2383 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2385 * condvar.c (pthread_cond_timedwait_relative): Never return with
2386 EINTR. Patch by Andreas Schwab.
2388 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2390 * signals.c (sigaction): Correct last patch. Don't select
2391 pthread_sighandler_rt based on the signal number but instead of
2392 the SA_SIGINFO flag.
2394 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2396 * specific.c: Move definitions of struct pthread_key_struct and
2397 destr_function to ...
2398 * internals.h: ...here.
2400 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2402 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2403 this instead of pthread_handle_sigrestart if the signal is an RT
2406 * signals.c: Handle passing through of sighandler arguments also
2407 for real-time signals.
2409 1999-09-03 Andreas Schwab <schwab@suse.de>
2411 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2413 (__vfork): New function, alias vfork.
2414 * Versions: Export __fork, vfork, and __vfork in libpthread.
2416 1999-08-23 Andreas Schwab <schwab@suse.de>
2418 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2419 call to signal handler.
2421 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2423 * pthread.c (__pthread_reset_main_thread): Undo last change.
2424 (__pthread_kill_other_threads_np): Reset signal handlers for the
2425 signals we used in the thread implementation here.
2427 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2429 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2430 for the signals we used in the thread implementation [PR libc/1234].
2432 * Versions: Export __pthread_kill_other_threads_np from libpthread
2435 * signals.c: Pass sigcontext through wrapper to the user function.
2437 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2439 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2440 __libc_internal_tsd_set.
2442 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2444 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2447 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2449 * internals.h: Align _pthread_descr_struct to 32 bytes.
2450 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2453 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2455 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2458 1999-07-09 Cristian Gafton <gafton@redhat.com>
2460 * Makefile (libpthread-routines): Add oldsemaphore routine.
2461 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2462 sem_trywait, and sem_wait to GLIBC_2.1.
2463 * oldsemaphore.c: New file.
2464 * semaphore.c: Add default_symbol_versions for the changed functions.
2465 (__new_sem_init): Rename from sem_init.
2466 (__new_sem_post): Rename from sem_post.
2467 (__new_sem_wait): Rename from sem_wait.
2468 (__new_sem_trywait): Rename from sem_trywait.
2469 (__new_sem_getvalue): Rename from sem_getvalue.
2470 (__new_sem_destroy): Rename from sem_destroy.
2472 1999-06-23 Robey Pointer <robey@netscape.com>
2474 * internals.h: Added p_nextlock entry to separate queueing for a
2475 lock from queueing for a CV (sometimes a thread queues on a lock
2476 to serialize removing itself from a CV queue).
2477 * pthread.c: Added p_nextlock to initializers.
2478 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2480 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2482 * manager.c (pthread_handle_create): Free mmap region after stack
2483 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2485 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2487 * man/pthread_cond_init.man: Correct example.
2488 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2490 * linuxthreads.texi (Condition Variables): Likewise.
2492 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2494 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2495 casx not cas, also successful casx returns the old value in rd
2496 and not the new value.
2498 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2500 * manager.c: If pthread_create() is given a NULL attribute
2501 and the thread manager runs with a realtime policy, set the
2502 scheduling policy of the newly created thread back to SCHED_OTHER.
2503 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2504 initialize the schedpolicy field of new_thread->p_start_args
2505 to that of the calling thread.
2507 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2509 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2510 instruction does not allow memory element to use offset.
2512 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2514 * manager.c (pthread_allocate_stack): Optimize initialization of new
2517 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2518 Don't use initializer since it is all zeroes.
2519 (__libc_once_define): Likewise.
2521 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2523 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2524 doesn't exist anymore.
2525 * sysdeps/i386/Implies: Likewise.
2526 * sysdeps/m68k/Implies: Likewise.
2527 * sysdeps/mips/Implies: Likewise.
2528 * sysdeps/powerpc/Implies: Likewise.
2529 * sysdeps/sparc/sparc32/Implies: Likewise.
2530 * sysdeps/sparc/sparc64/Implies: Likewise.
2532 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2534 * sysdeps/alpha/bits/semaphore.h: Removed.
2535 * sysdeps/powerpc/bits/semaphore.h: Removed.
2536 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2537 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2538 * Makefile (headers): Remove bits/semaphore.h.
2540 * semaphore.h: Define _pthread_descr if necessary.
2541 Don't include limits.h. Define SEM_VALUE_MAX directly.
2543 (sem_t): Protect element names with leading __.
2544 Add declarations for sem_close, sem_open, and sem_unlink.
2545 * semaphore.c: Adjust all functions for new element names.
2546 Define sem_close, sem_open, and sem_unlink.
2547 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2549 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2552 1999-03-16 H.J. Lu <hjl@gnu.org>
2554 * specific.c (pthread_key_delete): Check th->p_terminated to see
2555 if the thread is running.
2557 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2558 Added to GLIBC_2.0 for libc.so.
2560 1999-02-12 H.J. Lu <hjl@gnu.org>
2562 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2563 __libc_allocate_rtsig): Added to GLIBC_2.1.
2565 * internals.h (DEFAULT_SIG_RESTART): Removed.
2566 (DEFAULT_SIG_CANCEL): Removed.
2568 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2569 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2570 (__pthread_sig_restart, __pthread_sig_cancel,
2571 __pthread_sig_debug): Initialized.
2572 (pthread_initialize): Call init_rtsigs () to initialize
2575 1999-02-03 H.J. Lu <hjl@gnu.org>
2577 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2578 Don't restart the thread which sent REQ_DEBUG.
2579 (pthread_start_thread): Check if __pthread_sig_debug > 0
2582 * pthread.c (__pthread_initialize_manager): Suspend ourself
2583 after sending __pthread_sig_debug to gdb instead of
2584 __pthread_sig_cancel.
2586 1999-01-24 H.J. Lu <hjl@gnu.org>
2588 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2589 from mask if __pthread_sig_debug > 0.
2590 (pthread_handle_create): Increment __pthread_handles_num.
2592 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2593 * pthread.c (__pthread_initialize_manager): Likewise.
2595 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2596 instead of __libc_allocate_rtsig (2).
2597 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2598 instead of __pthread_sig_cancel.
2599 (pthread_handle_sigdebug): Fix comments.
2601 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2603 * manager.c (pthread_allocate_stack): Set
2604 __pthread_nonstandard_stacks if user-specified stack is used.
2606 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2608 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2609 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2611 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2613 * pthread.c: Use a third signal __pthread_sig_debug distinct
2614 from __pthread_sig_cancel to notify gdb when a thread is
2616 * manager.c: Likewise.
2617 * internals.h: Likewise.
2618 * signals.c: The implementation of sigwait(s) assumed that
2619 all signals in s have signal handlers already attached.
2620 This is not required by the standard, so make it work
2621 also if some of the signals have no handlers.
2623 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2625 * linuxthreads.texi: Remove pointers from first @node. Move old
2626 @node spec inside comment.
2628 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2630 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2633 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2635 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2636 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2638 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2640 * manager.c: Threads now send __pthread_sig_cancel on termination.
2641 Change clone call and signal masks.
2642 * thread.c (pthread_handle_sigrestart): Remove special code for
2644 (pthread_handle_sigcancel): In manager thread call
2645 __pthread_manager_sighandler.
2646 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2647 * sysdeps/i386/i686/pt-machine.h: Likewise.
2648 Patches by Xavier Leroy.
2650 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2652 * spinlock.c (__pthread_unlock): Don't crash if called for an
2653 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2655 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2658 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2660 * Examples/ex3.c: Wait until all threads are started before
2661 searching for the number to avoid race condition on very fast
2664 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2666 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2667 declaration since it's not needed.
2669 * sysdeps/pthread/pthread.h: Move internal functions to ...
2670 * internals.h: ...here.
2672 1998-12-02 H.J. Lu <hjl@gnu.org>
2674 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2675 SIGRTMIN is defined.
2676 (__pthread_sig_cancel): Likewise.
2678 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2680 * wrapsyscall.c: Include <sys/mman.h> for msync,
2681 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2682 Correct msync declaration.
2684 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2686 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2687 __libc_tsd_set): New macros for new interface.
2688 * no-tsd.c: New file, provide uninitialized defns of
2689 __libc_internal_tsd_get and __libc_internal_tsd_set.
2690 * Makefile (routines): Add no-tsd.
2692 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2694 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2695 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2696 __libc_internal_tsd_set): Move decls to ...
2697 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2700 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2701 __libc_internal_tsd_set): Make these pointers to functions, not
2702 functions; remove #pragma weak decls for them.
2703 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2704 Define static functions and initialized pointers to them.
2706 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2708 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2709 (CFLAGS-specific.c): Likewise.
2710 (CFLAGS-pthread.c): Likewise.
2711 (CFLAGS-ptfork.c): Likewise.
2712 (CFLAGS-cancel.c): Likewise.
2713 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2714 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2716 * mutex.c (pthread_mutex_init): Define as strong symbol.
2717 (pthread_mutex_destroy): Likewise.
2718 (pthread_mutex_trylock): Likewise.
2719 (pthread_mutex_lock): Likewise.
2720 (pthread_mutex_unlock): Likewise.
2721 (pthread_mutexattr_init): Likewise.
2722 (pthread_mutexattr_destroy): Likewise.
2723 (pthread_once): Likewise.
2724 * ptfork.c (pthread_atfork): Likewise.
2725 * specific.c (pthread_key_create): Likewise.
2726 (pthread_setspecific): Likewise.
2727 (pthread_getspecific): Likewise.
2729 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2731 * linuxthreads.texi: Fix punctuation after xref.
2733 1998-11-10 H.J. Lu <hjl@gnu.org>
2735 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2736 if it is defined in <linux/limits.h>.
2738 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2740 * spinlock.h (__pthread_trylock): Define inline.
2741 (__pthread_lock): Add extra parameter to declaration. Declare
2742 using internal_function.
2743 (__pthread_unlock): Declare using internal_function.
2744 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2745 of local variable self. Avoid recomputing self. Define using
2747 (__pthread_trylock): Remove.
2748 (__pthread_unlock): Define using internal_function.
2749 * cancel.c: Adjust for __pthread_lock interface change. Use already
2750 computed self value is possible.
2751 * condvar.c: Likewise.
2753 * manager.c: Likewise.
2754 * mutex.c: Likewise.
2755 * pthread.c: Likewise.
2756 * rwlock.c: Likewise.
2757 * semaphore.c: Likewise.
2758 * signals.c: Likewise.
2760 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2762 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2763 __ to field names of the struct.
2764 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2766 (pthread_attr_t): Likewise.
2767 (pthread_cond_t): Likewise.
2768 (pthread_condattr_t): Likewise.
2769 (pthread_mutex_t): Likewise.
2770 (pthread_mutexattr_t): Likewise.
2771 (pthread_rwlock_t): Likewise.
2772 (pthread_rwlockattr_t): Likewise.
2773 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2774 * cancel.c: Likewise.
2775 * condvar.c: Likewise.
2776 * manager.c: Likewise.
2777 * mutex.c: Likewise.
2778 * pthread.c: Likewise.
2779 * ptlongjmp.c: Likewise.
2780 * rwlock.c: Likewise.
2781 * spinlock.c: Likewise.
2783 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2785 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2788 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2791 * Makefile (libpthread-routines): Add pt-machine.
2792 * pt-machine.c: New file.
2793 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2794 yet defined. Use PT_EI in extern inline definitions.
2795 * sysdeps/arm/pt-machine.h: Likewise.
2796 * sysdeps/i386/pt-machine.h: Likewise.
2797 * sysdeps/i386/i686/pt-machine.h: Likewise.
2798 * sysdeps/m68k/pt-machine.h: Likewise.
2799 * sysdeps/mips/pt-machine.h: Likewise.
2800 * sysdeps/powerpc/pt-machine.h: Likewise.
2801 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2802 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2804 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2806 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2809 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2811 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2813 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2815 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2817 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2820 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2822 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2823 array index overflow.
2825 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2827 * sysdeps/pthread/semaphore.h: New file.
2829 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2831 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2832 _LIBC_TSD_KEY_DL_ERROR.
2834 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2836 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2837 * sysdeps/i386/pt-machine.h: Likewise.
2838 Suggested by Roland McGrath.
2840 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2842 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2843 access thread data with non-constant offsets.
2844 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2847 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2848 THREAD_SETMEM_NC definitions.
2850 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2852 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2854 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2856 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2857 not already defined.
2858 (struct _pthread_descr_struct): Add p_self and p_nr field.
2859 * manager.c (__pthread_handles): Define second element to point
2861 (__pthread_handles_num): Initialize to 2.
2862 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2863 (pthread_start_thread): Likewise.
2864 (pthread_handle_create): Start search for free slot at entry 2.
2865 Initialize new fields p_self and p_nr.
2866 Call __clone with CLONE_PTRACE if available.
2867 (pthread_free): Call FREE_THREAD_SELF if available.
2868 * pthread.c (__pthread_initial_thread): Initialize new fields.
2869 (__pthread_manager_thread): Likewise.
2870 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2872 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2873 elements of the thread descriptor.
2874 * condvar.c: Likewise.
2875 * errno.c: Likewise.
2877 * manager.c: Likewise.
2878 * pthread.c: Likewise.
2879 * ptlongjmp.c: Likewise.
2880 * semaphore.c: Likewise.
2881 * signals.c: Likewise.
2882 * specific.c: Likewise.
2883 * spinlock.c: Likewise.
2885 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2887 * sysdeps/i386/useldt.h: New file.
2888 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2890 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2891 THREAD_SETMEM using __thread_self.
2892 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2894 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2896 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2897 turned out that we didn't need to queue after all.
2899 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2901 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2902 and wastes space; correct types.
2904 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2906 * signals.c (sigaction): Handle NULL argument.
2908 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2910 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2913 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2915 * Makefile (linuxthreads-version): Extract correct number from
2918 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2920 * Banner: Bump version number to 0.8
2921 * FAQ.html: Many updates, in particular w.r.t. debugging.
2922 * manager.c: Support for non-default stacksize for
2923 LinuxThreads-allocated stacks;
2924 don't use guard pages for stacks with default size, rely on
2925 rlimit(RLIMIT_STACK) instead (it's cheaper).
2927 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2928 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2929 * condvar.c: Likewise.
2930 * internals.h: Likewise.
2931 * restart.h: Likewise.
2932 * signals.c: Likewise.
2933 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2935 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2937 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2938 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2939 * Versions: Put __pthread_mutexattr_settype under version
2940 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2941 __pthread_mutexattr_gettype.
2943 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2945 * sysdeps/pthread/bits/libc-lock.h: Make
2946 __pthread_mutexattr_settype weak. Don't make
2947 __pthread_mutexattr_setkind_np weak.
2949 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2951 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2952 call can succeed here.
2954 * mutex.c: Define __pthread_mutexattr_settype and make
2955 __pthread_mutexattr_setkind_np an alias.
2956 Likewise for __pthread_mutexattr_gettype.
2958 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2960 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2963 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2965 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2967 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2969 * Examples/ex6.c: Include <unistd.h> for usleep.
2971 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2973 * Examples/ex4.c (main): Use exit, not pthread_exit.
2975 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2977 * Versions: Add __pthread_mutexattr_gettype and
2978 __pthread_mutexattr_settype.
2979 * lockfile.c: Use __pthread_mutexattr_settype instead of
2980 __pthread_mutexattr_setkind_np.
2981 * mutex.c: Define __pthread_mutexattr_gettype and
2982 __pthread_mutexattr_settype.
2984 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2985 __pthread_mutexattr_settype.
2986 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2987 Use __pthread_mutexattr_settype.
2989 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2991 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2992 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2993 pthread_mutexattr_settype.
2994 * sysdeps/pthread/pthread.h: Declare these functions.
2995 Move pthread_sigmask and pthread_kill declaration in separate header.
2996 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2998 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3000 * Makefile: Add rules to compile and run tests.
3001 * Examples/ex1.c: Little changes to fix warnings.
3002 * Examples/ex2.c: Likewise.
3003 * Examples/ex3.c: Likewise.
3004 * Examples/ex4.c: Likewise.
3005 * Examples/ex5.c: Likewise.
3006 * Examples/ex6.c: New file.
3008 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3010 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3012 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3014 * attr.c: Include <string.h>.
3016 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3018 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3019 * internals.h: Include limits.h.
3020 * manager.c: Use memcpy to copy sched_param.
3021 * ptfork.c: Include errno.h.
3022 * pthread.c: Likewise.
3023 * semaphore.c: Likewise.
3024 * specific.c: Likewise.
3025 * spinlock.h: Likewise.
3026 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3027 type definition to ...
3028 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3030 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3032 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3034 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3035 as macros as demanded in POSIX.1, Annex C.
3037 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3039 * internals.h (struct pthread_request): For free use pthread_t
3040 instead of pthread_descr.
3041 * join.c (pthread_join): Pass thread_id, not th to manager.
3042 (pthread_detach): Likewise.
3043 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3044 (pthread_exited): Remove detached queue code.
3045 (pthread_handle_free): Expect thread ID parameter and use it to
3046 validate the thread decsriptor. Don't use detached queue.
3047 Patches by Xavier Leroy.
3049 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3051 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3052 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3053 __pthread_atfork, __pthread_key_create, __pthread_once.
3054 * internals.h: Doc fix.
3055 * pthread.c (__pthread_initialize): Define again.
3057 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3059 * manager.c (pthread_exited): If thread is not detached put it on
3061 (pthread_handle_free): If thread is not on list with living threads
3062 search on list with detached threads.
3064 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3065 for new definition of pthread_rwlock_t.
3067 * spinlock.c: Correct test whether to compile
3068 __pthread_compare_and_swap or not.
3070 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3072 * attr.c: Finish user stack support. Change locking code to be safe
3073 in situations with different priorities.
3074 * cancel.c: Likewise.
3075 * condvar.c: Likewise.
3076 * internals.h: Likewise.
3078 * manager.c: Likewise.
3079 * mutex.c: Likewise.
3080 * pthread.c: Likewise.
3081 * ptlongjmp.c: Likewise.
3082 * queue.h: Likewise.
3083 * rwlock.c: Likewise.
3084 * semaphore.c: Likewise.
3085 * semaphore.h: Likewise.
3086 * signals.c: Likewise.
3087 * spinlock.c: Likewise.
3088 * spinlock.h: Likewise.
3089 * sysdeps/pthread/pthread.h: Likewise.
3090 Patches by Xavier Leroy.
3092 * sysdeps/i386/i686/pt-machine.h: New file.
3094 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3096 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3097 [sg]et_stackaddr prototypes always available.
3099 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3100 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3102 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3104 * manager.c (pthread_free): Undo patch from 980430.
3105 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3107 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3109 * manager.c: Define __pthread_manager_adjust_prio and use it to
3110 increase priority when needed.
3111 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3112 * mutex.c: Optimize mutexes to wake up only one thread.
3113 * pthread.c: Move PID of manager for global variable in structure
3115 Patches by Xavier Leroy.
3117 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3119 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3121 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3123 * attr.c: Correct typo.
3125 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3127 * manager.c (pthread_free): Unmap guard before the stack.
3128 Patch by Matthias Urlichs.
3130 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3132 * manager.c (pthread_free): Detect already free child.
3133 Patch by Xavier Leroy, reported by Matthias Urlichs.
3135 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3137 * Makefile (linuxthreads-version): Renamed back from
3140 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3142 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3145 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3147 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3148 * internals.h: Add definitions for new spinlock implementation.
3149 * ptlongjmp.c: New file.
3150 * spinlock.c: New file.
3151 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3152 new function __pthread_acquire to prevent deadlocks with thread
3153 with different priorities.
3154 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3156 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3158 * manager.c (__pthread_manager): Reduce first argument to select
3159 to include just the needed file descriptor.
3161 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3163 * manager.c: Fix last patch which caused core dumps.
3165 * pthread.c: Correctly handle missing SIGRTMIN.
3167 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3169 * libpthread.map: Add __libc_internal_tsd_get and
3170 __libc_internal_tsd_set. Add missing cancelable functions. Export
3171 libc internal versions of the cancelable functions.
3173 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3175 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3177 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3179 * attr.c: Implement pthread_attr_[gs]etguardsize,
3180 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3181 Change pthread_attr_init to have two interfaces.
3182 * internals.h (struct _pthread_descr_struct): Add new fields for
3184 * libpthread.map: Add names in GLIBC_2.1 section.
3185 * manager.c (pthread_handle_create): Implement guardsize and
3187 (pthread_free): Likewise.
3188 * pthread.c (pthread_create): Add new interface for changed
3190 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3191 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3194 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3196 * manager.c: Enable resetting of the thread scheduling policy
3197 to SCHED_OTHER when the parent thread has a different one.
3199 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3201 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3202 _POSIX_ASYNCHRONOUS_IO.
3204 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3206 * mutex.c: Implement new mutex types.
3208 * internals.h: Include <signal.h>.
3210 * libpthread.map: Add __erno_location and __h_errno_location.
3212 * errno.c: Return pointer to variable actually in use. This might
3213 not be the one in the thread structure.
3214 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3216 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3217 of manager thread structure.
3218 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3220 * pthread.c: Adapt initializer for thread structures.
3221 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3222 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3223 current thread to global variables.
3225 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3227 * rwlock.c: New file.
3228 * Makefile (libpthread-routines): Add rwlock.
3229 * sysdeps/pthread/pthread.h: Define data structures and declare
3231 * libpthread.map: Add new functions.
3233 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3235 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3236 * sysdeps/arm/Implies: likewise.
3237 * README: Document it.
3239 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3241 * signals.c: Remove unneeded initializer for sigwaited, saving a
3244 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3246 * semaphore.c (sem_init): Set sem_spinlock only if available.
3248 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3250 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3251 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3253 * Makefile: Update from LinuxThreads 0.7.
3254 * internals.h. Likewise.
3255 * manager.c: Likewise.
3256 * mutex.c: Likewise.
3257 * pthread.c: Likewise.
3258 * signals.c: Likewise.
3259 * specific.c: Likewise.
3260 * Examples/ex3.c: Likewise.
3262 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3264 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3267 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3269 * wrapsyscall.c: Add socket functions which are also cancelation
3272 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3274 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3275 New functions for fast thread specific data within libc.
3277 * internals.h: Add new array p_libc_specific to struct
3278 _pthread_descr_struct.
3280 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3282 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3284 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3285 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3287 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3289 * internals.h (struct _pthread_descr_struct): Add definitions for
3290 two-level specific key handling.
3291 * manager.c (pthread_handle_create): Initialize specific memory array.
3292 * specific.c: Implement two-level key handling.
3293 * weaks.c: Don't provide dummy key handling.
3294 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3295 Add definition of __libc_key_t.
3296 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3298 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3299 PTHREAD_DESTRUCTOR_ITERATIONS.
3301 * manager.c (pthread_handle_create): Compare mmap result with
3304 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3305 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3307 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3309 sysdeps/sparc -> sysdeps/sparc/sparc32
3310 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3312 * internals.h: Change definition of THREAD_SELF to be an expression,
3313 not a statement that did a return.
3314 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3315 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3316 Follow Solaris and use a "system reserved" register (%g6) to hold
3317 the thread descriptor.
3318 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3320 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3322 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3323 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3324 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3326 * semaphore.c: Include spinlock.h only when needed.
3328 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3329 keys for entries not in use.
3331 * weaks.c: Implement key handling functions for real.
3333 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3335 Initial sparc64-linux support:
3336 * sysdeps/sparc64/Implies: New file.
3337 * sysdeps/sparc64/pt-machine.h: Likewise.
3339 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3341 * semaphore.c: Include spinlock.h at correct place.
3344 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3346 The Great Bit File Move:
3347 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3348 * sysdeps/powerpc/semaphorebits.h: Likewise.
3349 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3350 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3351 * sysdeps/pthread/libc-lock.h: -> bits/
3352 * sysdeps/pthread/stdio-lock.h: Likewise.
3353 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3354 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3355 * semaphore.h: Likewise.
3356 * sysdeps/pthread/pthread.h: Likewise.
3358 * lockfile.c: <foo.h> -> <bits/foo.h>.
3359 * semaphore.h: Likewise.
3361 * Makefile: (headers): foo.h -> bits/foo.h.
3362 * sysdeps/pthread/Makefile: Likewise.
3364 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3366 * semaphore.c (sem_init): Set sem_spinlock only if available.
3368 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3371 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3373 Update from LinuxThreads 0.6.
3375 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3376 and __sched_get_priority_min instead of names without `__'.
3378 * manager.c: Rewrite large parts to implement opaque pthread_t.
3380 * cancel.c: Adapt for opaque pthread_t type.
3381 * condvar.c: Likewise.
3382 * errno.c: Likewise.
3384 * mutex.c: Likewise.
3385 * pthread.c: Likewise.
3386 * signals.c: Likewise.
3387 * specific.c: Likewise.
3388 * restart.h: Likewise.
3389 * queue.h: Likewise.
3390 * Examples/ex3.c: Likewise.
3391 * Examples/ex4.c: Likewise.
3392 * sysdeps/pthread/pthread.h: Likewise.
3394 * pthread.c: Accumulate time for all threads in thread manager.
3396 * semaphore.c: Implement fallback implementation for architectures
3397 sometimes missing compare-exchange operations.
3399 * cancel.c (pthread_cancel): Validate handle argument.
3400 * join.c (pthread_join): Likewise.
3401 (pthread_detach): Likewise.
3402 * signals.c (pthread_kill): Likewise.
3404 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3406 * queue.h (enqueue): Enqueue thread according to priority.
3408 * internals.c (struct pthread_start_args): New struct for passing
3409 args to cloning function.
3410 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3413 * Examples/Makefile (clean): Pass -f option to rm.
3415 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3416 and define TEST_FOR_COMPARE_AND_SWAP.
3417 * sysdeps/i386/i486/pt-machine.h: Removed.
3419 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3422 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3424 * restart.h (suspend): Clear p_signal before suspending.
3425 (suspend_with_cancellation): Likewise.
3426 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3428 * weaks.c: Make __pthread_key_create return 1.
3429 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3430 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3431 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3434 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3436 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3438 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3440 * sysdeps/powerpc/Implies: Added.
3441 * sysdeps/powerpc/pt-machine.h: Added.
3442 * sysdeps/powerpc/semaphorebits.h: Added.
3444 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3446 * pthread.c (__pthread_initial_thread): Correct
3448 (__pthread_manager_thread): Likewise.
3449 Reported by Andreas Jaeger.
3451 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3453 Since sigset_t no longer fits in a register, we can't pass in the
3454 thread's initial mask so easily. Take this opportunity to simplify
3455 the clone implementation by only accepting a single void* argument.
3457 * manager.c (__pthread_manager): Put thread vitals in the thread
3458 struct instead of as arguments through clone.
3459 (pthread_start_thread): Look for them there.
3460 * internals.h (struct _pthread): Add p_initial_fn,
3461 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3462 * pthread.c (pthread_initialize_manager): Revise clone invocation.