1 1999-06-23 Robey Pointer <robey@netscape.com>
3 * internals.h: Added p_nextlock entry to separate queueing for a
4 lock from queueing for a CV (sometimes a thread queues on a lock
5 to serialize removing itself from a CV queue).
6 * pthread.c: Added p_nextlock to initializers.
7 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
9 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
11 * manager.c (pthread_handle_create): Free mmap region after stack
12 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
14 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
16 * man/pthread_cond_init.man: Correct example.
17 Reported by Tomas Berndtsson <tomas@nocrew.org>.
19 * linuxthreads.texi (Condition Variables): Likewise.
21 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
23 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
24 casx not cas, also successful casx returns the old value in rd
25 and not the new value.
27 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
29 * manager.c: If pthread_create() is given a NULL attribute
30 and the thread manager runs with a realtime policy, set the
31 scheduling policy of the newly created thread back to SCHED_OTHER.
32 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
33 initialize the schedpolicy field of new_thread->p_start_args
34 to that of the calling thread.
36 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
38 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
39 instruction does not allow memory element to use offset.
41 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
43 * manager.c (pthread_allocate_stack): Optimize initialization of new
46 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
47 Don't use initializer since it is all zeroes.
48 (__libc_once_define): Likewise.
50 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
52 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
53 doesn't exist anymore.
54 * sysdeps/i386/Implies: Likewise.
55 * sysdeps/m68k/Implies: Likewise.
56 * sysdeps/mips/Implies: Likewise.
57 * sysdeps/powerpc/Implies: Likewise.
58 * sysdeps/sparc/sparc32/Implies: Likewise.
59 * sysdeps/sparc/sparc64/Implies: Likewise.
61 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
63 * sysdeps/alpha/bits/semaphore.h: Removed.
64 * sysdeps/powerpc/bits/semaphore.h: Removed.
65 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
66 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
67 * Makefile (headers): Remove bits/semaphore.h.
69 * semaphore.h: Define _pthread_descr if necessary.
70 Don't include limits.h. Define SEM_VALUE_MAX directly.
72 (sem_t): Protect element names with leading __.
73 Add declarations for sem_close, sem_open, and sem_unlink.
74 * semaphore.c: Adjust all functions for new element names.
75 Define sem_close, sem_open, and sem_unlink.
76 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
78 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
81 1999-03-16 H.J. Lu <hjl@gnu.org>
83 * specific.c (pthread_key_delete): Check th->p_terminated to see
84 if the thread is running.
86 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
87 Added to GLIBC_2.0 for libc.so.
89 1999-02-12 H.J. Lu <hjl@gnu.org>
91 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
92 __libc_allocate_rtsig): Added to GLIBC_2.1.
94 * internals.h (DEFAULT_SIG_RESTART): Removed.
95 (DEFAULT_SIG_CANCEL): Removed.
97 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
98 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
99 (__pthread_sig_restart, __pthread_sig_cancel,
100 __pthread_sig_debug): Initialized.
101 (pthread_initialize): Call init_rtsigs () to initialize
104 1999-02-03 H.J. Lu <hjl@gnu.org>
106 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
107 Don't restart the thread which sent REQ_DEBUG.
108 (pthread_start_thread): Check if __pthread_sig_debug > 0
111 * pthread.c (__pthread_initialize_manager): Suspend ourself
112 after sending __pthread_sig_debug to gdb instead of
113 __pthread_sig_cancel.
115 1999-01-24 H.J. Lu <hjl@gnu.org>
117 * manager.c (__pthread_manager): Delete __pthread_sig_debug
118 from mask if __pthread_sig_debug > 0.
119 (pthread_handle_create): Increment __pthread_handles_num.
121 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
122 * pthread.c (__pthread_initialize_manager): Likewise.
124 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
125 instead of __libc_allocate_rtsig (2).
126 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
127 instead of __pthread_sig_cancel.
128 (pthread_handle_sigdebug): Fix comments.
130 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
132 * manager.c (pthread_allocate_stack): Set
133 __pthread_nonstandard_stacks if user-specified stack is used.
135 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
137 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
138 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
140 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
142 * pthread.c: Use a third signal __pthread_sig_debug distinct
143 from __pthread_sig_cancel to notify gdb when a thread is
145 * manager.c: Likewise.
146 * internals.h: Likewise.
147 * signals.c: The implementation of sigwait(s) assumed that
148 all signals in s have signal handlers already attached.
149 This is not required by the standard, so make it work
150 also if some of the signals have no handlers.
152 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
154 * linuxthreads.texi: Remove pointers from first @node. Move old
155 @node spec inside comment.
157 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
159 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
162 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
164 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
165 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
167 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
169 * manager.c: Threads now send __pthread_sig_cancel on termination.
170 Change clone call and signal masks.
171 * thread.c (pthread_handle_sigrestart): Remove special code for
173 (pthread_handle_sigcancel): In manager thread call
174 __pthread_manager_sighandler.
175 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
176 * sysdeps/i386/i686/pt-machine.h: Likewise.
177 Patches by Xavier Leroy.
179 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
181 * spinlock.c (__pthread_unlock): Don't crash if called for an
182 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
184 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
187 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
189 * Examples/ex3.c: Wait until all threads are started before
190 searching for the number to avoid race condition on very fast
193 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
195 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
196 declaration since it's not needed.
198 * sysdeps/pthread/pthread.h: Move internal functions to ...
199 * internals.h: ...here.
201 1998-12-02 H.J. Lu <hjl@gnu.org>
203 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
205 (__pthread_sig_cancel): Likewise.
207 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
209 * wrapsyscall.c: Include <sys/mman.h> for msync,
210 <stdlib.h> for system and <termios.h> for tcdrain prototype.
211 Correct msync declaration.
213 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
215 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
216 __libc_tsd_set): New macros for new interface.
217 * no-tsd.c: New file, provide uninitialized defns of
218 __libc_internal_tsd_get and __libc_internal_tsd_set.
219 * Makefile (routines): Add no-tsd.
221 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
223 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
224 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
225 __libc_internal_tsd_set): Move decls to ...
226 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
229 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
230 __libc_internal_tsd_set): Make these pointers to functions, not
231 functions; remove #pragma weak decls for them.
232 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
233 Define static functions and initialized pointers to them.
235 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
237 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
238 (CFLAGS-specific.c): Likewise.
239 (CFLAGS-pthread.c): Likewise.
240 (CFLAGS-ptfork.c): Likewise.
241 (CFLAGS-cancel.c): Likewise.
242 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
243 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
245 * mutex.c (pthread_mutex_init): Define as strong symbol.
246 (pthread_mutex_destroy): Likewise.
247 (pthread_mutex_trylock): Likewise.
248 (pthread_mutex_lock): Likewise.
249 (pthread_mutex_unlock): Likewise.
250 (pthread_mutexattr_init): Likewise.
251 (pthread_mutexattr_destroy): Likewise.
252 (pthread_once): Likewise.
253 * ptfork.c (pthread_atfork): Likewise.
254 * specific.c (pthread_key_create): Likewise.
255 (pthread_setspecific): Likewise.
256 (pthread_getspecific): Likewise.
258 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
260 * linuxthreads.texi: Fix punctuation after xref.
262 1998-11-10 H.J. Lu <hjl@gnu.org>
264 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
265 if it is defined in <linux/limits.h>.
267 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
269 * spinlock.h (__pthread_trylock): Define inline.
270 (__pthread_lock): Add extra parameter to declaration. Declare
271 using internal_function.
272 (__pthread_unlock): Declare using internal_function.
273 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
274 of local variable self. Avoid recomputing self. Define using
276 (__pthread_trylock): Remove.
277 (__pthread_unlock): Define using internal_function.
278 * cancel.c: Adjust for __pthread_lock interface change. Use already
279 computed self value is possible.
280 * condvar.c: Likewise.
282 * manager.c: Likewise.
284 * pthread.c: Likewise.
285 * rwlock.c: Likewise.
286 * semaphore.c: Likewise.
287 * signals.c: Likewise.
289 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
291 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
292 __ to field names of the struct.
293 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
295 (pthread_attr_t): Likewise.
296 (pthread_cond_t): Likewise.
297 (pthread_condattr_t): Likewise.
298 (pthread_mutex_t): Likewise.
299 (pthread_mutexattr_t): Likewise.
300 (pthread_rwlock_t): Likewise.
301 (pthread_rwlockattr_t): Likewise.
302 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
303 * cancel.c: Likewise.
304 * condvar.c: Likewise.
305 * manager.c: Likewise.
307 * pthread.c: Likewise.
308 * ptlongjmp.c: Likewise.
309 * rwlock.c: Likewise.
310 * spinlock.c: Likewise.
312 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
314 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
317 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
320 * Makefile (libpthread-routines): Add pt-machine.
321 * pt-machine.c: New file.
322 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
323 yet defined. Use PT_EI in extern inline definitions.
324 * sysdeps/arm/pt-machine.h: Likewise.
325 * sysdeps/i386/pt-machine.h: Likewise.
326 * sysdeps/i386/i686/pt-machine.h: Likewise.
327 * sysdeps/m68k/pt-machine.h: Likewise.
328 * sysdeps/mips/pt-machine.h: Likewise.
329 * sysdeps/powerpc/pt-machine.h: Likewise.
330 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
331 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
333 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
335 * semaphore.h: Include <sys/types.h> so that _pthread_descr
338 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
340 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
342 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
344 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
346 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
347 multiple inclusion guard.
349 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
351 * signals.c (sigaction): Check that sig is less than NSIG to avoid
352 array index overflow.
354 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
356 * sysdeps/pthread/semaphore.h: New file.
358 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
360 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
361 _LIBC_TSD_KEY_DL_ERROR.
363 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
365 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
366 * sysdeps/i386/pt-machine.h: Likewise.
367 Suggested by Roland McGrath.
369 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
371 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
372 access thread data with non-constant offsets.
373 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
376 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
377 THREAD_SETMEM_NC definitions.
379 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
381 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
383 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
385 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
387 (struct _pthread_descr_struct): Add p_self and p_nr field.
388 * manager.c (__pthread_handles): Define second element to point
390 (__pthread_handles_num): Initialize to 2.
391 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
392 (pthread_start_thread): Likewise.
393 (pthread_handle_create): Start search for free slot at entry 2.
394 Initialize new fields p_self and p_nr.
395 Call __clone with CLONE_PTRACE if available.
396 (pthread_free): Call FREE_THREAD_SELF if available.
397 * pthread.c (__pthread_initial_thread): Initialize new fields.
398 (__pthread_manager_thread): Likewise.
399 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
401 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
402 elements of the thread descriptor.
403 * condvar.c: Likewise.
406 * manager.c: Likewise.
407 * pthread.c: Likewise.
408 * ptlongjmp.c: Likewise.
409 * semaphore.c: Likewise.
410 * signals.c: Likewise.
411 * specific.c: Likewise.
412 * spinlock.c: Likewise.
414 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
416 * sysdeps/i386/useldt.h: New file.
417 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
419 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
420 THREAD_SETMEM using __thread_self.
421 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
423 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
425 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
426 turned out that we didn't need to queue after all.
428 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
430 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
431 and wastes space; correct types.
433 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
435 * signals.c (sigaction): Handle NULL argument.
437 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
439 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
442 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
444 * Makefile (linuxthreads-version): Extract correct number from
447 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
449 * Banner: Bump version number to 0.8
450 * FAQ.html: Many updates, in particular w.r.t. debugging.
451 * manager.c: Support for non-default stacksize for
452 LinuxThreads-allocated stacks;
453 don't use guard pages for stacks with default size, rely on
454 rlimit(RLIMIT_STACK) instead (it's cheaper).
456 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
457 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
458 * condvar.c: Likewise.
459 * internals.h: Likewise.
460 * restart.h: Likewise.
461 * signals.c: Likewise.
462 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
464 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
466 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
467 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
468 * Versions: Put __pthread_mutexattr_settype under version
469 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
470 __pthread_mutexattr_gettype.
472 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
474 * sysdeps/pthread/bits/libc-lock.h: Make
475 __pthread_mutexattr_settype weak. Don't make
476 __pthread_mutexattr_setkind_np weak.
478 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
480 * manager.c (pthread_handle_create): Check whether sched_setscheduler
481 call can succeed here.
483 * mutex.c: Define __pthread_mutexattr_settype and make
484 __pthread_mutexattr_setkind_np an alias.
485 Likewise for __pthread_mutexattr_gettype.
487 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
489 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
492 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
494 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
496 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
498 * Examples/ex6.c: Include <unistd.h> for usleep.
500 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
502 * Examples/ex4.c (main): Use exit, not pthread_exit.
504 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
506 * Versions: Add __pthread_mutexattr_gettype and
507 __pthread_mutexattr_settype.
508 * lockfile.c: Use __pthread_mutexattr_settype instead of
509 __pthread_mutexattr_setkind_np.
510 * mutex.c: Define __pthread_mutexattr_gettype and
511 __pthread_mutexattr_settype.
513 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
514 __pthread_mutexattr_settype.
515 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
516 Use __pthread_mutexattr_settype.
518 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
520 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
521 * mutex.c: Define weak alias pthread_mutexattr_gettype and
522 pthread_mutexattr_settype.
523 * sysdeps/pthread/pthread.h: Declare these functions.
524 Move pthread_sigmask and pthread_kill declaration in separate header.
525 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
527 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
529 * Makefile: Add rules to compile and run tests.
530 * Examples/ex1.c: Little changes to fix warnings.
531 * Examples/ex2.c: Likewise.
532 * Examples/ex3.c: Likewise.
533 * Examples/ex4.c: Likewise.
534 * Examples/ex5.c: Likewise.
535 * Examples/ex6.c: New file.
537 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
539 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
541 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
543 * attr.c: Include <string.h>.
545 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
547 * attr.c: Include errno.h. Use memcpy to copy sched_param.
548 * internals.h: Include limits.h.
549 * manager.c: Use memcpy to copy sched_param.
550 * ptfork.c: Include errno.h.
551 * pthread.c: Likewise.
552 * semaphore.c: Likewise.
553 * specific.c: Likewise.
554 * spinlock.h: Likewise.
555 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
556 type definition to ...
557 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
559 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
561 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
563 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
564 as macros as demanded in POSIX.1, Annex C.
566 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
568 * internals.h (struct pthread_request): For free use pthread_t
569 instead of pthread_descr.
570 * join.c (pthread_join): Pass thread_id, not th to manager.
571 (pthread_detach): Likewise.
572 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
573 (pthread_exited): Remove detached queue code.
574 (pthread_handle_free): Expect thread ID parameter and use it to
575 validate the thread decsriptor. Don't use detached queue.
576 Patches by Xavier Leroy.
578 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
580 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
581 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
582 __pthread_atfork, __pthread_key_create, __pthread_once.
583 * internals.h: Doc fix.
584 * pthread.c (__pthread_initialize): Define again.
586 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
588 * manager.c (pthread_exited): If thread is not detached put it on
590 (pthread_handle_free): If thread is not on list with living threads
591 search on list with detached threads.
593 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
594 for new definition of pthread_rwlock_t.
596 * spinlock.c: Correct test whether to compile
597 __pthread_compare_and_swap or not.
599 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
601 * attr.c: Finish user stack support. Change locking code to be safe
602 in situations with different priorities.
603 * cancel.c: Likewise.
604 * condvar.c: Likewise.
605 * internals.h: Likewise.
607 * manager.c: Likewise.
609 * pthread.c: Likewise.
610 * ptlongjmp.c: Likewise.
612 * rwlock.c: Likewise.
613 * semaphore.c: Likewise.
614 * semaphore.h: Likewise.
615 * signals.c: Likewise.
616 * spinlock.c: Likewise.
617 * spinlock.h: Likewise.
618 * sysdeps/pthread/pthread.h: Likewise.
619 Patches by Xavier Leroy.
621 * sysdeps/i386/i686/pt-machine.h: New file.
623 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
625 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
626 [sg]et_stackaddr prototypes always available.
628 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
629 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
631 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
633 * manager.c (pthread_free): Undo patch from 980430.
634 Reported by David Wragg <dpw@doc.ic.ac.uk>.
636 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
638 * manager.c: Define __pthread_manager_adjust_prio and use it to
639 increase priority when needed.
640 * internals.h: Add prototype for __pthread_manager_adjust_prio.
641 * mutex.c: Optimize mutexes to wake up only one thread.
642 * pthread.c: Move PID of manager for global variable in structure
644 Patches by Xavier Leroy.
646 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
648 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
650 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
652 * attr.c: Correct typo.
654 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
656 * manager.c (pthread_free): Unmap guard before the stack.
657 Patch by Matthias Urlichs.
659 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
661 * manager.c (pthread_free): Detect already free child.
662 Patch by Xavier Leroy, reported by Matthias Urlichs.
664 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
666 * Makefile (linuxthreads-version): Renamed back from
669 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
671 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
674 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
676 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
677 * internals.h: Add definitions for new spinlock implementation.
678 * ptlongjmp.c: New file.
679 * spinlock.c: New file.
680 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
681 new function __pthread_acquire to prevent deadlocks with thread
682 with different priorities.
683 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
685 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
687 * manager.c (__pthread_manager): Reduce first argument to select
688 to include just the needed file descriptor.
690 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
692 * manager.c: Fix last patch which caused core dumps.
694 * pthread.c: Correctly handle missing SIGRTMIN.
696 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
698 * libpthread.map: Add __libc_internal_tsd_get and
699 __libc_internal_tsd_set. Add missing cancelable functions. Export
700 libc internal versions of the cancelable functions.
702 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
704 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
706 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
708 * attr.c: Implement pthread_attr_[gs]etguardsize,
709 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
710 Change pthread_attr_init to have two interfaces.
711 * internals.h (struct _pthread_descr_struct): Add new fields for
713 * libpthread.map: Add names in GLIBC_2.1 section.
714 * manager.c (pthread_handle_create): Implement guardsize and
716 (pthread_free): Likewise.
717 * pthread.c (pthread_create): Add new interface for changed
719 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
720 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
723 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
725 * manager.c: Enable resetting of the thread scheduling policy
726 to SCHED_OTHER when the parent thread has a different one.
728 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
730 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
731 _POSIX_ASYNCHRONOUS_IO.
733 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
735 * mutex.c: Implement new mutex types.
737 * internals.h: Include <signal.h>.
739 * libpthread.map: Add __erno_location and __h_errno_location.
741 * errno.c: Return pointer to variable actually in use. This might
742 not be the one in the thread structure.
743 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
745 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
746 of manager thread structure.
747 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
749 * pthread.c: Adapt initializer for thread structures.
750 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
751 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
752 current thread to global variables.
754 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
756 * rwlock.c: New file.
757 * Makefile (libpthread-routines): Add rwlock.
758 * sysdeps/pthread/pthread.h: Define data structures and declare
760 * libpthread.map: Add new functions.
762 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
764 * sysdeps/arm/pt-machine.h: New file; add ARM support.
765 * sysdeps/arm/Implies: likewise.
766 * README: Document it.
768 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
770 * signals.c: Remove unneeded initializer for sigwaited, saving a
773 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
775 * semaphore.c (sem_init): Set sem_spinlock only if available.
777 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
779 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
780 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
782 * Makefile: Update from LinuxThreads 0.7.
783 * internals.h. Likewise.
784 * manager.c: Likewise.
786 * pthread.c: Likewise.
787 * signals.c: Likewise.
788 * specific.c: Likewise.
789 * Examples/ex3.c: Likewise.
791 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
793 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
796 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
798 * wrapsyscall.c: Add socket functions which are also cancelation
801 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
803 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
804 New functions for fast thread specific data within libc.
806 * internals.h: Add new array p_libc_specific to struct
807 _pthread_descr_struct.
809 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
811 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
813 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
814 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
816 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
818 * internals.h (struct _pthread_descr_struct): Add definitions for
819 two-level specific key handling.
820 * manager.c (pthread_handle_create): Initialize specific memory array.
821 * specific.c: Implement two-level key handling.
822 * weaks.c: Don't provide dummy key handling.
823 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
824 Add definition of __libc_key_t.
825 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
827 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
828 PTHREAD_DESTRUCTOR_ITERATIONS.
830 * manager.c (pthread_handle_create): Compare mmap result with
833 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
834 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
836 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
838 sysdeps/sparc -> sysdeps/sparc/sparc32
839 sysdeps/sparc64 -> sysdeps/sparc/sparc64
841 * internals.h: Change definition of THREAD_SELF to be an expression,
842 not a statement that did a return.
843 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
844 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
845 Follow Solaris and use a "system reserved" register (%g6) to hold
846 the thread descriptor.
847 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
849 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
851 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
852 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
853 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
855 * semaphore.c: Include spinlock.h only when needed.
857 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
858 keys for entries not in use.
860 * weaks.c: Implement key handling functions for real.
862 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
864 Initial sparc64-linux support:
865 * linuxthreads/sysdeps/sparc64/Implies: New file.
866 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
868 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
870 * semaphore.c: Include spinlock.h at correct place.
873 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
875 The Great Bit File Move:
876 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
877 * sysdeps/powerpc/semaphorebits.h: Likewise.
878 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
879 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
880 * sysdeps/pthread/libc-lock.h: -> bits/
881 * sysdeps/pthread/stdio-lock.h: Likewise.
882 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
883 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
884 * semaphore.h: Likewise.
885 * sysdeps/pthread/pthread.h: Likewise.
887 * lockfile.c: <foo.h> -> <bits/foo.h>.
888 * semaphore.h: Likewise.
890 * Makefile: (headers): foo.h -> bits/foo.h.
891 * sysdeps/pthread/Makefile: Likewise.
893 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
895 * semaphore.c (sem_init): Set sem_spinlock only if available.
897 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
900 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
902 Update from LinuxThreads 0.6.
904 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
905 and __sched_get_priority_min instead of names without `__'.
907 * manager.c: Rewrite large parts to implement opaque pthread_t.
909 * cancel.c: Adapt for opaque pthread_t type.
910 * condvar.c: Likewise.
914 * pthread.c: Likewise.
915 * signals.c: Likewise.
916 * specific.c: Likewise.
917 * restart.h: Likewise.
919 * Examples/ex3.c: Likewise.
920 * Examples/ex4.c: Likewise.
921 * sysdeps/pthread/pthread.h: Likewise.
923 * pthread.c: Accumulate time for all threads in thread manager.
925 * semaphore.c: Implement fallback implementation for architectures
926 sometimes missing compare-exchange operations.
928 * cancel.c (pthread_cancel): Validate handle argument.
929 * join.c (pthread_join): Likewise.
930 (pthread_detach): Likewise.
931 * signals.c (pthread_kill): Likewise.
933 * spinlock.h (acquire): Use __sched_yield not sched_yield.
935 * queue.h (enqueue): Enqueue thread according to priority.
937 * internals.c (struct pthread_start_args): New struct for passing
938 args to cloning function.
939 (struct _pthread): Rename to _pthread_descr_struct and adapt for
942 * Examples/Makefile (clean): Pass -f option to rm.
944 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
945 and define TEST_FOR_COMPARE_AND_SWAP.
946 * sysdeps/i386/i486/pt-machine.h: Removed.
948 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
951 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
953 * restart.h (suspend): Clear p_signal before suspending.
954 (suspend_with_cancellation): Likewise.
955 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
957 * weaks.c: Make __pthread_key_create return 1.
958 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
959 __libc_getspecific, __libc_setspecific, and __libc_key_t.
960 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
963 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
965 * sysdeps/sparc/pt-machine (RELEASE): Fix.
967 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
969 * sysdeps/powerpc/Implies: Added.
970 * sysdeps/powerpc/pt-machine.h: Added.
971 * sysdeps/powerpc/semaphorebits.h: Added.
973 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
975 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
977 (__pthread_manager_thread): Likewise.
978 Reported by Andreas Jaeger.
980 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
982 Since sigset_t no longer fits in a register, we can't pass in the
983 thread's initial mask so easily. Take this opportunity to simplify
984 the clone implementation by only accepting a single void* argument.
986 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
987 in the thread struct instead of as arguments through clone.
988 (pthread_start_thread): Look for them there.
989 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
990 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
991 * linuxthreads/pthread.c (pthread_initialize_manager): Revise