1 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3 * manager.c (__linuxthreads_pthread_threads_max): New variable.
4 * specific.c (__linuxthreads_pthread_keys_max): New variable.
6 * condvar.c (pthread_cond_timedwait_relative): Never return with
7 EINTR. Patch by Andreas Schwab.
9 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
11 * signals.c (sigaction): Correct last patch. Don't select
12 pthread_sighandler_rt based on the signal number but instead of
15 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
17 * specific.c: Move definitions of struct pthread_key_struct and
19 * internals.h: ...here.
21 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
23 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
24 this instead of pthread_handle_sigrestart if the signal is an RT
27 * signals.c: Handle passing through of sighandler arguments also
28 for real-time signals.
30 1999-09-03 Andreas Schwab <schwab@suse.de>
32 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
34 (__vfork): New function, alias vfork.
35 * Versions: Export __fork, vfork, and __vfork in libpthread.
37 1999-08-23 Andreas Schwab <schwab@suse.de>
39 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
40 call to signal handler.
42 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
44 * pthread.c (__pthread_reset_main_thread): Undo last change.
45 (__pthread_kill_other_threads_np): Reset signal handlers for the
46 signals we used in the thread implementation here.
48 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
50 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
51 for the signals we used in the thread implementation [PR libc/1234].
53 * Versions: Export __pthread_kill_other_threads_np from libpthread
56 * signals.c: Pass sigcontext through wrapper to the user function.
58 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
60 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
61 __libc_internal_tsd_set.
63 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
65 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
68 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
70 * internals.h: Align _pthread_descr_struct to 32 bytes.
71 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
74 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
76 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
79 1999-07-09 Cristian Gafton <gafton@redhat.com>
81 * Makefile (libpthread-routines): Add oldsemaphore routine.
82 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
83 sem_trywait, and sem_wait to GLIBC_2.1.
84 * oldsemaphore.c: New file.
85 * semaphore.c: Add default_symbol_versions for the changed functions.
86 (__new_sem_init): Rename from sem_init.
87 (__new_sem_post): Rename from sem_post.
88 (__new_sem_wait): Rename from sem_wait.
89 (__new_sem_trywait): Rename from sem_trywait.
90 (__new_sem_getvalue): Rename from sem_getvalue.
91 (__new_sem_destroy): Rename from sem_destroy.
93 1999-06-23 Robey Pointer <robey@netscape.com>
95 * internals.h: Added p_nextlock entry to separate queueing for a
96 lock from queueing for a CV (sometimes a thread queues on a lock
97 to serialize removing itself from a CV queue).
98 * pthread.c: Added p_nextlock to initializers.
99 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
101 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
103 * manager.c (pthread_handle_create): Free mmap region after stack
104 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
106 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
108 * man/pthread_cond_init.man: Correct example.
109 Reported by Tomas Berndtsson <tomas@nocrew.org>.
111 * linuxthreads.texi (Condition Variables): Likewise.
113 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
115 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
116 casx not cas, also successful casx returns the old value in rd
117 and not the new value.
119 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
121 * manager.c: If pthread_create() is given a NULL attribute
122 and the thread manager runs with a realtime policy, set the
123 scheduling policy of the newly created thread back to SCHED_OTHER.
124 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
125 initialize the schedpolicy field of new_thread->p_start_args
126 to that of the calling thread.
128 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
130 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
131 instruction does not allow memory element to use offset.
133 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
135 * manager.c (pthread_allocate_stack): Optimize initialization of new
138 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
139 Don't use initializer since it is all zeroes.
140 (__libc_once_define): Likewise.
142 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
144 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
145 doesn't exist anymore.
146 * sysdeps/i386/Implies: Likewise.
147 * sysdeps/m68k/Implies: Likewise.
148 * sysdeps/mips/Implies: Likewise.
149 * sysdeps/powerpc/Implies: Likewise.
150 * sysdeps/sparc/sparc32/Implies: Likewise.
151 * sysdeps/sparc/sparc64/Implies: Likewise.
153 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
155 * sysdeps/alpha/bits/semaphore.h: Removed.
156 * sysdeps/powerpc/bits/semaphore.h: Removed.
157 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
158 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
159 * Makefile (headers): Remove bits/semaphore.h.
161 * semaphore.h: Define _pthread_descr if necessary.
162 Don't include limits.h. Define SEM_VALUE_MAX directly.
164 (sem_t): Protect element names with leading __.
165 Add declarations for sem_close, sem_open, and sem_unlink.
166 * semaphore.c: Adjust all functions for new element names.
167 Define sem_close, sem_open, and sem_unlink.
168 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
170 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
173 1999-03-16 H.J. Lu <hjl@gnu.org>
175 * specific.c (pthread_key_delete): Check th->p_terminated to see
176 if the thread is running.
178 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
179 Added to GLIBC_2.0 for libc.so.
181 1999-02-12 H.J. Lu <hjl@gnu.org>
183 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
184 __libc_allocate_rtsig): Added to GLIBC_2.1.
186 * internals.h (DEFAULT_SIG_RESTART): Removed.
187 (DEFAULT_SIG_CANCEL): Removed.
189 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
190 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
191 (__pthread_sig_restart, __pthread_sig_cancel,
192 __pthread_sig_debug): Initialized.
193 (pthread_initialize): Call init_rtsigs () to initialize
196 1999-02-03 H.J. Lu <hjl@gnu.org>
198 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
199 Don't restart the thread which sent REQ_DEBUG.
200 (pthread_start_thread): Check if __pthread_sig_debug > 0
203 * pthread.c (__pthread_initialize_manager): Suspend ourself
204 after sending __pthread_sig_debug to gdb instead of
205 __pthread_sig_cancel.
207 1999-01-24 H.J. Lu <hjl@gnu.org>
209 * manager.c (__pthread_manager): Delete __pthread_sig_debug
210 from mask if __pthread_sig_debug > 0.
211 (pthread_handle_create): Increment __pthread_handles_num.
213 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
214 * pthread.c (__pthread_initialize_manager): Likewise.
216 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
217 instead of __libc_allocate_rtsig (2).
218 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
219 instead of __pthread_sig_cancel.
220 (pthread_handle_sigdebug): Fix comments.
222 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
224 * manager.c (pthread_allocate_stack): Set
225 __pthread_nonstandard_stacks if user-specified stack is used.
227 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
230 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
232 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
234 * pthread.c: Use a third signal __pthread_sig_debug distinct
235 from __pthread_sig_cancel to notify gdb when a thread is
237 * manager.c: Likewise.
238 * internals.h: Likewise.
239 * signals.c: The implementation of sigwait(s) assumed that
240 all signals in s have signal handlers already attached.
241 This is not required by the standard, so make it work
242 also if some of the signals have no handlers.
244 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
246 * linuxthreads.texi: Remove pointers from first @node. Move old
247 @node spec inside comment.
249 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
251 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
254 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
256 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
257 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
259 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
261 * manager.c: Threads now send __pthread_sig_cancel on termination.
262 Change clone call and signal masks.
263 * thread.c (pthread_handle_sigrestart): Remove special code for
265 (pthread_handle_sigcancel): In manager thread call
266 __pthread_manager_sighandler.
267 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
268 * sysdeps/i386/i686/pt-machine.h: Likewise.
269 Patches by Xavier Leroy.
271 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
273 * spinlock.c (__pthread_unlock): Don't crash if called for an
274 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
276 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
279 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
281 * Examples/ex3.c: Wait until all threads are started before
282 searching for the number to avoid race condition on very fast
285 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
287 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
288 declaration since it's not needed.
290 * sysdeps/pthread/pthread.h: Move internal functions to ...
291 * internals.h: ...here.
293 1998-12-02 H.J. Lu <hjl@gnu.org>
295 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
297 (__pthread_sig_cancel): Likewise.
299 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
301 * wrapsyscall.c: Include <sys/mman.h> for msync,
302 <stdlib.h> for system and <termios.h> for tcdrain prototype.
303 Correct msync declaration.
305 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
307 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
308 __libc_tsd_set): New macros for new interface.
309 * no-tsd.c: New file, provide uninitialized defns of
310 __libc_internal_tsd_get and __libc_internal_tsd_set.
311 * Makefile (routines): Add no-tsd.
313 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
315 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
316 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
317 __libc_internal_tsd_set): Move decls to ...
318 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
321 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
322 __libc_internal_tsd_set): Make these pointers to functions, not
323 functions; remove #pragma weak decls for them.
324 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
325 Define static functions and initialized pointers to them.
327 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
329 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
330 (CFLAGS-specific.c): Likewise.
331 (CFLAGS-pthread.c): Likewise.
332 (CFLAGS-ptfork.c): Likewise.
333 (CFLAGS-cancel.c): Likewise.
334 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
335 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
337 * mutex.c (pthread_mutex_init): Define as strong symbol.
338 (pthread_mutex_destroy): Likewise.
339 (pthread_mutex_trylock): Likewise.
340 (pthread_mutex_lock): Likewise.
341 (pthread_mutex_unlock): Likewise.
342 (pthread_mutexattr_init): Likewise.
343 (pthread_mutexattr_destroy): Likewise.
344 (pthread_once): Likewise.
345 * ptfork.c (pthread_atfork): Likewise.
346 * specific.c (pthread_key_create): Likewise.
347 (pthread_setspecific): Likewise.
348 (pthread_getspecific): Likewise.
350 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
352 * linuxthreads.texi: Fix punctuation after xref.
354 1998-11-10 H.J. Lu <hjl@gnu.org>
356 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
357 if it is defined in <linux/limits.h>.
359 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
361 * spinlock.h (__pthread_trylock): Define inline.
362 (__pthread_lock): Add extra parameter to declaration. Declare
363 using internal_function.
364 (__pthread_unlock): Declare using internal_function.
365 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
366 of local variable self. Avoid recomputing self. Define using
368 (__pthread_trylock): Remove.
369 (__pthread_unlock): Define using internal_function.
370 * cancel.c: Adjust for __pthread_lock interface change. Use already
371 computed self value is possible.
372 * condvar.c: Likewise.
374 * manager.c: Likewise.
376 * pthread.c: Likewise.
377 * rwlock.c: Likewise.
378 * semaphore.c: Likewise.
379 * signals.c: Likewise.
381 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
383 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
384 __ to field names of the struct.
385 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
387 (pthread_attr_t): Likewise.
388 (pthread_cond_t): Likewise.
389 (pthread_condattr_t): Likewise.
390 (pthread_mutex_t): Likewise.
391 (pthread_mutexattr_t): Likewise.
392 (pthread_rwlock_t): Likewise.
393 (pthread_rwlockattr_t): Likewise.
394 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
395 * cancel.c: Likewise.
396 * condvar.c: Likewise.
397 * manager.c: Likewise.
399 * pthread.c: Likewise.
400 * ptlongjmp.c: Likewise.
401 * rwlock.c: Likewise.
402 * spinlock.c: Likewise.
404 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
406 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
409 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
412 * Makefile (libpthread-routines): Add pt-machine.
413 * pt-machine.c: New file.
414 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
415 yet defined. Use PT_EI in extern inline definitions.
416 * sysdeps/arm/pt-machine.h: Likewise.
417 * sysdeps/i386/pt-machine.h: Likewise.
418 * sysdeps/i386/i686/pt-machine.h: Likewise.
419 * sysdeps/m68k/pt-machine.h: Likewise.
420 * sysdeps/mips/pt-machine.h: Likewise.
421 * sysdeps/powerpc/pt-machine.h: Likewise.
422 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
423 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
425 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
427 * semaphore.h: Include <sys/types.h> so that _pthread_descr
430 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
432 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
434 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
436 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
438 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
439 multiple inclusion guard.
441 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
443 * signals.c (sigaction): Check that sig is less than NSIG to avoid
444 array index overflow.
446 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
448 * sysdeps/pthread/semaphore.h: New file.
450 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
452 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
453 _LIBC_TSD_KEY_DL_ERROR.
455 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
457 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
458 * sysdeps/i386/pt-machine.h: Likewise.
459 Suggested by Roland McGrath.
461 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
463 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
464 access thread data with non-constant offsets.
465 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
468 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
469 THREAD_SETMEM_NC definitions.
471 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
473 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
475 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
477 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
479 (struct _pthread_descr_struct): Add p_self and p_nr field.
480 * manager.c (__pthread_handles): Define second element to point
482 (__pthread_handles_num): Initialize to 2.
483 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
484 (pthread_start_thread): Likewise.
485 (pthread_handle_create): Start search for free slot at entry 2.
486 Initialize new fields p_self and p_nr.
487 Call __clone with CLONE_PTRACE if available.
488 (pthread_free): Call FREE_THREAD_SELF if available.
489 * pthread.c (__pthread_initial_thread): Initialize new fields.
490 (__pthread_manager_thread): Likewise.
491 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
493 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
494 elements of the thread descriptor.
495 * condvar.c: Likewise.
498 * manager.c: Likewise.
499 * pthread.c: Likewise.
500 * ptlongjmp.c: Likewise.
501 * semaphore.c: Likewise.
502 * signals.c: Likewise.
503 * specific.c: Likewise.
504 * spinlock.c: Likewise.
506 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
508 * sysdeps/i386/useldt.h: New file.
509 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
511 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
512 THREAD_SETMEM using __thread_self.
513 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
515 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
517 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
518 turned out that we didn't need to queue after all.
520 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
522 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
523 and wastes space; correct types.
525 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
527 * signals.c (sigaction): Handle NULL argument.
529 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
531 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
534 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
536 * Makefile (linuxthreads-version): Extract correct number from
539 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
541 * Banner: Bump version number to 0.8
542 * FAQ.html: Many updates, in particular w.r.t. debugging.
543 * manager.c: Support for non-default stacksize for
544 LinuxThreads-allocated stacks;
545 don't use guard pages for stacks with default size, rely on
546 rlimit(RLIMIT_STACK) instead (it's cheaper).
548 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
549 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
550 * condvar.c: Likewise.
551 * internals.h: Likewise.
552 * restart.h: Likewise.
553 * signals.c: Likewise.
554 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
556 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
558 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
559 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
560 * Versions: Put __pthread_mutexattr_settype under version
561 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
562 __pthread_mutexattr_gettype.
564 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
566 * sysdeps/pthread/bits/libc-lock.h: Make
567 __pthread_mutexattr_settype weak. Don't make
568 __pthread_mutexattr_setkind_np weak.
570 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
572 * manager.c (pthread_handle_create): Check whether sched_setscheduler
573 call can succeed here.
575 * mutex.c: Define __pthread_mutexattr_settype and make
576 __pthread_mutexattr_setkind_np an alias.
577 Likewise for __pthread_mutexattr_gettype.
579 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
581 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
584 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
586 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
588 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
590 * Examples/ex6.c: Include <unistd.h> for usleep.
592 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
594 * Examples/ex4.c (main): Use exit, not pthread_exit.
596 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
598 * Versions: Add __pthread_mutexattr_gettype and
599 __pthread_mutexattr_settype.
600 * lockfile.c: Use __pthread_mutexattr_settype instead of
601 __pthread_mutexattr_setkind_np.
602 * mutex.c: Define __pthread_mutexattr_gettype and
603 __pthread_mutexattr_settype.
605 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
606 __pthread_mutexattr_settype.
607 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
608 Use __pthread_mutexattr_settype.
610 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
612 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
613 * mutex.c: Define weak alias pthread_mutexattr_gettype and
614 pthread_mutexattr_settype.
615 * sysdeps/pthread/pthread.h: Declare these functions.
616 Move pthread_sigmask and pthread_kill declaration in separate header.
617 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
619 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
621 * Makefile: Add rules to compile and run tests.
622 * Examples/ex1.c: Little changes to fix warnings.
623 * Examples/ex2.c: Likewise.
624 * Examples/ex3.c: Likewise.
625 * Examples/ex4.c: Likewise.
626 * Examples/ex5.c: Likewise.
627 * Examples/ex6.c: New file.
629 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
631 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
633 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
635 * attr.c: Include <string.h>.
637 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
639 * attr.c: Include errno.h. Use memcpy to copy sched_param.
640 * internals.h: Include limits.h.
641 * manager.c: Use memcpy to copy sched_param.
642 * ptfork.c: Include errno.h.
643 * pthread.c: Likewise.
644 * semaphore.c: Likewise.
645 * specific.c: Likewise.
646 * spinlock.h: Likewise.
647 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
648 type definition to ...
649 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
651 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
653 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
655 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
656 as macros as demanded in POSIX.1, Annex C.
658 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
660 * internals.h (struct pthread_request): For free use pthread_t
661 instead of pthread_descr.
662 * join.c (pthread_join): Pass thread_id, not th to manager.
663 (pthread_detach): Likewise.
664 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
665 (pthread_exited): Remove detached queue code.
666 (pthread_handle_free): Expect thread ID parameter and use it to
667 validate the thread decsriptor. Don't use detached queue.
668 Patches by Xavier Leroy.
670 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
672 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
673 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
674 __pthread_atfork, __pthread_key_create, __pthread_once.
675 * internals.h: Doc fix.
676 * pthread.c (__pthread_initialize): Define again.
678 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
680 * manager.c (pthread_exited): If thread is not detached put it on
682 (pthread_handle_free): If thread is not on list with living threads
683 search on list with detached threads.
685 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
686 for new definition of pthread_rwlock_t.
688 * spinlock.c: Correct test whether to compile
689 __pthread_compare_and_swap or not.
691 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
693 * attr.c: Finish user stack support. Change locking code to be safe
694 in situations with different priorities.
695 * cancel.c: Likewise.
696 * condvar.c: Likewise.
697 * internals.h: Likewise.
699 * manager.c: Likewise.
701 * pthread.c: Likewise.
702 * ptlongjmp.c: Likewise.
704 * rwlock.c: Likewise.
705 * semaphore.c: Likewise.
706 * semaphore.h: Likewise.
707 * signals.c: Likewise.
708 * spinlock.c: Likewise.
709 * spinlock.h: Likewise.
710 * sysdeps/pthread/pthread.h: Likewise.
711 Patches by Xavier Leroy.
713 * sysdeps/i386/i686/pt-machine.h: New file.
715 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
717 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
718 [sg]et_stackaddr prototypes always available.
720 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
721 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
723 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
725 * manager.c (pthread_free): Undo patch from 980430.
726 Reported by David Wragg <dpw@doc.ic.ac.uk>.
728 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
730 * manager.c: Define __pthread_manager_adjust_prio and use it to
731 increase priority when needed.
732 * internals.h: Add prototype for __pthread_manager_adjust_prio.
733 * mutex.c: Optimize mutexes to wake up only one thread.
734 * pthread.c: Move PID of manager for global variable in structure
736 Patches by Xavier Leroy.
738 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
740 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
742 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
744 * attr.c: Correct typo.
746 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
748 * manager.c (pthread_free): Unmap guard before the stack.
749 Patch by Matthias Urlichs.
751 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
753 * manager.c (pthread_free): Detect already free child.
754 Patch by Xavier Leroy, reported by Matthias Urlichs.
756 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
758 * Makefile (linuxthreads-version): Renamed back from
761 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
763 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
766 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
768 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
769 * internals.h: Add definitions for new spinlock implementation.
770 * ptlongjmp.c: New file.
771 * spinlock.c: New file.
772 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
773 new function __pthread_acquire to prevent deadlocks with thread
774 with different priorities.
775 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
777 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
779 * manager.c (__pthread_manager): Reduce first argument to select
780 to include just the needed file descriptor.
782 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
784 * manager.c: Fix last patch which caused core dumps.
786 * pthread.c: Correctly handle missing SIGRTMIN.
788 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
790 * libpthread.map: Add __libc_internal_tsd_get and
791 __libc_internal_tsd_set. Add missing cancelable functions. Export
792 libc internal versions of the cancelable functions.
794 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
796 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
798 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
800 * attr.c: Implement pthread_attr_[gs]etguardsize,
801 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
802 Change pthread_attr_init to have two interfaces.
803 * internals.h (struct _pthread_descr_struct): Add new fields for
805 * libpthread.map: Add names in GLIBC_2.1 section.
806 * manager.c (pthread_handle_create): Implement guardsize and
808 (pthread_free): Likewise.
809 * pthread.c (pthread_create): Add new interface for changed
811 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
812 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
815 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
817 * manager.c: Enable resetting of the thread scheduling policy
818 to SCHED_OTHER when the parent thread has a different one.
820 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
822 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
823 _POSIX_ASYNCHRONOUS_IO.
825 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
827 * mutex.c: Implement new mutex types.
829 * internals.h: Include <signal.h>.
831 * libpthread.map: Add __erno_location and __h_errno_location.
833 * errno.c: Return pointer to variable actually in use. This might
834 not be the one in the thread structure.
835 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
837 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
838 of manager thread structure.
839 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
841 * pthread.c: Adapt initializer for thread structures.
842 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
843 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
844 current thread to global variables.
846 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
848 * rwlock.c: New file.
849 * Makefile (libpthread-routines): Add rwlock.
850 * sysdeps/pthread/pthread.h: Define data structures and declare
852 * libpthread.map: Add new functions.
854 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
856 * sysdeps/arm/pt-machine.h: New file; add ARM support.
857 * sysdeps/arm/Implies: likewise.
858 * README: Document it.
860 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
862 * signals.c: Remove unneeded initializer for sigwaited, saving a
865 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
867 * semaphore.c (sem_init): Set sem_spinlock only if available.
869 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
871 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
872 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
874 * Makefile: Update from LinuxThreads 0.7.
875 * internals.h. Likewise.
876 * manager.c: Likewise.
878 * pthread.c: Likewise.
879 * signals.c: Likewise.
880 * specific.c: Likewise.
881 * Examples/ex3.c: Likewise.
883 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
885 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
888 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
890 * wrapsyscall.c: Add socket functions which are also cancelation
893 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
895 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
896 New functions for fast thread specific data within libc.
898 * internals.h: Add new array p_libc_specific to struct
899 _pthread_descr_struct.
901 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
903 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
905 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
906 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
908 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
910 * internals.h (struct _pthread_descr_struct): Add definitions for
911 two-level specific key handling.
912 * manager.c (pthread_handle_create): Initialize specific memory array.
913 * specific.c: Implement two-level key handling.
914 * weaks.c: Don't provide dummy key handling.
915 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
916 Add definition of __libc_key_t.
917 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
919 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
920 PTHREAD_DESTRUCTOR_ITERATIONS.
922 * manager.c (pthread_handle_create): Compare mmap result with
925 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
926 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
928 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
930 sysdeps/sparc -> sysdeps/sparc/sparc32
931 sysdeps/sparc64 -> sysdeps/sparc/sparc64
933 * internals.h: Change definition of THREAD_SELF to be an expression,
934 not a statement that did a return.
935 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
936 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
937 Follow Solaris and use a "system reserved" register (%g6) to hold
938 the thread descriptor.
939 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
941 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
943 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
944 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
945 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
947 * semaphore.c: Include spinlock.h only when needed.
949 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
950 keys for entries not in use.
952 * weaks.c: Implement key handling functions for real.
954 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
956 Initial sparc64-linux support:
957 * linuxthreads/sysdeps/sparc64/Implies: New file.
958 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
960 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
962 * semaphore.c: Include spinlock.h at correct place.
965 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
967 The Great Bit File Move:
968 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
969 * sysdeps/powerpc/semaphorebits.h: Likewise.
970 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
971 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
972 * sysdeps/pthread/libc-lock.h: -> bits/
973 * sysdeps/pthread/stdio-lock.h: Likewise.
974 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
975 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
976 * semaphore.h: Likewise.
977 * sysdeps/pthread/pthread.h: Likewise.
979 * lockfile.c: <foo.h> -> <bits/foo.h>.
980 * semaphore.h: Likewise.
982 * Makefile: (headers): foo.h -> bits/foo.h.
983 * sysdeps/pthread/Makefile: Likewise.
985 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
987 * semaphore.c (sem_init): Set sem_spinlock only if available.
989 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
992 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
994 Update from LinuxThreads 0.6.
996 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
997 and __sched_get_priority_min instead of names without `__'.
999 * manager.c: Rewrite large parts to implement opaque pthread_t.
1001 * cancel.c: Adapt for opaque pthread_t type.
1002 * condvar.c: Likewise.
1003 * errno.c: Likewise.
1005 * mutex.c: Likewise.
1006 * pthread.c: Likewise.
1007 * signals.c: Likewise.
1008 * specific.c: Likewise.
1009 * restart.h: Likewise.
1010 * queue.h: Likewise.
1011 * Examples/ex3.c: Likewise.
1012 * Examples/ex4.c: Likewise.
1013 * sysdeps/pthread/pthread.h: Likewise.
1015 * pthread.c: Accumulate time for all threads in thread manager.
1017 * semaphore.c: Implement fallback implementation for architectures
1018 sometimes missing compare-exchange operations.
1020 * cancel.c (pthread_cancel): Validate handle argument.
1021 * join.c (pthread_join): Likewise.
1022 (pthread_detach): Likewise.
1023 * signals.c (pthread_kill): Likewise.
1025 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1027 * queue.h (enqueue): Enqueue thread according to priority.
1029 * internals.c (struct pthread_start_args): New struct for passing
1030 args to cloning function.
1031 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1034 * Examples/Makefile (clean): Pass -f option to rm.
1036 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1037 and define TEST_FOR_COMPARE_AND_SWAP.
1038 * sysdeps/i386/i486/pt-machine.h: Removed.
1040 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1043 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1045 * restart.h (suspend): Clear p_signal before suspending.
1046 (suspend_with_cancellation): Likewise.
1047 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1049 * weaks.c: Make __pthread_key_create return 1.
1050 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1051 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1052 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1055 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1057 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1059 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1061 * sysdeps/powerpc/Implies: Added.
1062 * sysdeps/powerpc/pt-machine.h: Added.
1063 * sysdeps/powerpc/semaphorebits.h: Added.
1065 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1067 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1069 (__pthread_manager_thread): Likewise.
1070 Reported by Andreas Jaeger.
1072 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1074 Since sigset_t no longer fits in a register, we can't pass in the
1075 thread's initial mask so easily. Take this opportunity to simplify
1076 the clone implementation by only accepting a single void* argument.
1078 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1079 in the thread struct instead of as arguments through clone.
1080 (pthread_start_thread): Look for them there.
1081 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1082 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1083 * linuxthreads/pthread.c (pthread_initialize_manager): Revise