1 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
4 and pthread_handle_sigcancel with functions that restore
5 %gs from the signal context. For each signal handling function,
6 two wrappers are required, one for a non-RT signal and one for
8 * linuxthreads/signal.c: For i386, add code to restore %gs
9 from the signal context in pthread_sighandler and
10 pthread_sighandler_rt.
12 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
14 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
16 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
18 * pthread.c (__pthread_initial_thread): Pass argument to
19 PTHREAD_START_ARGS_INITIALIZER.
20 (__pthread_manager_thread): Likewise.
22 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
25 * manager.c (pthread_handle_create): Remove p_startfct initialization.
27 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
29 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
31 * internals.h: Correct return types for __libc_read and __libc_write.
33 1999-10-09 Andreas Jaeger <aj@suse.de>
35 * internals.h: Add __new_sem_post to get prototype in
36 manager.c; include semaphore.h for needed types.
38 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
40 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
41 directly instead of calling sem_post which should not be necessary
42 but is faster and might help in some case to work around problems.
43 Patch by khendricks@ivey.uwo.ca [libc/1382].
45 1999-10-08 Andreas Schwab <schwab@suse.de>
47 * sysdeps/pthread/Subdirs: New file.
50 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
53 * internals.h (struct _pthread_descr_struct): Add p_startfct.
54 * manager.c (pthread_handle_create): Initialize p_startfct.
55 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
57 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
59 * manager.c (__linuxthreads_pthread_threads_max): New variable.
60 * specific.c (__linuxthreads_pthread_keys_max): New variable.
61 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
63 * condvar.c (pthread_cond_timedwait_relative): Never return with
64 EINTR. Patch by Andreas Schwab.
66 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
68 * signals.c (sigaction): Correct last patch. Don't select
69 pthread_sighandler_rt based on the signal number but instead of
72 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
74 * specific.c: Move definitions of struct pthread_key_struct and
76 * internals.h: ...here.
78 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
80 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
81 this instead of pthread_handle_sigrestart if the signal is an RT
84 * signals.c: Handle passing through of sighandler arguments also
85 for real-time signals.
87 1999-09-03 Andreas Schwab <schwab@suse.de>
89 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
91 (__vfork): New function, alias vfork.
92 * Versions: Export __fork, vfork, and __vfork in libpthread.
94 1999-08-23 Andreas Schwab <schwab@suse.de>
96 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
97 call to signal handler.
99 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
101 * pthread.c (__pthread_reset_main_thread): Undo last change.
102 (__pthread_kill_other_threads_np): Reset signal handlers for the
103 signals we used in the thread implementation here.
105 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
107 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
108 for the signals we used in the thread implementation [PR libc/1234].
110 * Versions: Export __pthread_kill_other_threads_np from libpthread
113 * signals.c: Pass sigcontext through wrapper to the user function.
115 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
117 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
118 __libc_internal_tsd_set.
120 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
122 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
125 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
127 * internals.h: Align _pthread_descr_struct to 32 bytes.
128 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
131 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
133 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
136 1999-07-09 Cristian Gafton <gafton@redhat.com>
138 * Makefile (libpthread-routines): Add oldsemaphore routine.
139 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
140 sem_trywait, and sem_wait to GLIBC_2.1.
141 * oldsemaphore.c: New file.
142 * semaphore.c: Add default_symbol_versions for the changed functions.
143 (__new_sem_init): Rename from sem_init.
144 (__new_sem_post): Rename from sem_post.
145 (__new_sem_wait): Rename from sem_wait.
146 (__new_sem_trywait): Rename from sem_trywait.
147 (__new_sem_getvalue): Rename from sem_getvalue.
148 (__new_sem_destroy): Rename from sem_destroy.
150 1999-06-23 Robey Pointer <robey@netscape.com>
152 * internals.h: Added p_nextlock entry to separate queueing for a
153 lock from queueing for a CV (sometimes a thread queues on a lock
154 to serialize removing itself from a CV queue).
155 * pthread.c: Added p_nextlock to initializers.
156 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
158 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
160 * manager.c (pthread_handle_create): Free mmap region after stack
161 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
163 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
165 * man/pthread_cond_init.man: Correct example.
166 Reported by Tomas Berndtsson <tomas@nocrew.org>.
168 * linuxthreads.texi (Condition Variables): Likewise.
170 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
172 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
173 casx not cas, also successful casx returns the old value in rd
174 and not the new value.
176 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
178 * manager.c: If pthread_create() is given a NULL attribute
179 and the thread manager runs with a realtime policy, set the
180 scheduling policy of the newly created thread back to SCHED_OTHER.
181 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
182 initialize the schedpolicy field of new_thread->p_start_args
183 to that of the calling thread.
185 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
187 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
188 instruction does not allow memory element to use offset.
190 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
192 * manager.c (pthread_allocate_stack): Optimize initialization of new
195 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
196 Don't use initializer since it is all zeroes.
197 (__libc_once_define): Likewise.
199 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
201 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
202 doesn't exist anymore.
203 * sysdeps/i386/Implies: Likewise.
204 * sysdeps/m68k/Implies: Likewise.
205 * sysdeps/mips/Implies: Likewise.
206 * sysdeps/powerpc/Implies: Likewise.
207 * sysdeps/sparc/sparc32/Implies: Likewise.
208 * sysdeps/sparc/sparc64/Implies: Likewise.
210 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
212 * sysdeps/alpha/bits/semaphore.h: Removed.
213 * sysdeps/powerpc/bits/semaphore.h: Removed.
214 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
215 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
216 * Makefile (headers): Remove bits/semaphore.h.
218 * semaphore.h: Define _pthread_descr if necessary.
219 Don't include limits.h. Define SEM_VALUE_MAX directly.
221 (sem_t): Protect element names with leading __.
222 Add declarations for sem_close, sem_open, and sem_unlink.
223 * semaphore.c: Adjust all functions for new element names.
224 Define sem_close, sem_open, and sem_unlink.
225 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
227 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
230 1999-03-16 H.J. Lu <hjl@gnu.org>
232 * specific.c (pthread_key_delete): Check th->p_terminated to see
233 if the thread is running.
235 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
236 Added to GLIBC_2.0 for libc.so.
238 1999-02-12 H.J. Lu <hjl@gnu.org>
240 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
241 __libc_allocate_rtsig): Added to GLIBC_2.1.
243 * internals.h (DEFAULT_SIG_RESTART): Removed.
244 (DEFAULT_SIG_CANCEL): Removed.
246 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
247 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
248 (__pthread_sig_restart, __pthread_sig_cancel,
249 __pthread_sig_debug): Initialized.
250 (pthread_initialize): Call init_rtsigs () to initialize
253 1999-02-03 H.J. Lu <hjl@gnu.org>
255 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
256 Don't restart the thread which sent REQ_DEBUG.
257 (pthread_start_thread): Check if __pthread_sig_debug > 0
260 * pthread.c (__pthread_initialize_manager): Suspend ourself
261 after sending __pthread_sig_debug to gdb instead of
262 __pthread_sig_cancel.
264 1999-01-24 H.J. Lu <hjl@gnu.org>
266 * manager.c (__pthread_manager): Delete __pthread_sig_debug
267 from mask if __pthread_sig_debug > 0.
268 (pthread_handle_create): Increment __pthread_handles_num.
270 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
271 * pthread.c (__pthread_initialize_manager): Likewise.
273 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
274 instead of __libc_allocate_rtsig (2).
275 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
276 instead of __pthread_sig_cancel.
277 (pthread_handle_sigdebug): Fix comments.
279 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
281 * manager.c (pthread_allocate_stack): Set
282 __pthread_nonstandard_stacks if user-specified stack is used.
284 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
286 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
287 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
289 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
291 * pthread.c: Use a third signal __pthread_sig_debug distinct
292 from __pthread_sig_cancel to notify gdb when a thread is
294 * manager.c: Likewise.
295 * internals.h: Likewise.
296 * signals.c: The implementation of sigwait(s) assumed that
297 all signals in s have signal handlers already attached.
298 This is not required by the standard, so make it work
299 also if some of the signals have no handlers.
301 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
303 * linuxthreads.texi: Remove pointers from first @node. Move old
304 @node spec inside comment.
306 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
308 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
311 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
313 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
314 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
316 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
318 * manager.c: Threads now send __pthread_sig_cancel on termination.
319 Change clone call and signal masks.
320 * thread.c (pthread_handle_sigrestart): Remove special code for
322 (pthread_handle_sigcancel): In manager thread call
323 __pthread_manager_sighandler.
324 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
325 * sysdeps/i386/i686/pt-machine.h: Likewise.
326 Patches by Xavier Leroy.
328 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
330 * spinlock.c (__pthread_unlock): Don't crash if called for an
331 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
333 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
336 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
338 * Examples/ex3.c: Wait until all threads are started before
339 searching for the number to avoid race condition on very fast
342 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
344 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
345 declaration since it's not needed.
347 * sysdeps/pthread/pthread.h: Move internal functions to ...
348 * internals.h: ...here.
350 1998-12-02 H.J. Lu <hjl@gnu.org>
352 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
354 (__pthread_sig_cancel): Likewise.
356 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
358 * wrapsyscall.c: Include <sys/mman.h> for msync,
359 <stdlib.h> for system and <termios.h> for tcdrain prototype.
360 Correct msync declaration.
362 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
364 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
365 __libc_tsd_set): New macros for new interface.
366 * no-tsd.c: New file, provide uninitialized defns of
367 __libc_internal_tsd_get and __libc_internal_tsd_set.
368 * Makefile (routines): Add no-tsd.
370 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
372 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
373 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
374 __libc_internal_tsd_set): Move decls to ...
375 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
378 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
379 __libc_internal_tsd_set): Make these pointers to functions, not
380 functions; remove #pragma weak decls for them.
381 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
382 Define static functions and initialized pointers to them.
384 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
386 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
387 (CFLAGS-specific.c): Likewise.
388 (CFLAGS-pthread.c): Likewise.
389 (CFLAGS-ptfork.c): Likewise.
390 (CFLAGS-cancel.c): Likewise.
391 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
392 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
394 * mutex.c (pthread_mutex_init): Define as strong symbol.
395 (pthread_mutex_destroy): Likewise.
396 (pthread_mutex_trylock): Likewise.
397 (pthread_mutex_lock): Likewise.
398 (pthread_mutex_unlock): Likewise.
399 (pthread_mutexattr_init): Likewise.
400 (pthread_mutexattr_destroy): Likewise.
401 (pthread_once): Likewise.
402 * ptfork.c (pthread_atfork): Likewise.
403 * specific.c (pthread_key_create): Likewise.
404 (pthread_setspecific): Likewise.
405 (pthread_getspecific): Likewise.
407 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
409 * linuxthreads.texi: Fix punctuation after xref.
411 1998-11-10 H.J. Lu <hjl@gnu.org>
413 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
414 if it is defined in <linux/limits.h>.
416 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
418 * spinlock.h (__pthread_trylock): Define inline.
419 (__pthread_lock): Add extra parameter to declaration. Declare
420 using internal_function.
421 (__pthread_unlock): Declare using internal_function.
422 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
423 of local variable self. Avoid recomputing self. Define using
425 (__pthread_trylock): Remove.
426 (__pthread_unlock): Define using internal_function.
427 * cancel.c: Adjust for __pthread_lock interface change. Use already
428 computed self value is possible.
429 * condvar.c: Likewise.
431 * manager.c: Likewise.
433 * pthread.c: Likewise.
434 * rwlock.c: Likewise.
435 * semaphore.c: Likewise.
436 * signals.c: Likewise.
438 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
440 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
441 __ to field names of the struct.
442 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
444 (pthread_attr_t): Likewise.
445 (pthread_cond_t): Likewise.
446 (pthread_condattr_t): Likewise.
447 (pthread_mutex_t): Likewise.
448 (pthread_mutexattr_t): Likewise.
449 (pthread_rwlock_t): Likewise.
450 (pthread_rwlockattr_t): Likewise.
451 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
452 * cancel.c: Likewise.
453 * condvar.c: Likewise.
454 * manager.c: Likewise.
456 * pthread.c: Likewise.
457 * ptlongjmp.c: Likewise.
458 * rwlock.c: Likewise.
459 * spinlock.c: Likewise.
461 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
463 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
466 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
469 * Makefile (libpthread-routines): Add pt-machine.
470 * pt-machine.c: New file.
471 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
472 yet defined. Use PT_EI in extern inline definitions.
473 * sysdeps/arm/pt-machine.h: Likewise.
474 * sysdeps/i386/pt-machine.h: Likewise.
475 * sysdeps/i386/i686/pt-machine.h: Likewise.
476 * sysdeps/m68k/pt-machine.h: Likewise.
477 * sysdeps/mips/pt-machine.h: Likewise.
478 * sysdeps/powerpc/pt-machine.h: Likewise.
479 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
480 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
482 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
484 * semaphore.h: Include <sys/types.h> so that _pthread_descr
487 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
489 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
491 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
493 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
495 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
496 multiple inclusion guard.
498 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
500 * signals.c (sigaction): Check that sig is less than NSIG to avoid
501 array index overflow.
503 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
505 * sysdeps/pthread/semaphore.h: New file.
507 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
509 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
510 _LIBC_TSD_KEY_DL_ERROR.
512 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
514 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
515 * sysdeps/i386/pt-machine.h: Likewise.
516 Suggested by Roland McGrath.
518 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
520 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
521 access thread data with non-constant offsets.
522 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
525 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
526 THREAD_SETMEM_NC definitions.
528 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
530 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
532 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
534 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
536 (struct _pthread_descr_struct): Add p_self and p_nr field.
537 * manager.c (__pthread_handles): Define second element to point
539 (__pthread_handles_num): Initialize to 2.
540 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
541 (pthread_start_thread): Likewise.
542 (pthread_handle_create): Start search for free slot at entry 2.
543 Initialize new fields p_self and p_nr.
544 Call __clone with CLONE_PTRACE if available.
545 (pthread_free): Call FREE_THREAD_SELF if available.
546 * pthread.c (__pthread_initial_thread): Initialize new fields.
547 (__pthread_manager_thread): Likewise.
548 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
550 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
551 elements of the thread descriptor.
552 * condvar.c: Likewise.
555 * manager.c: Likewise.
556 * pthread.c: Likewise.
557 * ptlongjmp.c: Likewise.
558 * semaphore.c: Likewise.
559 * signals.c: Likewise.
560 * specific.c: Likewise.
561 * spinlock.c: Likewise.
563 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
565 * sysdeps/i386/useldt.h: New file.
566 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
568 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
569 THREAD_SETMEM using __thread_self.
570 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
572 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
574 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
575 turned out that we didn't need to queue after all.
577 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
579 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
580 and wastes space; correct types.
582 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
584 * signals.c (sigaction): Handle NULL argument.
586 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
588 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
591 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
593 * Makefile (linuxthreads-version): Extract correct number from
596 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
598 * Banner: Bump version number to 0.8
599 * FAQ.html: Many updates, in particular w.r.t. debugging.
600 * manager.c: Support for non-default stacksize for
601 LinuxThreads-allocated stacks;
602 don't use guard pages for stacks with default size, rely on
603 rlimit(RLIMIT_STACK) instead (it's cheaper).
605 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
606 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
607 * condvar.c: Likewise.
608 * internals.h: Likewise.
609 * restart.h: Likewise.
610 * signals.c: Likewise.
611 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
613 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
615 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
616 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
617 * Versions: Put __pthread_mutexattr_settype under version
618 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
619 __pthread_mutexattr_gettype.
621 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
623 * sysdeps/pthread/bits/libc-lock.h: Make
624 __pthread_mutexattr_settype weak. Don't make
625 __pthread_mutexattr_setkind_np weak.
627 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
629 * manager.c (pthread_handle_create): Check whether sched_setscheduler
630 call can succeed here.
632 * mutex.c: Define __pthread_mutexattr_settype and make
633 __pthread_mutexattr_setkind_np an alias.
634 Likewise for __pthread_mutexattr_gettype.
636 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
638 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
641 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
643 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
645 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
647 * Examples/ex6.c: Include <unistd.h> for usleep.
649 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
651 * Examples/ex4.c (main): Use exit, not pthread_exit.
653 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
655 * Versions: Add __pthread_mutexattr_gettype and
656 __pthread_mutexattr_settype.
657 * lockfile.c: Use __pthread_mutexattr_settype instead of
658 __pthread_mutexattr_setkind_np.
659 * mutex.c: Define __pthread_mutexattr_gettype and
660 __pthread_mutexattr_settype.
662 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
663 __pthread_mutexattr_settype.
664 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
665 Use __pthread_mutexattr_settype.
667 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
669 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
670 * mutex.c: Define weak alias pthread_mutexattr_gettype and
671 pthread_mutexattr_settype.
672 * sysdeps/pthread/pthread.h: Declare these functions.
673 Move pthread_sigmask and pthread_kill declaration in separate header.
674 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
676 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
678 * Makefile: Add rules to compile and run tests.
679 * Examples/ex1.c: Little changes to fix warnings.
680 * Examples/ex2.c: Likewise.
681 * Examples/ex3.c: Likewise.
682 * Examples/ex4.c: Likewise.
683 * Examples/ex5.c: Likewise.
684 * Examples/ex6.c: New file.
686 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
688 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
690 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
692 * attr.c: Include <string.h>.
694 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
696 * attr.c: Include errno.h. Use memcpy to copy sched_param.
697 * internals.h: Include limits.h.
698 * manager.c: Use memcpy to copy sched_param.
699 * ptfork.c: Include errno.h.
700 * pthread.c: Likewise.
701 * semaphore.c: Likewise.
702 * specific.c: Likewise.
703 * spinlock.h: Likewise.
704 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
705 type definition to ...
706 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
708 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
710 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
712 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
713 as macros as demanded in POSIX.1, Annex C.
715 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
717 * internals.h (struct pthread_request): For free use pthread_t
718 instead of pthread_descr.
719 * join.c (pthread_join): Pass thread_id, not th to manager.
720 (pthread_detach): Likewise.
721 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
722 (pthread_exited): Remove detached queue code.
723 (pthread_handle_free): Expect thread ID parameter and use it to
724 validate the thread decsriptor. Don't use detached queue.
725 Patches by Xavier Leroy.
727 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
729 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
730 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
731 __pthread_atfork, __pthread_key_create, __pthread_once.
732 * internals.h: Doc fix.
733 * pthread.c (__pthread_initialize): Define again.
735 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
737 * manager.c (pthread_exited): If thread is not detached put it on
739 (pthread_handle_free): If thread is not on list with living threads
740 search on list with detached threads.
742 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
743 for new definition of pthread_rwlock_t.
745 * spinlock.c: Correct test whether to compile
746 __pthread_compare_and_swap or not.
748 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
750 * attr.c: Finish user stack support. Change locking code to be safe
751 in situations with different priorities.
752 * cancel.c: Likewise.
753 * condvar.c: Likewise.
754 * internals.h: Likewise.
756 * manager.c: Likewise.
758 * pthread.c: Likewise.
759 * ptlongjmp.c: Likewise.
761 * rwlock.c: Likewise.
762 * semaphore.c: Likewise.
763 * semaphore.h: Likewise.
764 * signals.c: Likewise.
765 * spinlock.c: Likewise.
766 * spinlock.h: Likewise.
767 * sysdeps/pthread/pthread.h: Likewise.
768 Patches by Xavier Leroy.
770 * sysdeps/i386/i686/pt-machine.h: New file.
772 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
774 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
775 [sg]et_stackaddr prototypes always available.
777 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
778 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
780 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
782 * manager.c (pthread_free): Undo patch from 980430.
783 Reported by David Wragg <dpw@doc.ic.ac.uk>.
785 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
787 * manager.c: Define __pthread_manager_adjust_prio and use it to
788 increase priority when needed.
789 * internals.h: Add prototype for __pthread_manager_adjust_prio.
790 * mutex.c: Optimize mutexes to wake up only one thread.
791 * pthread.c: Move PID of manager for global variable in structure
793 Patches by Xavier Leroy.
795 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
797 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
799 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
801 * attr.c: Correct typo.
803 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
805 * manager.c (pthread_free): Unmap guard before the stack.
806 Patch by Matthias Urlichs.
808 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
810 * manager.c (pthread_free): Detect already free child.
811 Patch by Xavier Leroy, reported by Matthias Urlichs.
813 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
815 * Makefile (linuxthreads-version): Renamed back from
818 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
820 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
823 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
825 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
826 * internals.h: Add definitions for new spinlock implementation.
827 * ptlongjmp.c: New file.
828 * spinlock.c: New file.
829 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
830 new function __pthread_acquire to prevent deadlocks with thread
831 with different priorities.
832 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
834 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
836 * manager.c (__pthread_manager): Reduce first argument to select
837 to include just the needed file descriptor.
839 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
841 * manager.c: Fix last patch which caused core dumps.
843 * pthread.c: Correctly handle missing SIGRTMIN.
845 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
847 * libpthread.map: Add __libc_internal_tsd_get and
848 __libc_internal_tsd_set. Add missing cancelable functions. Export
849 libc internal versions of the cancelable functions.
851 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
853 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
855 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
857 * attr.c: Implement pthread_attr_[gs]etguardsize,
858 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
859 Change pthread_attr_init to have two interfaces.
860 * internals.h (struct _pthread_descr_struct): Add new fields for
862 * libpthread.map: Add names in GLIBC_2.1 section.
863 * manager.c (pthread_handle_create): Implement guardsize and
865 (pthread_free): Likewise.
866 * pthread.c (pthread_create): Add new interface for changed
868 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
869 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
872 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
874 * manager.c: Enable resetting of the thread scheduling policy
875 to SCHED_OTHER when the parent thread has a different one.
877 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
879 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
880 _POSIX_ASYNCHRONOUS_IO.
882 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
884 * mutex.c: Implement new mutex types.
886 * internals.h: Include <signal.h>.
888 * libpthread.map: Add __erno_location and __h_errno_location.
890 * errno.c: Return pointer to variable actually in use. This might
891 not be the one in the thread structure.
892 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
894 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
895 of manager thread structure.
896 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
898 * pthread.c: Adapt initializer for thread structures.
899 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
900 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
901 current thread to global variables.
903 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
905 * rwlock.c: New file.
906 * Makefile (libpthread-routines): Add rwlock.
907 * sysdeps/pthread/pthread.h: Define data structures and declare
909 * libpthread.map: Add new functions.
911 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
913 * sysdeps/arm/pt-machine.h: New file; add ARM support.
914 * sysdeps/arm/Implies: likewise.
915 * README: Document it.
917 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
919 * signals.c: Remove unneeded initializer for sigwaited, saving a
922 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
924 * semaphore.c (sem_init): Set sem_spinlock only if available.
926 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
928 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
929 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
931 * Makefile: Update from LinuxThreads 0.7.
932 * internals.h. Likewise.
933 * manager.c: Likewise.
935 * pthread.c: Likewise.
936 * signals.c: Likewise.
937 * specific.c: Likewise.
938 * Examples/ex3.c: Likewise.
940 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
942 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
945 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
947 * wrapsyscall.c: Add socket functions which are also cancelation
950 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
952 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
953 New functions for fast thread specific data within libc.
955 * internals.h: Add new array p_libc_specific to struct
956 _pthread_descr_struct.
958 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
960 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
962 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
963 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
965 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
967 * internals.h (struct _pthread_descr_struct): Add definitions for
968 two-level specific key handling.
969 * manager.c (pthread_handle_create): Initialize specific memory array.
970 * specific.c: Implement two-level key handling.
971 * weaks.c: Don't provide dummy key handling.
972 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
973 Add definition of __libc_key_t.
974 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
976 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
977 PTHREAD_DESTRUCTOR_ITERATIONS.
979 * manager.c (pthread_handle_create): Compare mmap result with
982 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
983 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
985 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
987 sysdeps/sparc -> sysdeps/sparc/sparc32
988 sysdeps/sparc64 -> sysdeps/sparc/sparc64
990 * internals.h: Change definition of THREAD_SELF to be an expression,
991 not a statement that did a return.
992 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
993 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
994 Follow Solaris and use a "system reserved" register (%g6) to hold
995 the thread descriptor.
996 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
998 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1000 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1001 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1002 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1004 * semaphore.c: Include spinlock.h only when needed.
1006 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1007 keys for entries not in use.
1009 * weaks.c: Implement key handling functions for real.
1011 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1013 Initial sparc64-linux support:
1014 * linuxthreads/sysdeps/sparc64/Implies: New file.
1015 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1017 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1019 * semaphore.c: Include spinlock.h at correct place.
1022 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1024 The Great Bit File Move:
1025 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1026 * sysdeps/powerpc/semaphorebits.h: Likewise.
1027 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1028 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1029 * sysdeps/pthread/libc-lock.h: -> bits/
1030 * sysdeps/pthread/stdio-lock.h: Likewise.
1031 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1032 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1033 * semaphore.h: Likewise.
1034 * sysdeps/pthread/pthread.h: Likewise.
1036 * lockfile.c: <foo.h> -> <bits/foo.h>.
1037 * semaphore.h: Likewise.
1039 * Makefile: (headers): foo.h -> bits/foo.h.
1040 * sysdeps/pthread/Makefile: Likewise.
1042 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1044 * semaphore.c (sem_init): Set sem_spinlock only if available.
1046 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1049 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1051 Update from LinuxThreads 0.6.
1053 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1054 and __sched_get_priority_min instead of names without `__'.
1056 * manager.c: Rewrite large parts to implement opaque pthread_t.
1058 * cancel.c: Adapt for opaque pthread_t type.
1059 * condvar.c: Likewise.
1060 * errno.c: Likewise.
1062 * mutex.c: Likewise.
1063 * pthread.c: Likewise.
1064 * signals.c: Likewise.
1065 * specific.c: Likewise.
1066 * restart.h: Likewise.
1067 * queue.h: Likewise.
1068 * Examples/ex3.c: Likewise.
1069 * Examples/ex4.c: Likewise.
1070 * sysdeps/pthread/pthread.h: Likewise.
1072 * pthread.c: Accumulate time for all threads in thread manager.
1074 * semaphore.c: Implement fallback implementation for architectures
1075 sometimes missing compare-exchange operations.
1077 * cancel.c (pthread_cancel): Validate handle argument.
1078 * join.c (pthread_join): Likewise.
1079 (pthread_detach): Likewise.
1080 * signals.c (pthread_kill): Likewise.
1082 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1084 * queue.h (enqueue): Enqueue thread according to priority.
1086 * internals.c (struct pthread_start_args): New struct for passing
1087 args to cloning function.
1088 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1091 * Examples/Makefile (clean): Pass -f option to rm.
1093 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1094 and define TEST_FOR_COMPARE_AND_SWAP.
1095 * sysdeps/i386/i486/pt-machine.h: Removed.
1097 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1100 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1102 * restart.h (suspend): Clear p_signal before suspending.
1103 (suspend_with_cancellation): Likewise.
1104 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1106 * weaks.c: Make __pthread_key_create return 1.
1107 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1108 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1109 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1112 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1114 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1116 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1118 * sysdeps/powerpc/Implies: Added.
1119 * sysdeps/powerpc/pt-machine.h: Added.
1120 * sysdeps/powerpc/semaphorebits.h: Added.
1122 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1124 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1126 (__pthread_manager_thread): Likewise.
1127 Reported by Andreas Jaeger.
1129 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1131 Since sigset_t no longer fits in a register, we can't pass in the
1132 thread's initial mask so easily. Take this opportunity to simplify
1133 the clone implementation by only accepting a single void* argument.
1135 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1136 in the thread struct instead of as arguments through clone.
1137 (pthread_start_thread): Look for them there.
1138 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1139 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1140 * linuxthreads/pthread.c (pthread_initialize_manager): Revise