1 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3 * internals.h: Align _pthread_descr_struct to 32 bytes.
4 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
7 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
9 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
12 1999-07-09 Cristian Gafton <gafton@redhat.com>
14 * Makefile (libpthread-routines): Add oldsemaphore routine.
15 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
16 sem_trywait, and sem_wait to GLIBC_2.1.
17 * oldsemaphore.c: New file.
18 * semaphore.c: Add default_symbol_versions for the changed functions.
19 (__new_sem_init): Rename from sem_init.
20 (__new_sem_post): Rename from sem_post.
21 (__new_sem_wait): Rename from sem_wait.
22 (__new_sem_trywait): Rename from sem_trywait.
23 (__new_sem_getvalue): Rename from sem_getvalue.
24 (__new_sem_destroy): Rename from sem_destroy.
26 1999-06-23 Robey Pointer <robey@netscape.com>
28 * internals.h: Added p_nextlock entry to separate queueing for a
29 lock from queueing for a CV (sometimes a thread queues on a lock
30 to serialize removing itself from a CV queue).
31 * pthread.c: Added p_nextlock to initializers.
32 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
34 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
36 * manager.c (pthread_handle_create): Free mmap region after stack
37 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
39 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
41 * man/pthread_cond_init.man: Correct example.
42 Reported by Tomas Berndtsson <tomas@nocrew.org>.
44 * linuxthreads.texi (Condition Variables): Likewise.
46 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
48 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
49 casx not cas, also successful casx returns the old value in rd
50 and not the new value.
52 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
54 * manager.c: If pthread_create() is given a NULL attribute
55 and the thread manager runs with a realtime policy, set the
56 scheduling policy of the newly created thread back to SCHED_OTHER.
57 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
58 initialize the schedpolicy field of new_thread->p_start_args
59 to that of the calling thread.
61 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
63 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
64 instruction does not allow memory element to use offset.
66 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
68 * manager.c (pthread_allocate_stack): Optimize initialization of new
71 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
72 Don't use initializer since it is all zeroes.
73 (__libc_once_define): Likewise.
75 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
77 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
78 doesn't exist anymore.
79 * sysdeps/i386/Implies: Likewise.
80 * sysdeps/m68k/Implies: Likewise.
81 * sysdeps/mips/Implies: Likewise.
82 * sysdeps/powerpc/Implies: Likewise.
83 * sysdeps/sparc/sparc32/Implies: Likewise.
84 * sysdeps/sparc/sparc64/Implies: Likewise.
86 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
88 * sysdeps/alpha/bits/semaphore.h: Removed.
89 * sysdeps/powerpc/bits/semaphore.h: Removed.
90 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
91 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
92 * Makefile (headers): Remove bits/semaphore.h.
94 * semaphore.h: Define _pthread_descr if necessary.
95 Don't include limits.h. Define SEM_VALUE_MAX directly.
97 (sem_t): Protect element names with leading __.
98 Add declarations for sem_close, sem_open, and sem_unlink.
99 * semaphore.c: Adjust all functions for new element names.
100 Define sem_close, sem_open, and sem_unlink.
101 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
103 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
106 1999-03-16 H.J. Lu <hjl@gnu.org>
108 * specific.c (pthread_key_delete): Check th->p_terminated to see
109 if the thread is running.
111 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
112 Added to GLIBC_2.0 for libc.so.
114 1999-02-12 H.J. Lu <hjl@gnu.org>
116 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
117 __libc_allocate_rtsig): Added to GLIBC_2.1.
119 * internals.h (DEFAULT_SIG_RESTART): Removed.
120 (DEFAULT_SIG_CANCEL): Removed.
122 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
123 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
124 (__pthread_sig_restart, __pthread_sig_cancel,
125 __pthread_sig_debug): Initialized.
126 (pthread_initialize): Call init_rtsigs () to initialize
129 1999-02-03 H.J. Lu <hjl@gnu.org>
131 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
132 Don't restart the thread which sent REQ_DEBUG.
133 (pthread_start_thread): Check if __pthread_sig_debug > 0
136 * pthread.c (__pthread_initialize_manager): Suspend ourself
137 after sending __pthread_sig_debug to gdb instead of
138 __pthread_sig_cancel.
140 1999-01-24 H.J. Lu <hjl@gnu.org>
142 * manager.c (__pthread_manager): Delete __pthread_sig_debug
143 from mask if __pthread_sig_debug > 0.
144 (pthread_handle_create): Increment __pthread_handles_num.
146 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
147 * pthread.c (__pthread_initialize_manager): Likewise.
149 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
150 instead of __libc_allocate_rtsig (2).
151 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
152 instead of __pthread_sig_cancel.
153 (pthread_handle_sigdebug): Fix comments.
155 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
157 * manager.c (pthread_allocate_stack): Set
158 __pthread_nonstandard_stacks if user-specified stack is used.
160 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
162 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
163 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
165 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
167 * pthread.c: Use a third signal __pthread_sig_debug distinct
168 from __pthread_sig_cancel to notify gdb when a thread is
170 * manager.c: Likewise.
171 * internals.h: Likewise.
172 * signals.c: The implementation of sigwait(s) assumed that
173 all signals in s have signal handlers already attached.
174 This is not required by the standard, so make it work
175 also if some of the signals have no handlers.
177 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
179 * linuxthreads.texi: Remove pointers from first @node. Move old
180 @node spec inside comment.
182 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
184 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
187 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
189 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
190 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
192 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
194 * manager.c: Threads now send __pthread_sig_cancel on termination.
195 Change clone call and signal masks.
196 * thread.c (pthread_handle_sigrestart): Remove special code for
198 (pthread_handle_sigcancel): In manager thread call
199 __pthread_manager_sighandler.
200 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
201 * sysdeps/i386/i686/pt-machine.h: Likewise.
202 Patches by Xavier Leroy.
204 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
206 * spinlock.c (__pthread_unlock): Don't crash if called for an
207 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
209 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
212 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
214 * Examples/ex3.c: Wait until all threads are started before
215 searching for the number to avoid race condition on very fast
218 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
220 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
221 declaration since it's not needed.
223 * sysdeps/pthread/pthread.h: Move internal functions to ...
224 * internals.h: ...here.
226 1998-12-02 H.J. Lu <hjl@gnu.org>
228 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
230 (__pthread_sig_cancel): Likewise.
232 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
234 * wrapsyscall.c: Include <sys/mman.h> for msync,
235 <stdlib.h> for system and <termios.h> for tcdrain prototype.
236 Correct msync declaration.
238 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
240 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
241 __libc_tsd_set): New macros for new interface.
242 * no-tsd.c: New file, provide uninitialized defns of
243 __libc_internal_tsd_get and __libc_internal_tsd_set.
244 * Makefile (routines): Add no-tsd.
246 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
248 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
249 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
250 __libc_internal_tsd_set): Move decls to ...
251 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
254 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
255 __libc_internal_tsd_set): Make these pointers to functions, not
256 functions; remove #pragma weak decls for them.
257 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
258 Define static functions and initialized pointers to them.
260 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
262 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
263 (CFLAGS-specific.c): Likewise.
264 (CFLAGS-pthread.c): Likewise.
265 (CFLAGS-ptfork.c): Likewise.
266 (CFLAGS-cancel.c): Likewise.
267 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
268 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
270 * mutex.c (pthread_mutex_init): Define as strong symbol.
271 (pthread_mutex_destroy): Likewise.
272 (pthread_mutex_trylock): Likewise.
273 (pthread_mutex_lock): Likewise.
274 (pthread_mutex_unlock): Likewise.
275 (pthread_mutexattr_init): Likewise.
276 (pthread_mutexattr_destroy): Likewise.
277 (pthread_once): Likewise.
278 * ptfork.c (pthread_atfork): Likewise.
279 * specific.c (pthread_key_create): Likewise.
280 (pthread_setspecific): Likewise.
281 (pthread_getspecific): Likewise.
283 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
285 * linuxthreads.texi: Fix punctuation after xref.
287 1998-11-10 H.J. Lu <hjl@gnu.org>
289 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
290 if it is defined in <linux/limits.h>.
292 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
294 * spinlock.h (__pthread_trylock): Define inline.
295 (__pthread_lock): Add extra parameter to declaration. Declare
296 using internal_function.
297 (__pthread_unlock): Declare using internal_function.
298 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
299 of local variable self. Avoid recomputing self. Define using
301 (__pthread_trylock): Remove.
302 (__pthread_unlock): Define using internal_function.
303 * cancel.c: Adjust for __pthread_lock interface change. Use already
304 computed self value is possible.
305 * condvar.c: Likewise.
307 * manager.c: Likewise.
309 * pthread.c: Likewise.
310 * rwlock.c: Likewise.
311 * semaphore.c: Likewise.
312 * signals.c: Likewise.
314 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
316 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
317 __ to field names of the struct.
318 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
320 (pthread_attr_t): Likewise.
321 (pthread_cond_t): Likewise.
322 (pthread_condattr_t): Likewise.
323 (pthread_mutex_t): Likewise.
324 (pthread_mutexattr_t): Likewise.
325 (pthread_rwlock_t): Likewise.
326 (pthread_rwlockattr_t): Likewise.
327 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
328 * cancel.c: Likewise.
329 * condvar.c: Likewise.
330 * manager.c: Likewise.
332 * pthread.c: Likewise.
333 * ptlongjmp.c: Likewise.
334 * rwlock.c: Likewise.
335 * spinlock.c: Likewise.
337 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
339 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
342 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
345 * Makefile (libpthread-routines): Add pt-machine.
346 * pt-machine.c: New file.
347 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
348 yet defined. Use PT_EI in extern inline definitions.
349 * sysdeps/arm/pt-machine.h: Likewise.
350 * sysdeps/i386/pt-machine.h: Likewise.
351 * sysdeps/i386/i686/pt-machine.h: Likewise.
352 * sysdeps/m68k/pt-machine.h: Likewise.
353 * sysdeps/mips/pt-machine.h: Likewise.
354 * sysdeps/powerpc/pt-machine.h: Likewise.
355 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
356 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
358 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
360 * semaphore.h: Include <sys/types.h> so that _pthread_descr
363 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
365 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
367 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
369 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
371 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
372 multiple inclusion guard.
374 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
376 * signals.c (sigaction): Check that sig is less than NSIG to avoid
377 array index overflow.
379 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
381 * sysdeps/pthread/semaphore.h: New file.
383 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
385 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
386 _LIBC_TSD_KEY_DL_ERROR.
388 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
390 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
391 * sysdeps/i386/pt-machine.h: Likewise.
392 Suggested by Roland McGrath.
394 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
396 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
397 access thread data with non-constant offsets.
398 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
401 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
402 THREAD_SETMEM_NC definitions.
404 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
406 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
408 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
410 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
412 (struct _pthread_descr_struct): Add p_self and p_nr field.
413 * manager.c (__pthread_handles): Define second element to point
415 (__pthread_handles_num): Initialize to 2.
416 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
417 (pthread_start_thread): Likewise.
418 (pthread_handle_create): Start search for free slot at entry 2.
419 Initialize new fields p_self and p_nr.
420 Call __clone with CLONE_PTRACE if available.
421 (pthread_free): Call FREE_THREAD_SELF if available.
422 * pthread.c (__pthread_initial_thread): Initialize new fields.
423 (__pthread_manager_thread): Likewise.
424 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
426 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
427 elements of the thread descriptor.
428 * condvar.c: Likewise.
431 * manager.c: Likewise.
432 * pthread.c: Likewise.
433 * ptlongjmp.c: Likewise.
434 * semaphore.c: Likewise.
435 * signals.c: Likewise.
436 * specific.c: Likewise.
437 * spinlock.c: Likewise.
439 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
441 * sysdeps/i386/useldt.h: New file.
442 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
444 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
445 THREAD_SETMEM using __thread_self.
446 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
448 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
450 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
451 turned out that we didn't need to queue after all.
453 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
455 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
456 and wastes space; correct types.
458 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
460 * signals.c (sigaction): Handle NULL argument.
462 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
464 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
467 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
469 * Makefile (linuxthreads-version): Extract correct number from
472 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
474 * Banner: Bump version number to 0.8
475 * FAQ.html: Many updates, in particular w.r.t. debugging.
476 * manager.c: Support for non-default stacksize for
477 LinuxThreads-allocated stacks;
478 don't use guard pages for stacks with default size, rely on
479 rlimit(RLIMIT_STACK) instead (it's cheaper).
481 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
482 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
483 * condvar.c: Likewise.
484 * internals.h: Likewise.
485 * restart.h: Likewise.
486 * signals.c: Likewise.
487 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
489 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
491 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
492 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
493 * Versions: Put __pthread_mutexattr_settype under version
494 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
495 __pthread_mutexattr_gettype.
497 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
499 * sysdeps/pthread/bits/libc-lock.h: Make
500 __pthread_mutexattr_settype weak. Don't make
501 __pthread_mutexattr_setkind_np weak.
503 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
505 * manager.c (pthread_handle_create): Check whether sched_setscheduler
506 call can succeed here.
508 * mutex.c: Define __pthread_mutexattr_settype and make
509 __pthread_mutexattr_setkind_np an alias.
510 Likewise for __pthread_mutexattr_gettype.
512 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
514 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
517 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
519 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
521 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
523 * Examples/ex6.c: Include <unistd.h> for usleep.
525 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
527 * Examples/ex4.c (main): Use exit, not pthread_exit.
529 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
531 * Versions: Add __pthread_mutexattr_gettype and
532 __pthread_mutexattr_settype.
533 * lockfile.c: Use __pthread_mutexattr_settype instead of
534 __pthread_mutexattr_setkind_np.
535 * mutex.c: Define __pthread_mutexattr_gettype and
536 __pthread_mutexattr_settype.
538 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
539 __pthread_mutexattr_settype.
540 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
541 Use __pthread_mutexattr_settype.
543 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
545 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
546 * mutex.c: Define weak alias pthread_mutexattr_gettype and
547 pthread_mutexattr_settype.
548 * sysdeps/pthread/pthread.h: Declare these functions.
549 Move pthread_sigmask and pthread_kill declaration in separate header.
550 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
552 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
554 * Makefile: Add rules to compile and run tests.
555 * Examples/ex1.c: Little changes to fix warnings.
556 * Examples/ex2.c: Likewise.
557 * Examples/ex3.c: Likewise.
558 * Examples/ex4.c: Likewise.
559 * Examples/ex5.c: Likewise.
560 * Examples/ex6.c: New file.
562 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
564 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
566 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
568 * attr.c: Include <string.h>.
570 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
572 * attr.c: Include errno.h. Use memcpy to copy sched_param.
573 * internals.h: Include limits.h.
574 * manager.c: Use memcpy to copy sched_param.
575 * ptfork.c: Include errno.h.
576 * pthread.c: Likewise.
577 * semaphore.c: Likewise.
578 * specific.c: Likewise.
579 * spinlock.h: Likewise.
580 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
581 type definition to ...
582 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
584 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
586 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
588 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
589 as macros as demanded in POSIX.1, Annex C.
591 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
593 * internals.h (struct pthread_request): For free use pthread_t
594 instead of pthread_descr.
595 * join.c (pthread_join): Pass thread_id, not th to manager.
596 (pthread_detach): Likewise.
597 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
598 (pthread_exited): Remove detached queue code.
599 (pthread_handle_free): Expect thread ID parameter and use it to
600 validate the thread decsriptor. Don't use detached queue.
601 Patches by Xavier Leroy.
603 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
605 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
606 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
607 __pthread_atfork, __pthread_key_create, __pthread_once.
608 * internals.h: Doc fix.
609 * pthread.c (__pthread_initialize): Define again.
611 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
613 * manager.c (pthread_exited): If thread is not detached put it on
615 (pthread_handle_free): If thread is not on list with living threads
616 search on list with detached threads.
618 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
619 for new definition of pthread_rwlock_t.
621 * spinlock.c: Correct test whether to compile
622 __pthread_compare_and_swap or not.
624 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
626 * attr.c: Finish user stack support. Change locking code to be safe
627 in situations with different priorities.
628 * cancel.c: Likewise.
629 * condvar.c: Likewise.
630 * internals.h: Likewise.
632 * manager.c: Likewise.
634 * pthread.c: Likewise.
635 * ptlongjmp.c: Likewise.
637 * rwlock.c: Likewise.
638 * semaphore.c: Likewise.
639 * semaphore.h: Likewise.
640 * signals.c: Likewise.
641 * spinlock.c: Likewise.
642 * spinlock.h: Likewise.
643 * sysdeps/pthread/pthread.h: Likewise.
644 Patches by Xavier Leroy.
646 * sysdeps/i386/i686/pt-machine.h: New file.
648 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
650 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
651 [sg]et_stackaddr prototypes always available.
653 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
654 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
656 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
658 * manager.c (pthread_free): Undo patch from 980430.
659 Reported by David Wragg <dpw@doc.ic.ac.uk>.
661 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
663 * manager.c: Define __pthread_manager_adjust_prio and use it to
664 increase priority when needed.
665 * internals.h: Add prototype for __pthread_manager_adjust_prio.
666 * mutex.c: Optimize mutexes to wake up only one thread.
667 * pthread.c: Move PID of manager for global variable in structure
669 Patches by Xavier Leroy.
671 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
673 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
675 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
677 * attr.c: Correct typo.
679 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
681 * manager.c (pthread_free): Unmap guard before the stack.
682 Patch by Matthias Urlichs.
684 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
686 * manager.c (pthread_free): Detect already free child.
687 Patch by Xavier Leroy, reported by Matthias Urlichs.
689 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
691 * Makefile (linuxthreads-version): Renamed back from
694 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
696 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
699 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
701 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
702 * internals.h: Add definitions for new spinlock implementation.
703 * ptlongjmp.c: New file.
704 * spinlock.c: New file.
705 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
706 new function __pthread_acquire to prevent deadlocks with thread
707 with different priorities.
708 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
710 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
712 * manager.c (__pthread_manager): Reduce first argument to select
713 to include just the needed file descriptor.
715 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
717 * manager.c: Fix last patch which caused core dumps.
719 * pthread.c: Correctly handle missing SIGRTMIN.
721 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
723 * libpthread.map: Add __libc_internal_tsd_get and
724 __libc_internal_tsd_set. Add missing cancelable functions. Export
725 libc internal versions of the cancelable functions.
727 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
729 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
731 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
733 * attr.c: Implement pthread_attr_[gs]etguardsize,
734 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
735 Change pthread_attr_init to have two interfaces.
736 * internals.h (struct _pthread_descr_struct): Add new fields for
738 * libpthread.map: Add names in GLIBC_2.1 section.
739 * manager.c (pthread_handle_create): Implement guardsize and
741 (pthread_free): Likewise.
742 * pthread.c (pthread_create): Add new interface for changed
744 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
745 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
748 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
750 * manager.c: Enable resetting of the thread scheduling policy
751 to SCHED_OTHER when the parent thread has a different one.
753 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
755 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
756 _POSIX_ASYNCHRONOUS_IO.
758 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
760 * mutex.c: Implement new mutex types.
762 * internals.h: Include <signal.h>.
764 * libpthread.map: Add __erno_location and __h_errno_location.
766 * errno.c: Return pointer to variable actually in use. This might
767 not be the one in the thread structure.
768 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
770 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
771 of manager thread structure.
772 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
774 * pthread.c: Adapt initializer for thread structures.
775 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
776 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
777 current thread to global variables.
779 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
781 * rwlock.c: New file.
782 * Makefile (libpthread-routines): Add rwlock.
783 * sysdeps/pthread/pthread.h: Define data structures and declare
785 * libpthread.map: Add new functions.
787 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
789 * sysdeps/arm/pt-machine.h: New file; add ARM support.
790 * sysdeps/arm/Implies: likewise.
791 * README: Document it.
793 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
795 * signals.c: Remove unneeded initializer for sigwaited, saving a
798 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
800 * semaphore.c (sem_init): Set sem_spinlock only if available.
802 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
804 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
805 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
807 * Makefile: Update from LinuxThreads 0.7.
808 * internals.h. Likewise.
809 * manager.c: Likewise.
811 * pthread.c: Likewise.
812 * signals.c: Likewise.
813 * specific.c: Likewise.
814 * Examples/ex3.c: Likewise.
816 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
818 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
821 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
823 * wrapsyscall.c: Add socket functions which are also cancelation
826 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
828 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
829 New functions for fast thread specific data within libc.
831 * internals.h: Add new array p_libc_specific to struct
832 _pthread_descr_struct.
834 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
836 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
838 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
839 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
841 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
843 * internals.h (struct _pthread_descr_struct): Add definitions for
844 two-level specific key handling.
845 * manager.c (pthread_handle_create): Initialize specific memory array.
846 * specific.c: Implement two-level key handling.
847 * weaks.c: Don't provide dummy key handling.
848 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
849 Add definition of __libc_key_t.
850 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
852 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
853 PTHREAD_DESTRUCTOR_ITERATIONS.
855 * manager.c (pthread_handle_create): Compare mmap result with
858 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
859 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
861 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
863 sysdeps/sparc -> sysdeps/sparc/sparc32
864 sysdeps/sparc64 -> sysdeps/sparc/sparc64
866 * internals.h: Change definition of THREAD_SELF to be an expression,
867 not a statement that did a return.
868 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
869 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
870 Follow Solaris and use a "system reserved" register (%g6) to hold
871 the thread descriptor.
872 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
874 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
876 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
877 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
878 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
880 * semaphore.c: Include spinlock.h only when needed.
882 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
883 keys for entries not in use.
885 * weaks.c: Implement key handling functions for real.
887 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
889 Initial sparc64-linux support:
890 * linuxthreads/sysdeps/sparc64/Implies: New file.
891 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
893 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
895 * semaphore.c: Include spinlock.h at correct place.
898 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
900 The Great Bit File Move:
901 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
902 * sysdeps/powerpc/semaphorebits.h: Likewise.
903 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
904 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
905 * sysdeps/pthread/libc-lock.h: -> bits/
906 * sysdeps/pthread/stdio-lock.h: Likewise.
907 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
908 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
909 * semaphore.h: Likewise.
910 * sysdeps/pthread/pthread.h: Likewise.
912 * lockfile.c: <foo.h> -> <bits/foo.h>.
913 * semaphore.h: Likewise.
915 * Makefile: (headers): foo.h -> bits/foo.h.
916 * sysdeps/pthread/Makefile: Likewise.
918 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
920 * semaphore.c (sem_init): Set sem_spinlock only if available.
922 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
925 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
927 Update from LinuxThreads 0.6.
929 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
930 and __sched_get_priority_min instead of names without `__'.
932 * manager.c: Rewrite large parts to implement opaque pthread_t.
934 * cancel.c: Adapt for opaque pthread_t type.
935 * condvar.c: Likewise.
939 * pthread.c: Likewise.
940 * signals.c: Likewise.
941 * specific.c: Likewise.
942 * restart.h: Likewise.
944 * Examples/ex3.c: Likewise.
945 * Examples/ex4.c: Likewise.
946 * sysdeps/pthread/pthread.h: Likewise.
948 * pthread.c: Accumulate time for all threads in thread manager.
950 * semaphore.c: Implement fallback implementation for architectures
951 sometimes missing compare-exchange operations.
953 * cancel.c (pthread_cancel): Validate handle argument.
954 * join.c (pthread_join): Likewise.
955 (pthread_detach): Likewise.
956 * signals.c (pthread_kill): Likewise.
958 * spinlock.h (acquire): Use __sched_yield not sched_yield.
960 * queue.h (enqueue): Enqueue thread according to priority.
962 * internals.c (struct pthread_start_args): New struct for passing
963 args to cloning function.
964 (struct _pthread): Rename to _pthread_descr_struct and adapt for
967 * Examples/Makefile (clean): Pass -f option to rm.
969 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
970 and define TEST_FOR_COMPARE_AND_SWAP.
971 * sysdeps/i386/i486/pt-machine.h: Removed.
973 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
976 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
978 * restart.h (suspend): Clear p_signal before suspending.
979 (suspend_with_cancellation): Likewise.
980 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
982 * weaks.c: Make __pthread_key_create return 1.
983 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
984 __libc_getspecific, __libc_setspecific, and __libc_key_t.
985 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
988 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
990 * sysdeps/sparc/pt-machine (RELEASE): Fix.
992 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
994 * sysdeps/powerpc/Implies: Added.
995 * sysdeps/powerpc/pt-machine.h: Added.
996 * sysdeps/powerpc/semaphorebits.h: Added.
998 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1000 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1002 (__pthread_manager_thread): Likewise.
1003 Reported by Andreas Jaeger.
1005 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1007 Since sigset_t no longer fits in a register, we can't pass in the
1008 thread's initial mask so easily. Take this opportunity to simplify
1009 the clone implementation by only accepting a single void* argument.
1011 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1012 in the thread struct instead of as arguments through clone.
1013 (pthread_start_thread): Look for them there.
1014 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1015 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1016 * linuxthreads/pthread.c (pthread_initialize_manager): Revise