Update.
[glibc.git] / linuxthreads / ChangeLog
blob168d1f2583b03c8851292e1d3d0d1ce7324ae423
1 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/timer_routines.c (init_module): Use
4         THREAD_MAXNODES threads.
6         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
7         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
8         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
9         with sigqueueinfo is this system call is available.
11         * sysdeps/pthread/timer_create.c (timer_create): Allow
12         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
14         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
15         functionality.
16         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
18 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
20         * sysdeps/pthread/posix-timer.h: New file.
21         * sysdeps/pthread/timer_create.c: New file.
22         * sysdeps/pthread/timer_delete.c: New file.
23         * sysdeps/pthread/timer_getoverr.c: New file.
24         * sysdeps/pthread/timer_gettime.c: New file.
25         * sysdeps/pthread/timer_routines.c: New file.
26         * sysdeps/pthread/timer_settime.c: New file.
27         * sysdeps/pthread/tst-timer.c: New file.
29 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
31         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
32         LINK_MAX definitions if necessary.
34 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
36         Added missing fork time handling of global libio lock.
38         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
39         not just the individual stream locks. Rewritten to use new
40         iterator interface provided by libio rather than accessing
41         global variable.
43         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
44         which lock and unlock the stream list using the new interface
45         provied by libio.
46         * internals.h: Likewise.
48         * ptfork.c (__fork): Now calls __flockfilelist before fork,
49         and __funlockfilelist in the parent after the fork.
50         Child still calls __fresetlockfiles as before.
52         * linuxthreads.texi: Now explains what happens to streams at
53         fork time. Also whole new section on forking and thread added.
54         Definition of pthread_atfork moved out of Miscellaneous Functions
55         to this new section.
57 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
59         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
60         Add missing register.
61         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
63 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
65         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
66         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
67         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
69 2000-05-31  Andreas Jaeger  <aj@suse.de>
71         * sysdeps/mips/pspinlock.c: Implement spinlocks.
73 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
75         * spinlock.c (__pthread_lock): Remove ASSERT.
77         * Makefile (tests): Add ex8.
78         * Examples/ex8.c: New file.
80 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
82         Bugfix: The pthread_atfork mechanism now takes care of its
83         own internal mutex at fork time.
85         * ptfork.c (__fork): Revised so that the mutex is held across
86         the fork operation and while the handlers are called, and so that
87         the child resets the mutex.
89         * linuxthreads.texi: Updated pthread_atfork documentation to make
90         it clear that fork and pthread_atfork can't be reentered from
91         atfork handlers, that pthread_atfork and fork are mutually atomic,
92         and that the handlers are inherited by the child process.
94 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
96         * Makefile (libpthread-routines): Add pspinlock.
97         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
98         Use struct _pthread_fastlock instead of pthread_spinlock_t.
99         * condvar.c: Likewise.
100         * internals.h: Likewise.
101         * join.c: Likewise.
102         * manager.c: Likewise.
103         * mutex.c: Likewise.
104         * pthread.c: Likewise.
105         * rwlock.c: Likewise.
106         * semaphore.c: Likewise.
107         * signals.c: Likewise.
108         * spinlock.h: Likewise.
109         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
110         * sysdeps/alpha/pspinlock.c: New file.
111         * sysdeps/arm/pspinlock.c: New file.
112         * sysdeps/i386/pspinlock.c: New file.
113         * sysdeps/m68k/pspinlock.c: New file.
114         * sysdeps/mips/pspinlock.c: New file.
115         * sysdeps/powerpc/pspinlock.c: New file.
116         * sysdeps/sparc/sparc32/pspinlock.c: New file.
117         * sysdeps/sparc/sparc64/pspinlock.c: New file.
118         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
119         back to _pthread_fastlock.  Define new pthread_spinlock_t.
121 2000-05-24  Andreas Jaeger  <aj@suse.de>
123         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
125 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
127         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
129 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
131         * internals.h (__RES_PTHREAD_INTERNAL): Define.
133 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
135         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
136         object state is represented with additional bits which distinguish
137         whether that state was set up in the current process, or
138         in an ancestor process. If that state was set in an ancestor,
139         it means that a fork happened while thread was executing the init
140         function. In that case, the state is reset to NEVER.
141         * mutex.c (__pthread_once_fork_prepare): New function.
142         (__pthread_once_fork_child): Likewise
143         (__pthread_once_fork_parent): Likewise
144         (__pthread_reset_pthread_once): Removed.
145         * ptfork.c (__fork): Call new handlers in mutex.c.
146         * internals.h: Declarations of new mutex.c functions added.
147         Declaration of removed function deleted.
148         * linuxthreads.texi: Updated documentation about pthread_once
149         to clarify what happens under cancellation and forking.
151 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
153         * internals.h: New thread manager request type, REQ_KICK.
154         * join.c (pthread_exit): main thread now calls exit() instead
155         of _exit() in order to proper process cleanup.
156         * manager.c (__pthread_manager): Do not terminate manager
157         after unblocking main thread; wait for main thread's
158         REQ_PROCESS_EXIT request instead.
159         Also, added REQ_KICK case to handle new request; this just does
160         nothing.
161         * manager.c (pthread_exited): Do not terminate manager after
162         unblocking main thread.
163         * manager.c (__pthread_manager_sighandler): If the main thread
164         is waiting for all other threads to die, send a REQ_KICK into
165         the thread manager request pipe to get it to clean out the threads
166         and unblock the main thread as soon as possible. This fixes
167         the 2000 millisecond hang on shutdown bug.
168         * Examples/ex7.c: New file, tests shutdown behavior when all threads
169         including the main one call pthread_exit(), or implicitly do so.
170         * Makefile (tests): Add ex7.
172 2000-05-05  Andreas Jaeger  <aj@suse.de>
174         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
175         (pthread_getcpuclockid): Correct test for ourselves.
177 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
179         * internals.h (struct _pthread_descr_struct): Reorganization.
180         Allocate room for 16 pointers at head of the structure for future
181         thread-local data handling.  Move p_self member in this area.
182         * manager.c (pthread_handle_create): Adjust use of p_self.
183         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
184         * pthread.c (__pthread_initial_thread): Adjust initialization.
185         (__pthread_manager_thread): Likewise.
187 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
189         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
190         for eventmask larger than 1 word.
192 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
194         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
195         * pthread.c (__pthread_initialize_minimal): New function.  Perform
196         minimal initialization.
197         (pthread_initialize): Remove this code here.
198         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
199         are working around the problem in glibc.
201 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
203         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
204         now.  First gcc must be fixed (more concrete: libgcc).
206 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
208         * pthread.c: Remove special treatement for interrupt handlers on x86.
209         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
210         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
211         necessary.
212         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
214 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
216         * join.c (pthread_exit): Set p_terminated after reporting the
217         termination event instead of before.
219 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
221         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
222         if __USE_UNIX98.
224 2000-04-18  Andreas Jaeger  <aj@suse.de>
226         * Versions: Use ld instead of ld.so.
228 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
230         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
231         Remove the typedef keyword.
233 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
235         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
236         not stbar.
237         (READ_MEMORY_BARRIER): Define.
238         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
239         MEMORY_BARRIER.
240         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
241         headers.
243 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
245         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
246         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
247         use thread_handle().
249 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
251         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
252         if fast mutex is used.  Don't initialize `already_canceled' twice.
253         Correctly test for return value of timedsuspend.
255         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
256         therefore don't need the _rt versions of the signal handlers.
258 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
260         * pthread.c (pthread_yield): New function.
261         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
262         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
263         * internals.h: Declare __pthread_yield.
265         * pthread.c (pthread_initialize): Avoid a bit more code if
266         realtime signals are known to exist.
268         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
269         to dynamically detect RT signals and avoid generating compatibility
270         functions with old kernel.
271         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
272         __pthread_restart_new directly.
273         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
274         __pthread_wait_for_restart_signal directly.
275         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
276         __pthread_timedsuspend_new directly.
278 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
280         * condvar.c: Remove all the special code to handle cond_timedwait.
281         Use timedsuspend instead.
282         * internals.h: Declare __pthread_timedsuspend_old,
283         __pthread_timedsuspend_new, and __pthread_timedsuspend.
284         Remove declaration of __pthread_init_condvar.
285         * pthread.c: Define __pthread_timedsuspend variable.
286         (__pthread_timedsuspend_old): New function.  Timed suspension
287         implementation for old Linux kernels.
288         (__pthread_timedsuspend_new): New function.  Timed suspension
289         implementation for new Linux kernels.
290         * restart.h (timedsuspend): New function.  Call appropriate
291         suspension function through __pthread_timedsuspend.
292         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
293         the code.
294         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
296         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
297         undefined.
298         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
299         where possible.
300         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
301         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
303         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
304         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
306 2000-04-14  Andreas Jaeger  <aj@suse.de>
308         * weaks.c: Fix typo.
310         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
311         2.2 for linuxthreads.
313 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
315         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
316         (pthread_getcpuclockid): Fix typo.
318 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
320         * Makefile (libpthread-routines): Add getcpuclockid.
321         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
322         * sysdeps/pthread/getcpuclockid.c: New file.
323         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
324         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
326         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
327         Defined.
328         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
330         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
331         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
332         and pthread_spin_unlock.
333         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
334         into pthread_spinlock_t.  Change all uses.
335         * spinlock.c: Implement pthread_spin_lock.
336         Rename __pthread_unlock to __pthread_spin_unlock and define weak
337         alias for real name.
338         Define pthread_spin_trylock, pthread_spin_init, and
339         pthread_spin_destroy.
340         Change all uses of _pthread_fastlock to pthread_spinlock_t.
341         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
342         Change all uses of _pthread_fastlock to pthread_spinlock_t.
343         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
344         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
345         and pthread_spin_unlock.
346         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
347         Change all uses of _pthread_fastlock to pthread_spinlock_t.
348         * condvar.c: Likewise.
349         * internals.h: Likewise.
350         * join.c: Likewise.
351         * manager.c: Likewise.
352         * mutex.c: Likewise.
353         * pthread.c: Likewise.
354         * rwlock.c: Likewise.
355         * semaphore.c: Likewise.
356         * signals.c: Likewise.
358         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
359         macros.
360         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
362 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
364         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
365         _POSIX_SHARED_MEMORY_OBJECTS.
367 2000-04-11  Andreas Jaeger  <aj@suse.de>
369         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
370         (__compare_and_swap): Mark as modifying memory.
372 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
374         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
375         __volatile__.
376         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
377         Don't have the 'asm' __volatile__.
379 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
381         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
382         * spinlock.c (__pthread_lock): Add memory barriers.
383         (__pthread_unlock): Likewise.
384         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
385         instruction.
386         (RELEASE): Not needed anymore.
387         (__compare_and_swap): Mark asm as modifying memory.
388         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
389         of MEMORY_BARRIER.
390         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
391         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
392         (MEMORY_BARRIER): Define using stbar.
393         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
394         stbar.
395         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
396         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
397         Mike Burrows <m3b@pa.dec.com>.
399 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
401         * signals.c (sigaction): Fix return value for the case SIG is one
402         of the signals the implementation uses.
403         Patch by Xavier.Leroy@inria.fr.
405 2000-04-01  Andreas Jaeger  <aj@suse.de>
407         * attr.c: Use shlib-compat macros.
408         * oldsemaphore.c: Likewise.
409         * pthread.c: Likewise.
410         * weaks.c: Likewise.
412 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
414         * semaphore.c (sem_timedwait): New function.
415         Patch by Carl Mailloux <carlm@oricom.ca>.
416         * semaphore.h: Declare sem_timedwait.
417         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
419 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
421         * sysdeps/pthread/Makefile: File removed.
423 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
425         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
426         * internals.h (__pthread_reset_pthread_once): Add prototype.
427         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
429         * manager.c (pthread_handle_create): Store ID of new thread before
430         clone call.
432 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
434         * attr.c: Use new macros from shlib-compat.h to define versions.
435         * oldsemaphore.c: Likewise.
436         * semaphore.c: Likewise.
437         * weaks.c: Likewise.
439         * pthread.c: Update for new SHLIB_COMPAT definition.
441         * manager.c (__pthread_manager): Unmask debug signal.
443         * pthread.c (pthread_initialize): Test for address of __dso_handle
444         being NULL, not value.  Use __on_exit, not on_exit.
445         Patch by Andreas Jaeger <aj@suse.de>.
447         * pthread.c: Use new macros from shlib-compat.h to define versions.
449 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
451         * pthread.c (pthread_initialize): Instead of on_exit use
452         __cxa_atexit if __dso_label is available to allow unloading the
453         libpthread shared library.
455 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
457         * condvar.c: Make tests for ownership of mutex less strict.
459 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
461         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
462         current thread and return error if not.
463         (pthread_cond_timedwait_relative_old): Likewise.
464         (pthread_cond_timedwait_relative_new): Likewise.
466         * mutex.c (__pthread_once): Handle cancelled init function correctly.
467         (pthread_once_cancelhandler): New function.
468         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
470 2000-03-14  Andreas Jaeger  <aj@suse.de>
472         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
473         REG_GS.
474         (pthread_handle_sigrestart_rt): Likewise.
475         * signals.c (pthread_sighandler_rt): Likewise.
477 2000-03-02  Andreas Jaeger  <aj@suse.de>
479         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
480         Reported by Sean Chen <sean.chen@turbolinux.com>.
482 2000-02-28  Andreas Jaeger  <aj@suse.de>
484         * rwlock.c: Fix typo.
486 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
488         * rwlock.c: Define __* variants of the functions and make old names
489         aliases.
490         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
491         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
493 2000-02-25  Andreas Jaeger  <aj@suse.de>
495         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
496         pwrite64, lseek64, open64, and __open64 with version 2.2.
498 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
500         * semaphore.h (SEM_FAILED): Use 0 not NULL.
502 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
504         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
505         nanosleep does not work either.  Get absolute time inside the
506         loop.
507         (pthread_cond_timedwait_relative_new): Likewise.
508         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
510 2000-02-13  Andreas Jaeger  <aj@suse.de>
512         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
513         (pthread_cond_timedwait_relative_old): Likewise.
515 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
517         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
518         but keep the code around.  A bug in the kernel prevent us from
519         using the code.
520         (pthread_cond_timedwait_relative_new): Likewise.
521         (PR libc/1597 and libc/1598).
523 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
525         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
526         loop around nanosleep calls instead of around most of the function
527         (pthread_cond_timedwait_relative_new): Likewise.
528         body.  Got rid of backwards goto and one local.
530 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
532         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
533         before every nanosleep call to account for time spent in the rest
534         of the function.
535         (pthread_cond_timedwait_relative_new): Likewise.
536         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
538 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
540         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
541         from nanosleep call so that in case we restart we only wait for the
542         remaining time.
543         (pthread_cond_timedwait_relative_new): Likewise.
544         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
546 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
548         * manager.c (pthread_allocate_stack): Compute guard page address
549         correctly.  Patch by HJ Lu.
551         * sysdeps/pthread/pthread.h: Define
552         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
554 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
556         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
557         preference handling.
558         (pthread_rwlockattr_setkind_np): Allow
559         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
560         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
562 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
564         * internals.h (pthread_readlock_info): New structure.
565         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
566         p_untracked_readlock_count.
567         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
568         Add initializers for new fields.
569         * manager.c (pthread_free): Free read/write lock lists.
570         * queue.h (queue_is_empty): New function.
571         * rwlock.c: Implement requirements about when readers should get
572         locks assigned.
573         * sysdeps/pthread/pthread.h
574         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
575         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
576         Define this name as well.
577         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
579 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
581         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
582         Adjust initializers for struct _pthread_descr_struct change.
583         * internals.h (struct _pthread_descr_struct): Move new elements to
584         the end.
586 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
588         Redesigned how cancellation unblocks a thread from internal
589         cancellation points (sem_wait, pthread_join,
590         pthread_cond_{wait,timedwait}).
591         Cancellation won't eat a signal in any of these functions
592         (*required* by POSIX and Single Unix Spec!).
593         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
594         simultaneous condition variable signal (not required by POSIX
595         or Single Unix Spec, but nice).
596         * spinlock.c: __pthread_lock queues back any received restarts
597         that don't belong to it instead of assuming ownership of lock
598         upon any restart; fastlock can no longer be acquired by two threads
599         simultaneously.
600         * restart.h: Restarts queue even on kernels that don't have
601         queued real time signals (2.0, early 2.1), thanks to atomic counter,
602         avoiding a rare race condition in pthread_cond_timedwait.
604 1999-12-31  Andreas Jaeger  <aj@suse.de>
606         * internals.h: Remove duplicate prototype declarations.
608         * weaks.c: Remove __THROW from prototypes since the file is not
609         compiled by a C++ compiler.
610         * internals.h: Likewise.
612 1999-12-30  Andreas Jaeger  <aj@suse.de>
614         * sysdeps/pthread/pthread.h: Move internal functions to...
615         * sysdeps/pthread/bits/libc-lock.h: ...here.
617 1999-12-29  Andreas Jaeger  <aj@suse.de>
619         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
621 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
623         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
624         beginning.
626         * manager.c (__pthread_start): Add one more cast to prevent
627         warning on 64bit machines.
629 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
631         * manager.c (pthread_handle_create): Set p_pid of new thread
632         before calling the callback function to report a new thread.
634 1999-12-20  Andreas Jaeger  <aj@suse.de>
636         * pthread.c (pthread_initialize): Move getrlimit call after
637         setting of errno.
639 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
641         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
642         pwrite64, lseek64, open64, and __open64.
643         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
644         pwrite64, lseek64, open64, and __open64.
646         * manager.c (pthread_allocate_stack): Correct computation of
647         new_thread_bottom.  Correct handling of stack size and when the
648         rlimit method to guard for stack growth is used.
649         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
650         minus one pagesize (not two).
652 1999-12-03  Andreas Jaeger  <aj@suse.de>
654         * Versions: Add __res_state with version GLIBC_2.2.
656         * errno.c (__res_state): New function to return thread specific
657         resolver state.
659         * pthread.c (pthread_initialize): Initialize p_resp.
660         (__pthread_reset_main_thread): Also set p_resp.
662         * manager.c (pthread_handle_create): Initialize p_resp.
664         * internals.h: Add thread specific resolver state.
665         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
667 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
669         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
670         beginning.
671         * sysdeps/i386/i686/pt-machine.h: Likewise.
672         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
674 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
676         * manager.c (pthread_start_thread_event): Initialize p_pid already
677         here.
679 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
681         * internals.h: Add prototype for __pthread_manager_event.
682         * manager.c (__pthread_manager_event): New function.
683         (pthread_start_thread_event): Correct computation of self.
684         Use INIT_THREAD_SELF.
685         * pthread.c (__pthread_manager_thread): Initialize p_lock.
686         (__pthread_initialize_manager): Respect event flags also for creation
687         of the manager thread.
689 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
691         * pthread.c (__pthread_initialize_manager): Initialize
692         __pthread_manager_thread.p_tid.
694 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
696         * internals.h: Declare __pthread_last_event.
697         * manager.c: Define __pthread_last_event.
698         (pthread_handle_create): Set __pthread_last_event.
699         (pthread_exited): Likewise.
700         * join.c (pthread_exit): Likewise.
702         * Makefile (libpthread-routines): Add events.
703         * events.c: New file.
704         * internals.h: Protect against multiple inclusion.
705         Include thread_dbP.h header.
706         (struct _pthread_descr_struct): Add new fields p_report_events and
707         p_eventbuf.
708         Declare event reporting functions.
709         * join.c (pthread_exit): Signal event if this is wanted.
710         * manager.c (__pthread_threads_events): New variable.
711         (pthread_handle_create): Take new parameters with event information.
712         Signal TD_CREATE event if wanted.
713         (__pthread_manager): Adjust pthread_handle_create call.
714         (pthread_start_thread_event): New function.  Block until manager is
715         finished and then call pthread_start_thread.
716         (pthread_exited): Signal TD_REAP event if wanted.
718 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
720         * restart.h (suspend_with_cancellation): Rewrite as a macro.
722         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
724 1999-10-25  Andreas Jaeger  <aj@suse.de>
726         * internals.h: Remove K&R compatibility.
727         * no-tsd.c: Likewise.
728         * semaphore.h: Likewise.
729         * signals.c: Likewise.
730         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
731         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
732         * weaks.c: Likewise.
734 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
736         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
737         and pthread_handle_sigcancel with functions that restore
738         %gs from the signal context.  For each signal handling function,
739         two wrappers are required, one for a non-RT signal and one for
740         a RT signal.
741         * linuxthreads/signal.c: For i386, add code to restore %gs
742         from the signal context in pthread_sighandler and
743         pthread_sighandler_rt.
745 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
747         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
749 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
751         * pthread.c (__pthread_initial_thread): Pass argument to
752         PTHREAD_START_ARGS_INITIALIZER.
753         (__pthread_manager_thread): Likewise.
755         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
756         initialize function.
758         * manager.c (pthread_handle_create): Remove p_startfct initialization.
760         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
762 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
764         * internals.h: Correct return types for __libc_read and __libc_write.
766 1999-10-09  Andreas Jaeger  <aj@suse.de>
768         * internals.h: Add __new_sem_post to get prototype in
769         manager.c; include semaphore.h for needed types.
771 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
773         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
774         directly instead of calling sem_post which should not be necessary
775         but is faster and might help in some case to work around problems.
776         Patch by khendricks@ivey.uwo.ca [libc/1382].
778 1999-10-08  Andreas Schwab  <schwab@suse.de>
780         * sysdeps/pthread/Subdirs: New file.
781         * Implies: Removed.
783 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
785         * Implies: New file.
786         * internals.h (struct _pthread_descr_struct): Add p_startfct.
787         * manager.c (pthread_handle_create): Initialize p_startfct.
788         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
790 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
792         * manager.c (__linuxthreads_pthread_threads_max): New variable.
793         * specific.c (__linuxthreads_pthread_keys_max): New variable.
794         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
796         * condvar.c (pthread_cond_timedwait_relative): Never return with
797         EINTR.  Patch by Andreas Schwab.
799 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
801         * signals.c (sigaction): Correct last patch.  Don't select
802         pthread_sighandler_rt based on the signal number but instead of
803         the SA_SIGINFO flag.
805 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
807         * specific.c: Move definitions of struct pthread_key_struct and
808         destr_function to ...
809         * internals.h: ...here.
811 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
813         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
814         this instead of pthread_handle_sigrestart if the signal is an RT
815         signal.
817         * signals.c: Handle passing through of sighandler arguments also
818         for real-time signals.
820 1999-09-03  Andreas Schwab  <schwab@suse.de>
822         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
823         fork as weak alias.
824         (__vfork): New function, alias vfork.
825         * Versions: Export __fork, vfork, and __vfork in libpthread.
827 1999-08-23  Andreas Schwab  <schwab@suse.de>
829         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
830         call to signal handler.
832 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
834         * pthread.c (__pthread_reset_main_thread): Undo last change.
835         (__pthread_kill_other_threads_np): Reset signal handlers for the
836         signals we used in the thread implementation here.
838 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
840         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
841         for the signals we used in the thread implementation [PR libc/1234].
843         * Versions: Export __pthread_kill_other_threads_np from libpthread
844         for GLIBC_2.1.2.
846         * signals.c: Pass sigcontext through wrapper to the user function.
848 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
850         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
851         __libc_internal_tsd_set.
853 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
855         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
856         needed anymore.
858 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
860         * internals.h: Align _pthread_descr_struct to 32 bytes.
861         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
862         libc/1206.
864 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
866         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
867         swap function.
869 1999-07-09  Cristian Gafton  <gafton@redhat.com>
871         * Makefile (libpthread-routines): Add oldsemaphore routine.
872         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
873         sem_trywait, and sem_wait to GLIBC_2.1.
874         * oldsemaphore.c: New file.
875         * semaphore.c: Add default_symbol_versions for the changed functions.
876         (__new_sem_init): Rename from sem_init.
877         (__new_sem_post): Rename from sem_post.
878         (__new_sem_wait): Rename from sem_wait.
879         (__new_sem_trywait): Rename from sem_trywait.
880         (__new_sem_getvalue): Rename from sem_getvalue.
881         (__new_sem_destroy): Rename from sem_destroy.
883 1999-06-23  Robey Pointer  <robey@netscape.com>
885         * internals.h: Added p_nextlock entry to separate queueing for a
886         lock from queueing for a CV (sometimes a thread queues on a lock
887         to serialize removing itself from a CV queue).
888         * pthread.c: Added p_nextlock to initializers.
889         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
891 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
893         * manager.c (pthread_handle_create): Free mmap region after stack
894         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
896 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
898         * man/pthread_cond_init.man: Correct example.
899         Reported by Tomas Berndtsson <tomas@nocrew.org>.
901         * linuxthreads.texi (Condition Variables): Likewise.
903 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
905         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
906         casx not cas, also successful casx returns the old value in rd
907         and not the new value.
909 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
911         * manager.c: If pthread_create() is given a NULL attribute
912         and the thread manager runs with a realtime policy, set the
913         scheduling policy of the newly created thread back to SCHED_OTHER.
914         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
915         initialize the schedpolicy field of new_thread->p_start_args
916         to that of the calling thread.
918 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
920         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
921         instruction does not allow memory element to use offset.
923 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
925         * manager.c (pthread_allocate_stack): Optimize initialization of new
926         thread descriptor.
928         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
929         Don't use initializer since it is all zeroes.
930         (__libc_once_define): Likewise.
932 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
934         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
935         doesn't exist anymore.
936         * sysdeps/i386/Implies: Likewise.
937         * sysdeps/m68k/Implies: Likewise.
938         * sysdeps/mips/Implies: Likewise.
939         * sysdeps/powerpc/Implies: Likewise.
940         * sysdeps/sparc/sparc32/Implies: Likewise.
941         * sysdeps/sparc/sparc64/Implies: Likewise.
943 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
945         * sysdeps/alpha/bits/semaphore.h: Removed.
946         * sysdeps/powerpc/bits/semaphore.h: Removed.
947         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
948         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
949         * Makefile (headers): Remove bits/semaphore.h.
951         * semaphore.h: Define _pthread_descr if necessary.
952         Don't include limits.h.  Define SEM_VALUE_MAX directly.
953         Define SEM_FAILED.
954         (sem_t): Protect element names with leading __.
955         Add declarations for sem_close, sem_open, and sem_unlink.
956         * semaphore.c: Adjust all functions for new element names.
957         Define sem_close, sem_open, and sem_unlink.
958         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
959         GLIBC_2.1.1.
960         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
961         necessary.
963 1999-03-16  H.J. Lu  <hjl@gnu.org>
965         * specific.c (pthread_key_delete): Check th->p_terminated to see
966         if the thread is running.
968         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
969         Added to GLIBC_2.0 for libc.so.
971 1999-02-12  H.J. Lu  <hjl@gnu.org>
973         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
974         __libc_allocate_rtsig): Added to GLIBC_2.1.
976         * internals.h (DEFAULT_SIG_RESTART): Removed.
977         (DEFAULT_SIG_CANCEL): Removed.
979         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
980         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
981         (__pthread_sig_restart, __pthread_sig_cancel,
982         __pthread_sig_debug): Initialized.
983         (pthread_initialize): Call init_rtsigs () to initialize
984         real-time signals.
986 1999-02-03  H.J. Lu  <hjl@gnu.org>
988         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
989         Don't restart the thread which sent REQ_DEBUG.
990         (pthread_start_thread): Check if __pthread_sig_debug > 0
991         before debugging.
993         * pthread.c (__pthread_initialize_manager): Suspend ourself
994         after sending __pthread_sig_debug to gdb instead of
995         __pthread_sig_cancel.
997 1999-01-24  H.J. Lu  <hjl@gnu.org>
999         * manager.c (__pthread_manager): Delete __pthread_sig_debug
1000         from mask if __pthread_sig_debug > 0.
1001         (pthread_handle_create): Increment __pthread_handles_num.
1003         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1004         * pthread.c (__pthread_initialize_manager): Likewise.
1006         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1007         instead of __libc_allocate_rtsig (2).
1008         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1009         instead of __pthread_sig_cancel.
1010         (pthread_handle_sigdebug): Fix comments.
1012 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1014         * manager.c (pthread_allocate_stack): Set
1015         __pthread_nonstandard_stacks if user-specified stack is used.
1017 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1019         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1020         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1022 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1024         * pthread.c: Use a third signal __pthread_sig_debug distinct
1025         from __pthread_sig_cancel to notify gdb when a thread is
1026         created
1027         * manager.c: Likewise.
1028         * internals.h: Likewise.
1029         * signals.c: The implementation of sigwait(s) assumed that
1030         all signals in s have signal handlers already attached.
1031         This is not required by the standard, so make it work
1032         also if some of the signals have no handlers.
1034 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1036         * linuxthreads.texi: Remove pointers from first @node.  Move old
1037         @node spec inside comment.
1039 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1041         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1042         _IO_lock_unlock.
1044 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1046         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1047         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1049 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1051         * manager.c: Threads now send __pthread_sig_cancel on termination.
1052         Change clone call and signal masks.
1053         * thread.c (pthread_handle_sigrestart): Remove special code for
1054         manager.
1055         (pthread_handle_sigcancel): In manager thread call
1056         __pthread_manager_sighandler.
1057         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1058         * sysdeps/i386/i686/pt-machine.h: Likewise.
1059         Patches by Xavier Leroy.
1061 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1063         * spinlock.c (__pthread_unlock): Don't crash if called for an
1064         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1066         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1067         overall runtime.
1069 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1071         * Examples/ex3.c: Wait until all threads are started before
1072         searching for the number to avoid race condition on very fast
1073         systems.
1075 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1077         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1078         declaration since it's not needed.
1080         * sysdeps/pthread/pthread.h: Move internal functions to ...
1081         * internals.h: ...here.
1083 1998-12-02  H.J. Lu  <hjl@gnu.org>
1085         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1086         SIGRTMIN is defined.
1087         (__pthread_sig_cancel): Likewise.
1089 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1091         * wrapsyscall.c: Include <sys/mman.h> for msync,
1092         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1093         Correct msync declaration.
1095 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1097         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1098         __libc_tsd_set): New macros for new interface.
1099         * no-tsd.c: New file, provide uninitialized defns of
1100         __libc_internal_tsd_get and __libc_internal_tsd_set.
1101         * Makefile (routines): Add no-tsd.
1103 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1105         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1106         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1107         __libc_internal_tsd_set): Move decls to ...
1108         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1109         declarations.
1111         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1112         __libc_internal_tsd_set): Make these pointers to functions, not
1113         functions; remove #pragma weak decls for them.
1114         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1115         Define static functions and initialized pointers to them.
1117 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1119         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1120         (CFLAGS-specific.c): Likewise.
1121         (CFLAGS-pthread.c): Likewise.
1122         (CFLAGS-ptfork.c): Likewise.
1123         (CFLAGS-cancel.c): Likewise.
1124         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1125         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1127         * mutex.c (pthread_mutex_init): Define as strong symbol.
1128         (pthread_mutex_destroy): Likewise.
1129         (pthread_mutex_trylock): Likewise.
1130         (pthread_mutex_lock): Likewise.
1131         (pthread_mutex_unlock): Likewise.
1132         (pthread_mutexattr_init): Likewise.
1133         (pthread_mutexattr_destroy): Likewise.
1134         (pthread_once): Likewise.
1135         * ptfork.c (pthread_atfork): Likewise.
1136         * specific.c (pthread_key_create): Likewise.
1137         (pthread_setspecific): Likewise.
1138         (pthread_getspecific): Likewise.
1140 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1142         * linuxthreads.texi: Fix punctuation after xref.
1144 1998-11-10  H.J. Lu  <hjl@gnu.org>
1146         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1147         if it is defined in <linux/limits.h>.
1149 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1151         * spinlock.h (__pthread_trylock): Define inline.
1152         (__pthread_lock): Add extra parameter to declaration.  Declare
1153         using internal_function.
1154         (__pthread_unlock): Declare using internal_function.
1155         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1156         of local variable self.  Avoid recomputing self.  Define using
1157         internal_function.
1158         (__pthread_trylock): Remove.
1159         (__pthread_unlock): Define using internal_function.
1160         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1161         computed self value is possible.
1162         * condvar.c: Likewise.
1163         * join.c: Likewise.
1164         * manager.c: Likewise.
1165         * mutex.c: Likewise.
1166         * pthread.c: Likewise.
1167         * rwlock.c: Likewise.
1168         * semaphore.c: Likewise.
1169         * signals.c: Likewise.
1171 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1173         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1174         __ to field names of the struct.
1175         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1176         Likewise.
1177         (pthread_attr_t): Likewise.
1178         (pthread_cond_t): Likewise.
1179         (pthread_condattr_t): Likewise.
1180         (pthread_mutex_t): Likewise.
1181         (pthread_mutexattr_t): Likewise.
1182         (pthread_rwlock_t): Likewise.
1183         (pthread_rwlockattr_t): Likewise.
1184         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1185         * cancel.c: Likewise.
1186         * condvar.c: Likewise.
1187         * manager.c: Likewise.
1188         * mutex.c: Likewise.
1189         * pthread.c: Likewise.
1190         * ptlongjmp.c: Likewise.
1191         * rwlock.c: Likewise.
1192         * spinlock.c: Likewise.
1194 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1196         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1197         also with PT_EI.
1199         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1200         definitions.
1202         * Makefile (libpthread-routines): Add pt-machine.
1203         * pt-machine.c: New file.
1204         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1205         yet defined.  Use PT_EI in extern inline definitions.
1206         * sysdeps/arm/pt-machine.h: Likewise.
1207         * sysdeps/i386/pt-machine.h: Likewise.
1208         * sysdeps/i386/i686/pt-machine.h: Likewise.
1209         * sysdeps/m68k/pt-machine.h: Likewise.
1210         * sysdeps/mips/pt-machine.h: Likewise.
1211         * sysdeps/powerpc/pt-machine.h: Likewise.
1212         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1213         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1215 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1217         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1218         is declared.
1220 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1222         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1223         argument.
1224         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1226 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1228         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1229         multiple inclusion guard.
1231 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1233         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1234         array index overflow.
1236 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1238         * sysdeps/pthread/semaphore.h: New file.
1240 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1242         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1243         _LIBC_TSD_KEY_DL_ERROR.
1245 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1247         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1248         * sysdeps/i386/pt-machine.h: Likewise.
1249         Suggested by Roland McGrath.
1251 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1253         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1254         access thread data with non-constant offsets.
1255         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1256         necessary.
1258         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1259         THREAD_SETMEM_NC definitions.
1261         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1262         THREAD_SETMEM_NC.
1263         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1265 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1267         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1268         not already defined.
1269         (struct _pthread_descr_struct): Add p_self and p_nr field.
1270         * manager.c (__pthread_handles): Define second element to point
1271         to manager thread.
1272         (__pthread_handles_num): Initialize to 2.
1273         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1274         (pthread_start_thread): Likewise.
1275         (pthread_handle_create): Start search for free slot at entry 2.
1276         Initialize new fields p_self and p_nr.
1277         Call __clone with CLONE_PTRACE if available.
1278         (pthread_free): Call FREE_THREAD_SELF if available.
1279         * pthread.c (__pthread_initial_thread): Initialize new fields.
1280         (__pthread_manager_thread): Likewise.
1281         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1283         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1284         elements of the thread descriptor.
1285         * condvar.c: Likewise.
1286         * errno.c: Likewise.
1287         * join.c: Likewise.
1288         * manager.c: Likewise.
1289         * pthread.c: Likewise.
1290         * ptlongjmp.c: Likewise.
1291         * semaphore.c: Likewise.
1292         * signals.c: Likewise.
1293         * specific.c: Likewise.
1294         * spinlock.c: Likewise.
1296         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1298         * sysdeps/i386/useldt.h: New file.
1299         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1301         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1302         THREAD_SETMEM using __thread_self.
1303         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1305 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1307         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1308         turned out that we didn't need to queue after all.
1310 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1312         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1313         and wastes space; correct types.
1315 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1317         * signals.c (sigaction): Handle NULL argument.
1319 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1321         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1322         of sigset_t.
1324 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1326         * Makefile (linuxthreads-version): Extract correct number from
1327         Banner.
1329 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1331         * Banner: Bump version number to 0.8
1332         * FAQ.html: Many updates, in particular w.r.t. debugging.
1333         * manager.c: Support for non-default stacksize for
1334         LinuxThreads-allocated stacks;
1335         don't use guard pages for stacks with default size, rely on
1336         rlimit(RLIMIT_STACK) instead (it's cheaper).
1337         * attr.c: Likewise.
1338         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1339         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1340         * condvar.c: Likewise.
1341         * internals.h: Likewise.
1342         * restart.h: Likewise.
1343         * signals.c: Likewise.
1344         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1346 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1348         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1349         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1350         * Versions: Put __pthread_mutexattr_settype under version
1351         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1352         __pthread_mutexattr_gettype.
1354 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1356         * sysdeps/pthread/bits/libc-lock.h: Make
1357         __pthread_mutexattr_settype weak.  Don't make
1358         __pthread_mutexattr_setkind_np weak.
1360 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1362         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1363         call can succeed here.
1365         * mutex.c: Define __pthread_mutexattr_settype and make
1366         __pthread_mutexattr_setkind_np an alias.
1367         Likewise for __pthread_mutexattr_gettype.
1369 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1371         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1372         is root.
1374 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1376         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1378 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1380         * Examples/ex6.c: Include <unistd.h> for usleep.
1382 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1384         * Examples/ex4.c (main): Use exit, not pthread_exit.
1386 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1388         * Versions: Add __pthread_mutexattr_gettype and
1389         __pthread_mutexattr_settype.
1390         * lockfile.c: Use __pthread_mutexattr_settype instead of
1391         __pthread_mutexattr_setkind_np.
1392         * mutex.c: Define __pthread_mutexattr_gettype and
1393         __pthread_mutexattr_settype.
1394         * weak.c: Likewise.
1395         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1396         __pthread_mutexattr_settype.
1397         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1398         Use __pthread_mutexattr_settype.
1400 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1402         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1403         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1404         pthread_mutexattr_settype.
1405         * sysdeps/pthread/pthread.h: Declare these functions.
1406         Move pthread_sigmask and pthread_kill declaration in separate header.
1407         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1409 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1411         * Makefile: Add rules to compile and run tests.
1412         * Examples/ex1.c: Little changes to fix warnings.
1413         * Examples/ex2.c: Likewise.
1414         * Examples/ex3.c: Likewise.
1415         * Examples/ex4.c: Likewise.
1416         * Examples/ex5.c: Likewise.
1417         * Examples/ex6.c: New file.
1419 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1421         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1423 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1425         * attr.c: Include <string.h>.
1427 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1429         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1430         * internals.h: Include limits.h.
1431         * manager.c: Use memcpy to copy sched_param.
1432         * ptfork.c: Include errno.h.
1433         * pthread.c: Likewise.
1434         * semaphore.c: Likewise.
1435         * specific.c: Likewise.
1436         * spinlock.h: Likewise.
1437         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1438         type definition to ...
1439         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1441 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1443         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1445         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1446         as macros as demanded in POSIX.1, Annex C.
1448 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1450         * internals.h (struct pthread_request): For free use pthread_t
1451         instead of pthread_descr.
1452         * join.c (pthread_join): Pass thread_id, not th to manager.
1453         (pthread_detach): Likewise.
1454         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1455         (pthread_exited): Remove detached queue code.
1456         (pthread_handle_free): Expect thread ID parameter and use it to
1457         validate the thread decsriptor.  Don't use detached queue.
1458         Patches by Xavier Leroy.
1460 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1462         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1463         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1464         __pthread_atfork, __pthread_key_create, __pthread_once.
1465         * internals.h: Doc fix.
1466         * pthread.c (__pthread_initialize): Define again.
1468 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1470         * manager.c (pthread_exited): If thread is not detached put it on
1471         special list.
1472         (pthread_handle_free): If thread is not on list with living threads
1473         search on list with detached threads.
1475         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1476         for new definition of pthread_rwlock_t.
1478         * spinlock.c: Correct test whether to compile
1479         __pthread_compare_and_swap or not.
1481 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1483         * attr.c: Finish user stack support.  Change locking code to be safe
1484         in situations with different priorities.
1485         * cancel.c: Likewise.
1486         * condvar.c: Likewise.
1487         * internals.h: Likewise.
1488         * join.c: Likewise.
1489         * manager.c: Likewise.
1490         * mutex.c: Likewise.
1491         * pthread.c: Likewise.
1492         * ptlongjmp.c: Likewise.
1493         * queue.h: Likewise.
1494         * rwlock.c: Likewise.
1495         * semaphore.c: Likewise.
1496         * semaphore.h: Likewise.
1497         * signals.c: Likewise.
1498         * spinlock.c: Likewise.
1499         * spinlock.h: Likewise.
1500         * sysdeps/pthread/pthread.h: Likewise.
1501         Patches by Xavier Leroy.
1503         * sysdeps/i386/i686/pt-machine.h: New file.
1505 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1507         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1508         [sg]et_stackaddr prototypes always available.
1510         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1511         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1513 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1515         * manager.c (pthread_free): Undo patch from 980430.
1516         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1518 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1520         * manager.c: Define __pthread_manager_adjust_prio and use it to
1521         increase priority when needed.
1522         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1523         * mutex.c: Optimize mutexes to wake up only one thread.
1524         * pthread.c: Move PID of manager for global variable in structure
1525         element.
1526         Patches by Xavier Leroy.
1528 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1530         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1532 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1534         * attr.c: Correct typo.
1536 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1538         * manager.c (pthread_free): Unmap guard before the stack.
1539         Patch by Matthias Urlichs.
1541 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1543         * manager.c (pthread_free): Detect already free child.
1544         Patch by Xavier Leroy, reported by Matthias Urlichs.
1546 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1548         * Makefile (linuxthreads-version): Renamed back from
1549         libpthread-version.
1551 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
1553         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1554         __libc_longjmp.
1556 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
1558         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1559         * internals.h: Add definitions for new spinlock implementation.
1560         * ptlongjmp.c: New file.
1561         * spinlock.c: New file.
1562         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1563         new function __pthread_acquire to prevent deadlocks with thread
1564         with different priorities.
1565         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1567 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1569         * manager.c (__pthread_manager): Reduce first argument to select
1570         to include just the needed file descriptor.
1572 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
1574         * manager.c: Fix last patch which caused core dumps.
1576         * pthread.c: Correctly handle missing SIGRTMIN.
1578 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1580         * libpthread.map: Add __libc_internal_tsd_get and
1581         __libc_internal_tsd_set.  Add missing cancelable functions. Export
1582         libc internal versions of the cancelable functions.
1584 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
1586         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1588 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
1590         * attr.c: Implement pthread_attr_[gs]etguardsize,
1591         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1592         Change pthread_attr_init to have two interfaces.
1593         * internals.h (struct _pthread_descr_struct): Add new fields for
1594         above functions.
1595         * libpthread.map: Add names in GLIBC_2.1 section.
1596         * manager.c (pthread_handle_create): Implement guardsize and
1597         user stack.
1598         (pthread_free): Likewise.
1599         * pthread.c (pthread_create): Add new interface for changed
1600         pthread_attr_t.
1601         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1602         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1603         PTHREAD_STACK_MIN.
1605 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
1607         * manager.c: Enable resetting of the thread scheduling policy
1608         to SCHED_OTHER when the parent thread has a different one.
1610 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
1612         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1613         _POSIX_ASYNCHRONOUS_IO.
1615         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1616         mutexes.
1617         * mutex.c: Implement new mutex types.
1619         * internals.h: Include <signal.h>.
1621         * libpthread.map: Add __erno_location and __h_errno_location.
1623         * errno.c: Return pointer to variable actually in use.  This might
1624         not be the one in the thread structure.
1625         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1626         and p_h_errnop.
1627         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1628         of manager thread structure.
1629         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1630         thread.
1631         * pthread.c: Adapt initializer for thread structures.
1632         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1633         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1634         current thread to global variables.
1636 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1638         * rwlock.c: New file.
1639         * Makefile (libpthread-routines): Add rwlock.
1640         * sysdeps/pthread/pthread.h: Define data structures and declare
1641         functions.
1642         * libpthread.map: Add new functions.
1644 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1646         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1647         * sysdeps/arm/Implies: likewise.
1648         * README: Document it.
1650 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1652         * signals.c: Remove unneeded initializer for sigwaited, saving a
1653         warning.
1655 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1657         * semaphore.c (sem_init): Set sem_spinlock only if available.
1659 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1661         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1662         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1664         * Makefile: Update from LinuxThreads 0.7.
1665         * internals.h. Likewise.
1666         * manager.c: Likewise.
1667         * mutex.c: Likewise.
1668         * pthread.c: Likewise.
1669         * signals.c: Likewise.
1670         * specific.c: Likewise.
1671         * Examples/ex3.c: Likewise.
1673 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1675         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1676         open.
1678 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1680         * wrapsyscall.c: Add socket functions which are also cancelation
1681         points.
1683 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1685         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1686         New functions for fast thread specific data within libc.
1688         * internals.h: Add new array p_libc_specific to struct
1689         _pthread_descr_struct.
1691         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1693 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1695         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1696         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1698 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1700         * internals.h (struct _pthread_descr_struct): Add definitions for
1701         two-level specific key handling.
1702         * manager.c (pthread_handle_create): Initialize specific memory array.
1703         * specific.c: Implement two-level key handling.
1704         * weaks.c: Don't provide dummy key handling.
1705         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1706         Add definition of __libc_key_t.
1707         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1708         as 1024.
1709         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1710         PTHREAD_DESTRUCTOR_ITERATIONS.
1712         * manager.c (pthread_handle_create): Compare mmap result with
1713         MAP_FAILED.
1715         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1716         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1718 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1720         sysdeps/sparc -> sysdeps/sparc/sparc32
1721         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1723         * internals.h: Change definition of THREAD_SELF to be an expression,
1724         not a statement that did a return.
1725         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1726         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1727         Follow Solaris and use a "system reserved" register (%g6) to hold
1728         the thread descriptor.
1729         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1731 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1733         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1734         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1735         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1737         * semaphore.c: Include spinlock.h only when needed.
1739         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1740         keys for entries not in use.
1742         * weaks.c: Implement key handling functions for real.
1744 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1746         Initial sparc64-linux support:
1747         * linuxthreads/sysdeps/sparc64/Implies: New file.
1748         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1750 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1752         * semaphore.c: Include spinlock.h at correct place.
1753         Patch by HJ Lu.
1755 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1757         The Great Bit File Move:
1758         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1759         * sysdeps/powerpc/semaphorebits.h: Likewise.
1760         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1761         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1762         * sysdeps/pthread/libc-lock.h: -> bits/
1763         * sysdeps/pthread/stdio-lock.h: Likewise.
1764         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1765         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1766         * semaphore.h: Likewise.
1767         * sysdeps/pthread/pthread.h: Likewise.
1769         * lockfile.c: <foo.h> -> <bits/foo.h>.
1770         * semaphore.h: Likewise.
1772         * Makefile: (headers): foo.h -> bits/foo.h.
1773         * sysdeps/pthread/Makefile: Likewise.
1775 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1777         * semaphore.c (sem_init): Set sem_spinlock only if available.
1779         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1780         asm constraints.
1782 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1784         Update from LinuxThreads 0.6.
1786         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1787         and __sched_get_priority_min instead of names without `__'.
1789         * manager.c: Rewrite large parts to implement opaque pthread_t.
1791         * cancel.c: Adapt for opaque pthread_t type.
1792         * condvar.c: Likewise.
1793         * errno.c: Likewise.
1794         * join.c: Likewise.
1795         * mutex.c: Likewise.
1796         * pthread.c: Likewise.
1797         * signals.c: Likewise.
1798         * specific.c: Likewise.
1799         * restart.h: Likewise.
1800         * queue.h: Likewise.
1801         * Examples/ex3.c: Likewise.
1802         * Examples/ex4.c: Likewise.
1803         * sysdeps/pthread/pthread.h: Likewise.
1805         * pthread.c: Accumulate time for all threads in thread manager.
1807         * semaphore.c: Implement fallback implementation for architectures
1808         sometimes missing compare-exchange operations.
1810         * cancel.c (pthread_cancel): Validate handle argument.
1811         * join.c (pthread_join): Likewise.
1812         (pthread_detach): Likewise.
1813         * signals.c (pthread_kill): Likewise.
1815         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1817         * queue.h (enqueue): Enqueue thread according to priority.
1819         * internals.c (struct pthread_start_args): New struct for passing
1820         args to cloning function.
1821         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1822         opaque pthread_t.
1824         * Examples/Makefile (clean): Pass -f option to rm.
1826         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1827         and define TEST_FOR_COMPARE_AND_SWAP.
1828         * sysdeps/i386/i486/pt-machine.h: Removed.
1830         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1831         to 1024.
1833 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1835         * restart.h (suspend): Clear p_signal before suspending.
1836         (suspend_with_cancellation): Likewise.
1837         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1839         * weaks.c: Make __pthread_key_create return 1.
1840         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1841         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1842         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1843         using libio.
1845 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1847         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1849 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1851         * sysdeps/powerpc/Implies: Added.
1852         * sysdeps/powerpc/pt-machine.h: Added.
1853         * sysdeps/powerpc/semaphorebits.h: Added.
1855 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1857         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1858         initializer.
1859         (__pthread_manager_thread): Likewise.
1860         Reported by Andreas Jaeger.
1862 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1864         Since sigset_t no longer fits in a register, we can't pass in the
1865         thread's initial mask so easily.  Take this opportunity to simplify
1866         the clone implementation by only accepting a single void* argument.
1868         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1869         in the thread struct instead of as arguments through clone.
1870         (pthread_start_thread): Look for them there.
1871         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1872         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1873         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1874         clone invocation.