1 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
7 1999-10-25 Andreas Jaeger <aj@suse.de>
9 * internals.h: Remove K&R compatibility.
11 * semaphore.h: Likewise.
12 * signals.c: Likewise.
13 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
14 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
17 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
19 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
20 and pthread_handle_sigcancel with functions that restore
21 %gs from the signal context. For each signal handling function,
22 two wrappers are required, one for a non-RT signal and one for
24 * linuxthreads/signal.c: For i386, add code to restore %gs
25 from the signal context in pthread_sighandler and
26 pthread_sighandler_rt.
28 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
30 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
32 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
34 * pthread.c (__pthread_initial_thread): Pass argument to
35 PTHREAD_START_ARGS_INITIALIZER.
36 (__pthread_manager_thread): Likewise.
38 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
41 * manager.c (pthread_handle_create): Remove p_startfct initialization.
43 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
45 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
47 * internals.h: Correct return types for __libc_read and __libc_write.
49 1999-10-09 Andreas Jaeger <aj@suse.de>
51 * internals.h: Add __new_sem_post to get prototype in
52 manager.c; include semaphore.h for needed types.
54 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
56 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
57 directly instead of calling sem_post which should not be necessary
58 but is faster and might help in some case to work around problems.
59 Patch by khendricks@ivey.uwo.ca [libc/1382].
61 1999-10-08 Andreas Schwab <schwab@suse.de>
63 * sysdeps/pthread/Subdirs: New file.
66 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
69 * internals.h (struct _pthread_descr_struct): Add p_startfct.
70 * manager.c (pthread_handle_create): Initialize p_startfct.
71 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
73 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
75 * manager.c (__linuxthreads_pthread_threads_max): New variable.
76 * specific.c (__linuxthreads_pthread_keys_max): New variable.
77 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
79 * condvar.c (pthread_cond_timedwait_relative): Never return with
80 EINTR. Patch by Andreas Schwab.
82 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
84 * signals.c (sigaction): Correct last patch. Don't select
85 pthread_sighandler_rt based on the signal number but instead of
88 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
90 * specific.c: Move definitions of struct pthread_key_struct and
92 * internals.h: ...here.
94 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
96 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
97 this instead of pthread_handle_sigrestart if the signal is an RT
100 * signals.c: Handle passing through of sighandler arguments also
101 for real-time signals.
103 1999-09-03 Andreas Schwab <schwab@suse.de>
105 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
107 (__vfork): New function, alias vfork.
108 * Versions: Export __fork, vfork, and __vfork in libpthread.
110 1999-08-23 Andreas Schwab <schwab@suse.de>
112 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
113 call to signal handler.
115 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
117 * pthread.c (__pthread_reset_main_thread): Undo last change.
118 (__pthread_kill_other_threads_np): Reset signal handlers for the
119 signals we used in the thread implementation here.
121 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
123 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
124 for the signals we used in the thread implementation [PR libc/1234].
126 * Versions: Export __pthread_kill_other_threads_np from libpthread
129 * signals.c: Pass sigcontext through wrapper to the user function.
131 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
133 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
134 __libc_internal_tsd_set.
136 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
138 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
141 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
143 * internals.h: Align _pthread_descr_struct to 32 bytes.
144 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
147 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
149 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
152 1999-07-09 Cristian Gafton <gafton@redhat.com>
154 * Makefile (libpthread-routines): Add oldsemaphore routine.
155 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
156 sem_trywait, and sem_wait to GLIBC_2.1.
157 * oldsemaphore.c: New file.
158 * semaphore.c: Add default_symbol_versions for the changed functions.
159 (__new_sem_init): Rename from sem_init.
160 (__new_sem_post): Rename from sem_post.
161 (__new_sem_wait): Rename from sem_wait.
162 (__new_sem_trywait): Rename from sem_trywait.
163 (__new_sem_getvalue): Rename from sem_getvalue.
164 (__new_sem_destroy): Rename from sem_destroy.
166 1999-06-23 Robey Pointer <robey@netscape.com>
168 * internals.h: Added p_nextlock entry to separate queueing for a
169 lock from queueing for a CV (sometimes a thread queues on a lock
170 to serialize removing itself from a CV queue).
171 * pthread.c: Added p_nextlock to initializers.
172 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
174 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
176 * manager.c (pthread_handle_create): Free mmap region after stack
177 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
179 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
181 * man/pthread_cond_init.man: Correct example.
182 Reported by Tomas Berndtsson <tomas@nocrew.org>.
184 * linuxthreads.texi (Condition Variables): Likewise.
186 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
188 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
189 casx not cas, also successful casx returns the old value in rd
190 and not the new value.
192 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
194 * manager.c: If pthread_create() is given a NULL attribute
195 and the thread manager runs with a realtime policy, set the
196 scheduling policy of the newly created thread back to SCHED_OTHER.
197 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
198 initialize the schedpolicy field of new_thread->p_start_args
199 to that of the calling thread.
201 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
203 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
204 instruction does not allow memory element to use offset.
206 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
208 * manager.c (pthread_allocate_stack): Optimize initialization of new
211 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
212 Don't use initializer since it is all zeroes.
213 (__libc_once_define): Likewise.
215 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
217 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
218 doesn't exist anymore.
219 * sysdeps/i386/Implies: Likewise.
220 * sysdeps/m68k/Implies: Likewise.
221 * sysdeps/mips/Implies: Likewise.
222 * sysdeps/powerpc/Implies: Likewise.
223 * sysdeps/sparc/sparc32/Implies: Likewise.
224 * sysdeps/sparc/sparc64/Implies: Likewise.
226 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
228 * sysdeps/alpha/bits/semaphore.h: Removed.
229 * sysdeps/powerpc/bits/semaphore.h: Removed.
230 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
231 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
232 * Makefile (headers): Remove bits/semaphore.h.
234 * semaphore.h: Define _pthread_descr if necessary.
235 Don't include limits.h. Define SEM_VALUE_MAX directly.
237 (sem_t): Protect element names with leading __.
238 Add declarations for sem_close, sem_open, and sem_unlink.
239 * semaphore.c: Adjust all functions for new element names.
240 Define sem_close, sem_open, and sem_unlink.
241 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
243 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
246 1999-03-16 H.J. Lu <hjl@gnu.org>
248 * specific.c (pthread_key_delete): Check th->p_terminated to see
249 if the thread is running.
251 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
252 Added to GLIBC_2.0 for libc.so.
254 1999-02-12 H.J. Lu <hjl@gnu.org>
256 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
257 __libc_allocate_rtsig): Added to GLIBC_2.1.
259 * internals.h (DEFAULT_SIG_RESTART): Removed.
260 (DEFAULT_SIG_CANCEL): Removed.
262 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
263 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
264 (__pthread_sig_restart, __pthread_sig_cancel,
265 __pthread_sig_debug): Initialized.
266 (pthread_initialize): Call init_rtsigs () to initialize
269 1999-02-03 H.J. Lu <hjl@gnu.org>
271 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
272 Don't restart the thread which sent REQ_DEBUG.
273 (pthread_start_thread): Check if __pthread_sig_debug > 0
276 * pthread.c (__pthread_initialize_manager): Suspend ourself
277 after sending __pthread_sig_debug to gdb instead of
278 __pthread_sig_cancel.
280 1999-01-24 H.J. Lu <hjl@gnu.org>
282 * manager.c (__pthread_manager): Delete __pthread_sig_debug
283 from mask if __pthread_sig_debug > 0.
284 (pthread_handle_create): Increment __pthread_handles_num.
286 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
287 * pthread.c (__pthread_initialize_manager): Likewise.
289 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
290 instead of __libc_allocate_rtsig (2).
291 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
292 instead of __pthread_sig_cancel.
293 (pthread_handle_sigdebug): Fix comments.
295 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
297 * manager.c (pthread_allocate_stack): Set
298 __pthread_nonstandard_stacks if user-specified stack is used.
300 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
302 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
303 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
305 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
307 * pthread.c: Use a third signal __pthread_sig_debug distinct
308 from __pthread_sig_cancel to notify gdb when a thread is
310 * manager.c: Likewise.
311 * internals.h: Likewise.
312 * signals.c: The implementation of sigwait(s) assumed that
313 all signals in s have signal handlers already attached.
314 This is not required by the standard, so make it work
315 also if some of the signals have no handlers.
317 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
319 * linuxthreads.texi: Remove pointers from first @node. Move old
320 @node spec inside comment.
322 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
324 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
327 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
329 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
330 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
332 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
334 * manager.c: Threads now send __pthread_sig_cancel on termination.
335 Change clone call and signal masks.
336 * thread.c (pthread_handle_sigrestart): Remove special code for
338 (pthread_handle_sigcancel): In manager thread call
339 __pthread_manager_sighandler.
340 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
341 * sysdeps/i386/i686/pt-machine.h: Likewise.
342 Patches by Xavier Leroy.
344 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
346 * spinlock.c (__pthread_unlock): Don't crash if called for an
347 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
349 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
352 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
354 * Examples/ex3.c: Wait until all threads are started before
355 searching for the number to avoid race condition on very fast
358 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
360 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
361 declaration since it's not needed.
363 * sysdeps/pthread/pthread.h: Move internal functions to ...
364 * internals.h: ...here.
366 1998-12-02 H.J. Lu <hjl@gnu.org>
368 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
370 (__pthread_sig_cancel): Likewise.
372 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
374 * wrapsyscall.c: Include <sys/mman.h> for msync,
375 <stdlib.h> for system and <termios.h> for tcdrain prototype.
376 Correct msync declaration.
378 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
380 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
381 __libc_tsd_set): New macros for new interface.
382 * no-tsd.c: New file, provide uninitialized defns of
383 __libc_internal_tsd_get and __libc_internal_tsd_set.
384 * Makefile (routines): Add no-tsd.
386 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
388 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
389 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
390 __libc_internal_tsd_set): Move decls to ...
391 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
394 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
395 __libc_internal_tsd_set): Make these pointers to functions, not
396 functions; remove #pragma weak decls for them.
397 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
398 Define static functions and initialized pointers to them.
400 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
402 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
403 (CFLAGS-specific.c): Likewise.
404 (CFLAGS-pthread.c): Likewise.
405 (CFLAGS-ptfork.c): Likewise.
406 (CFLAGS-cancel.c): Likewise.
407 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
408 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
410 * mutex.c (pthread_mutex_init): Define as strong symbol.
411 (pthread_mutex_destroy): Likewise.
412 (pthread_mutex_trylock): Likewise.
413 (pthread_mutex_lock): Likewise.
414 (pthread_mutex_unlock): Likewise.
415 (pthread_mutexattr_init): Likewise.
416 (pthread_mutexattr_destroy): Likewise.
417 (pthread_once): Likewise.
418 * ptfork.c (pthread_atfork): Likewise.
419 * specific.c (pthread_key_create): Likewise.
420 (pthread_setspecific): Likewise.
421 (pthread_getspecific): Likewise.
423 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
425 * linuxthreads.texi: Fix punctuation after xref.
427 1998-11-10 H.J. Lu <hjl@gnu.org>
429 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
430 if it is defined in <linux/limits.h>.
432 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
434 * spinlock.h (__pthread_trylock): Define inline.
435 (__pthread_lock): Add extra parameter to declaration. Declare
436 using internal_function.
437 (__pthread_unlock): Declare using internal_function.
438 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
439 of local variable self. Avoid recomputing self. Define using
441 (__pthread_trylock): Remove.
442 (__pthread_unlock): Define using internal_function.
443 * cancel.c: Adjust for __pthread_lock interface change. Use already
444 computed self value is possible.
445 * condvar.c: Likewise.
447 * manager.c: Likewise.
449 * pthread.c: Likewise.
450 * rwlock.c: Likewise.
451 * semaphore.c: Likewise.
452 * signals.c: Likewise.
454 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
456 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
457 __ to field names of the struct.
458 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
460 (pthread_attr_t): Likewise.
461 (pthread_cond_t): Likewise.
462 (pthread_condattr_t): Likewise.
463 (pthread_mutex_t): Likewise.
464 (pthread_mutexattr_t): Likewise.
465 (pthread_rwlock_t): Likewise.
466 (pthread_rwlockattr_t): Likewise.
467 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
468 * cancel.c: Likewise.
469 * condvar.c: Likewise.
470 * manager.c: Likewise.
472 * pthread.c: Likewise.
473 * ptlongjmp.c: Likewise.
474 * rwlock.c: Likewise.
475 * spinlock.c: Likewise.
477 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
479 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
482 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
485 * Makefile (libpthread-routines): Add pt-machine.
486 * pt-machine.c: New file.
487 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
488 yet defined. Use PT_EI in extern inline definitions.
489 * sysdeps/arm/pt-machine.h: Likewise.
490 * sysdeps/i386/pt-machine.h: Likewise.
491 * sysdeps/i386/i686/pt-machine.h: Likewise.
492 * sysdeps/m68k/pt-machine.h: Likewise.
493 * sysdeps/mips/pt-machine.h: Likewise.
494 * sysdeps/powerpc/pt-machine.h: Likewise.
495 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
496 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
498 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
500 * semaphore.h: Include <sys/types.h> so that _pthread_descr
503 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
505 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
507 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
509 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
511 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
512 multiple inclusion guard.
514 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
516 * signals.c (sigaction): Check that sig is less than NSIG to avoid
517 array index overflow.
519 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
521 * sysdeps/pthread/semaphore.h: New file.
523 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
525 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
526 _LIBC_TSD_KEY_DL_ERROR.
528 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
530 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
531 * sysdeps/i386/pt-machine.h: Likewise.
532 Suggested by Roland McGrath.
534 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
536 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
537 access thread data with non-constant offsets.
538 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
541 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
542 THREAD_SETMEM_NC definitions.
544 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
546 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
548 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
550 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
552 (struct _pthread_descr_struct): Add p_self and p_nr field.
553 * manager.c (__pthread_handles): Define second element to point
555 (__pthread_handles_num): Initialize to 2.
556 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
557 (pthread_start_thread): Likewise.
558 (pthread_handle_create): Start search for free slot at entry 2.
559 Initialize new fields p_self and p_nr.
560 Call __clone with CLONE_PTRACE if available.
561 (pthread_free): Call FREE_THREAD_SELF if available.
562 * pthread.c (__pthread_initial_thread): Initialize new fields.
563 (__pthread_manager_thread): Likewise.
564 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
566 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
567 elements of the thread descriptor.
568 * condvar.c: Likewise.
571 * manager.c: Likewise.
572 * pthread.c: Likewise.
573 * ptlongjmp.c: Likewise.
574 * semaphore.c: Likewise.
575 * signals.c: Likewise.
576 * specific.c: Likewise.
577 * spinlock.c: Likewise.
579 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
581 * sysdeps/i386/useldt.h: New file.
582 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
584 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
585 THREAD_SETMEM using __thread_self.
586 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
588 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
590 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
591 turned out that we didn't need to queue after all.
593 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
595 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
596 and wastes space; correct types.
598 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
600 * signals.c (sigaction): Handle NULL argument.
602 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
604 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
607 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
609 * Makefile (linuxthreads-version): Extract correct number from
612 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
614 * Banner: Bump version number to 0.8
615 * FAQ.html: Many updates, in particular w.r.t. debugging.
616 * manager.c: Support for non-default stacksize for
617 LinuxThreads-allocated stacks;
618 don't use guard pages for stacks with default size, rely on
619 rlimit(RLIMIT_STACK) instead (it's cheaper).
621 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
622 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
623 * condvar.c: Likewise.
624 * internals.h: Likewise.
625 * restart.h: Likewise.
626 * signals.c: Likewise.
627 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
629 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
631 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
632 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
633 * Versions: Put __pthread_mutexattr_settype under version
634 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
635 __pthread_mutexattr_gettype.
637 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
639 * sysdeps/pthread/bits/libc-lock.h: Make
640 __pthread_mutexattr_settype weak. Don't make
641 __pthread_mutexattr_setkind_np weak.
643 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
645 * manager.c (pthread_handle_create): Check whether sched_setscheduler
646 call can succeed here.
648 * mutex.c: Define __pthread_mutexattr_settype and make
649 __pthread_mutexattr_setkind_np an alias.
650 Likewise for __pthread_mutexattr_gettype.
652 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
654 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
657 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
659 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
661 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
663 * Examples/ex6.c: Include <unistd.h> for usleep.
665 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
667 * Examples/ex4.c (main): Use exit, not pthread_exit.
669 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
671 * Versions: Add __pthread_mutexattr_gettype and
672 __pthread_mutexattr_settype.
673 * lockfile.c: Use __pthread_mutexattr_settype instead of
674 __pthread_mutexattr_setkind_np.
675 * mutex.c: Define __pthread_mutexattr_gettype and
676 __pthread_mutexattr_settype.
678 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
679 __pthread_mutexattr_settype.
680 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
681 Use __pthread_mutexattr_settype.
683 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
685 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
686 * mutex.c: Define weak alias pthread_mutexattr_gettype and
687 pthread_mutexattr_settype.
688 * sysdeps/pthread/pthread.h: Declare these functions.
689 Move pthread_sigmask and pthread_kill declaration in separate header.
690 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
692 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
694 * Makefile: Add rules to compile and run tests.
695 * Examples/ex1.c: Little changes to fix warnings.
696 * Examples/ex2.c: Likewise.
697 * Examples/ex3.c: Likewise.
698 * Examples/ex4.c: Likewise.
699 * Examples/ex5.c: Likewise.
700 * Examples/ex6.c: New file.
702 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
704 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
706 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
708 * attr.c: Include <string.h>.
710 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
712 * attr.c: Include errno.h. Use memcpy to copy sched_param.
713 * internals.h: Include limits.h.
714 * manager.c: Use memcpy to copy sched_param.
715 * ptfork.c: Include errno.h.
716 * pthread.c: Likewise.
717 * semaphore.c: Likewise.
718 * specific.c: Likewise.
719 * spinlock.h: Likewise.
720 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
721 type definition to ...
722 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
724 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
726 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
728 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
729 as macros as demanded in POSIX.1, Annex C.
731 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
733 * internals.h (struct pthread_request): For free use pthread_t
734 instead of pthread_descr.
735 * join.c (pthread_join): Pass thread_id, not th to manager.
736 (pthread_detach): Likewise.
737 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
738 (pthread_exited): Remove detached queue code.
739 (pthread_handle_free): Expect thread ID parameter and use it to
740 validate the thread decsriptor. Don't use detached queue.
741 Patches by Xavier Leroy.
743 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
745 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
746 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
747 __pthread_atfork, __pthread_key_create, __pthread_once.
748 * internals.h: Doc fix.
749 * pthread.c (__pthread_initialize): Define again.
751 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
753 * manager.c (pthread_exited): If thread is not detached put it on
755 (pthread_handle_free): If thread is not on list with living threads
756 search on list with detached threads.
758 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
759 for new definition of pthread_rwlock_t.
761 * spinlock.c: Correct test whether to compile
762 __pthread_compare_and_swap or not.
764 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
766 * attr.c: Finish user stack support. Change locking code to be safe
767 in situations with different priorities.
768 * cancel.c: Likewise.
769 * condvar.c: Likewise.
770 * internals.h: Likewise.
772 * manager.c: Likewise.
774 * pthread.c: Likewise.
775 * ptlongjmp.c: Likewise.
777 * rwlock.c: Likewise.
778 * semaphore.c: Likewise.
779 * semaphore.h: Likewise.
780 * signals.c: Likewise.
781 * spinlock.c: Likewise.
782 * spinlock.h: Likewise.
783 * sysdeps/pthread/pthread.h: Likewise.
784 Patches by Xavier Leroy.
786 * sysdeps/i386/i686/pt-machine.h: New file.
788 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
790 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
791 [sg]et_stackaddr prototypes always available.
793 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
794 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
796 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
798 * manager.c (pthread_free): Undo patch from 980430.
799 Reported by David Wragg <dpw@doc.ic.ac.uk>.
801 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
803 * manager.c: Define __pthread_manager_adjust_prio and use it to
804 increase priority when needed.
805 * internals.h: Add prototype for __pthread_manager_adjust_prio.
806 * mutex.c: Optimize mutexes to wake up only one thread.
807 * pthread.c: Move PID of manager for global variable in structure
809 Patches by Xavier Leroy.
811 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
813 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
815 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
817 * attr.c: Correct typo.
819 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
821 * manager.c (pthread_free): Unmap guard before the stack.
822 Patch by Matthias Urlichs.
824 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
826 * manager.c (pthread_free): Detect already free child.
827 Patch by Xavier Leroy, reported by Matthias Urlichs.
829 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
831 * Makefile (linuxthreads-version): Renamed back from
834 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
836 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
839 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
841 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
842 * internals.h: Add definitions for new spinlock implementation.
843 * ptlongjmp.c: New file.
844 * spinlock.c: New file.
845 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
846 new function __pthread_acquire to prevent deadlocks with thread
847 with different priorities.
848 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
850 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
852 * manager.c (__pthread_manager): Reduce first argument to select
853 to include just the needed file descriptor.
855 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
857 * manager.c: Fix last patch which caused core dumps.
859 * pthread.c: Correctly handle missing SIGRTMIN.
861 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
863 * libpthread.map: Add __libc_internal_tsd_get and
864 __libc_internal_tsd_set. Add missing cancelable functions. Export
865 libc internal versions of the cancelable functions.
867 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
869 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
871 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
873 * attr.c: Implement pthread_attr_[gs]etguardsize,
874 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
875 Change pthread_attr_init to have two interfaces.
876 * internals.h (struct _pthread_descr_struct): Add new fields for
878 * libpthread.map: Add names in GLIBC_2.1 section.
879 * manager.c (pthread_handle_create): Implement guardsize and
881 (pthread_free): Likewise.
882 * pthread.c (pthread_create): Add new interface for changed
884 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
885 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
888 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
890 * manager.c: Enable resetting of the thread scheduling policy
891 to SCHED_OTHER when the parent thread has a different one.
893 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
895 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
896 _POSIX_ASYNCHRONOUS_IO.
898 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
900 * mutex.c: Implement new mutex types.
902 * internals.h: Include <signal.h>.
904 * libpthread.map: Add __erno_location and __h_errno_location.
906 * errno.c: Return pointer to variable actually in use. This might
907 not be the one in the thread structure.
908 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
910 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
911 of manager thread structure.
912 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
914 * pthread.c: Adapt initializer for thread structures.
915 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
916 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
917 current thread to global variables.
919 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
921 * rwlock.c: New file.
922 * Makefile (libpthread-routines): Add rwlock.
923 * sysdeps/pthread/pthread.h: Define data structures and declare
925 * libpthread.map: Add new functions.
927 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
929 * sysdeps/arm/pt-machine.h: New file; add ARM support.
930 * sysdeps/arm/Implies: likewise.
931 * README: Document it.
933 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
935 * signals.c: Remove unneeded initializer for sigwaited, saving a
938 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
940 * semaphore.c (sem_init): Set sem_spinlock only if available.
942 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
944 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
945 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
947 * Makefile: Update from LinuxThreads 0.7.
948 * internals.h. Likewise.
949 * manager.c: Likewise.
951 * pthread.c: Likewise.
952 * signals.c: Likewise.
953 * specific.c: Likewise.
954 * Examples/ex3.c: Likewise.
956 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
958 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
961 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
963 * wrapsyscall.c: Add socket functions which are also cancelation
966 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
968 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
969 New functions for fast thread specific data within libc.
971 * internals.h: Add new array p_libc_specific to struct
972 _pthread_descr_struct.
974 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
976 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
978 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
979 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
981 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
983 * internals.h (struct _pthread_descr_struct): Add definitions for
984 two-level specific key handling.
985 * manager.c (pthread_handle_create): Initialize specific memory array.
986 * specific.c: Implement two-level key handling.
987 * weaks.c: Don't provide dummy key handling.
988 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
989 Add definition of __libc_key_t.
990 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
992 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
993 PTHREAD_DESTRUCTOR_ITERATIONS.
995 * manager.c (pthread_handle_create): Compare mmap result with
998 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
999 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1001 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1003 sysdeps/sparc -> sysdeps/sparc/sparc32
1004 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1006 * internals.h: Change definition of THREAD_SELF to be an expression,
1007 not a statement that did a return.
1008 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1009 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1010 Follow Solaris and use a "system reserved" register (%g6) to hold
1011 the thread descriptor.
1012 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1014 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1016 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1017 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1018 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1020 * semaphore.c: Include spinlock.h only when needed.
1022 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1023 keys for entries not in use.
1025 * weaks.c: Implement key handling functions for real.
1027 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1029 Initial sparc64-linux support:
1030 * linuxthreads/sysdeps/sparc64/Implies: New file.
1031 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1033 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1035 * semaphore.c: Include spinlock.h at correct place.
1038 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1040 The Great Bit File Move:
1041 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1042 * sysdeps/powerpc/semaphorebits.h: Likewise.
1043 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1044 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1045 * sysdeps/pthread/libc-lock.h: -> bits/
1046 * sysdeps/pthread/stdio-lock.h: Likewise.
1047 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1048 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1049 * semaphore.h: Likewise.
1050 * sysdeps/pthread/pthread.h: Likewise.
1052 * lockfile.c: <foo.h> -> <bits/foo.h>.
1053 * semaphore.h: Likewise.
1055 * Makefile: (headers): foo.h -> bits/foo.h.
1056 * sysdeps/pthread/Makefile: Likewise.
1058 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1060 * semaphore.c (sem_init): Set sem_spinlock only if available.
1062 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1065 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1067 Update from LinuxThreads 0.6.
1069 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1070 and __sched_get_priority_min instead of names without `__'.
1072 * manager.c: Rewrite large parts to implement opaque pthread_t.
1074 * cancel.c: Adapt for opaque pthread_t type.
1075 * condvar.c: Likewise.
1076 * errno.c: Likewise.
1078 * mutex.c: Likewise.
1079 * pthread.c: Likewise.
1080 * signals.c: Likewise.
1081 * specific.c: Likewise.
1082 * restart.h: Likewise.
1083 * queue.h: Likewise.
1084 * Examples/ex3.c: Likewise.
1085 * Examples/ex4.c: Likewise.
1086 * sysdeps/pthread/pthread.h: Likewise.
1088 * pthread.c: Accumulate time for all threads in thread manager.
1090 * semaphore.c: Implement fallback implementation for architectures
1091 sometimes missing compare-exchange operations.
1093 * cancel.c (pthread_cancel): Validate handle argument.
1094 * join.c (pthread_join): Likewise.
1095 (pthread_detach): Likewise.
1096 * signals.c (pthread_kill): Likewise.
1098 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1100 * queue.h (enqueue): Enqueue thread according to priority.
1102 * internals.c (struct pthread_start_args): New struct for passing
1103 args to cloning function.
1104 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1107 * Examples/Makefile (clean): Pass -f option to rm.
1109 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1110 and define TEST_FOR_COMPARE_AND_SWAP.
1111 * sysdeps/i386/i486/pt-machine.h: Removed.
1113 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1116 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1118 * restart.h (suspend): Clear p_signal before suspending.
1119 (suspend_with_cancellation): Likewise.
1120 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1122 * weaks.c: Make __pthread_key_create return 1.
1123 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1124 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1125 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1128 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1130 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1132 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1134 * sysdeps/powerpc/Implies: Added.
1135 * sysdeps/powerpc/pt-machine.h: Added.
1136 * sysdeps/powerpc/semaphorebits.h: Added.
1138 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1140 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1142 (__pthread_manager_thread): Likewise.
1143 Reported by Andreas Jaeger.
1145 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1147 Since sigset_t no longer fits in a register, we can't pass in the
1148 thread's initial mask so easily. Take this opportunity to simplify
1149 the clone implementation by only accepting a single void* argument.
1151 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1152 in the thread struct instead of as arguments through clone.
1153 (pthread_start_thread): Look for them there.
1154 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1155 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1156 * linuxthreads/pthread.c (pthread_initialize_manager): Revise