Update.
[glibc.git] / linuxthreads / ChangeLog
blob32a0e9f8b7312ba313cbe2e8783d633e978a694c
1 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4         functionality.
5         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
7 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
9         * sysdeps/pthread/posix-timer.h: New file.
10         * sysdeps/pthread/timer_create.c: New file.
11         * sysdeps/pthread/timer_delete.c: New file.
12         * sysdeps/pthread/timer_getoverr.c: New file.
13         * sysdeps/pthread/timer_gettime.c: New file.
14         * sysdeps/pthread/timer_routines.c: New file.
15         * sysdeps/pthread/timer_settime.c: New file.
16         * sysdeps/pthread/tst-timer.c: New file.
18 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
21         LINK_MAX definitions if necessary.
23 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
25         Added missing fork time handling of global libio lock.
27         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
28         not just the individual stream locks. Rewritten to use new
29         iterator interface provided by libio rather than accessing
30         global variable.
32         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
33         which lock and unlock the stream list using the new interface
34         provied by libio.
35         * internals.h: Likewise.
37         * ptfork.c (__fork): Now calls __flockfilelist before fork,
38         and __funlockfilelist in the parent after the fork.
39         Child still calls __fresetlockfiles as before.
41         * linuxthreads.texi: Now explains what happens to streams at
42         fork time. Also whole new section on forking and thread added.
43         Definition of pthread_atfork moved out of Miscellaneous Functions
44         to this new section.
46 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
48         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
49         Add missing register.
50         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
52 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
54         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
55         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
56         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
58 2000-05-31  Andreas Jaeger  <aj@suse.de>
60         * sysdeps/mips/pspinlock.c: Implement spinlocks.
62 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
64         * spinlock.c (__pthread_lock): Remove ASSERT.
66         * Makefile (tests): Add ex8.
67         * Examples/ex8.c: New file.
69 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
71         Bugfix: The pthread_atfork mechanism now takes care of its
72         own internal mutex at fork time.
74         * ptfork.c (__fork): Revised so that the mutex is held across
75         the fork operation and while the handlers are called, and so that
76         the child resets the mutex.
78         * linuxthreads.texi: Updated pthread_atfork documentation to make
79         it clear that fork and pthread_atfork can't be reentered from
80         atfork handlers, that pthread_atfork and fork are mutually atomic,
81         and that the handlers are inherited by the child process.
83 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
85         * Makefile (libpthread-routines): Add pspinlock.
86         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
87         Use struct _pthread_fastlock instead of pthread_spinlock_t.
88         * condvar.c: Likewise.
89         * internals.h: Likewise.
90         * join.c: Likewise.
91         * manager.c: Likewise.
92         * mutex.c: Likewise.
93         * pthread.c: Likewise.
94         * rwlock.c: Likewise.
95         * semaphore.c: Likewise.
96         * signals.c: Likewise.
97         * spinlock.h: Likewise.
98         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
99         * sysdeps/alpha/pspinlock.c: New file.
100         * sysdeps/arm/pspinlock.c: New file.
101         * sysdeps/i386/pspinlock.c: New file.
102         * sysdeps/m68k/pspinlock.c: New file.
103         * sysdeps/mips/pspinlock.c: New file.
104         * sysdeps/powerpc/pspinlock.c: New file.
105         * sysdeps/sparc/sparc32/pspinlock.c: New file.
106         * sysdeps/sparc/sparc64/pspinlock.c: New file.
107         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
108         back to _pthread_fastlock.  Define new pthread_spinlock_t.
110 2000-05-24  Andreas Jaeger  <aj@suse.de>
112         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
114 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
116         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
118 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
120         * internals.h (__RES_PTHREAD_INTERNAL): Define.
122 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
124         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
125         object state is represented with additional bits which distinguish
126         whether that state was set up in the current process, or
127         in an ancestor process. If that state was set in an ancestor,
128         it means that a fork happened while thread was executing the init
129         function. In that case, the state is reset to NEVER.
130         * mutex.c (__pthread_once_fork_prepare): New function.
131         (__pthread_once_fork_child): Likewise
132         (__pthread_once_fork_parent): Likewise
133         (__pthread_reset_pthread_once): Removed.
134         * ptfork.c (__fork): Call new handlers in mutex.c.
135         * internals.h: Declarations of new mutex.c functions added.
136         Declaration of removed function deleted.
137         * linuxthreads.texi: Updated documentation about pthread_once
138         to clarify what happens under cancellation and forking.
140 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
142         * internals.h: New thread manager request type, REQ_KICK.
143         * join.c (pthread_exit): main thread now calls exit() instead
144         of _exit() in order to proper process cleanup.
145         * manager.c (__pthread_manager): Do not terminate manager
146         after unblocking main thread; wait for main thread's
147         REQ_PROCESS_EXIT request instead.
148         Also, added REQ_KICK case to handle new request; this just does
149         nothing.
150         * manager.c (pthread_exited): Do not terminate manager after
151         unblocking main thread.
152         * manager.c (__pthread_manager_sighandler): If the main thread
153         is waiting for all other threads to die, send a REQ_KICK into
154         the thread manager request pipe to get it to clean out the threads
155         and unblock the main thread as soon as possible. This fixes
156         the 2000 millisecond hang on shutdown bug.
157         * Examples/ex7.c: New file, tests shutdown behavior when all threads
158         including the main one call pthread_exit(), or implicitly do so.
159         * Makefile (tests): Add ex7.
161 2000-05-05  Andreas Jaeger  <aj@suse.de>
163         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
164         (pthread_getcpuclockid): Correct test for ourselves.
166 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
168         * internals.h (struct _pthread_descr_struct): Reorganization.
169         Allocate room for 16 pointers at head of the structure for future
170         thread-local data handling.  Move p_self member in this area.
171         * manager.c (pthread_handle_create): Adjust use of p_self.
172         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
173         * pthread.c (__pthread_initial_thread): Adjust initialization.
174         (__pthread_manager_thread): Likewise.
176 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
178         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
179         for eventmask larger than 1 word.
181 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
183         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
184         * pthread.c (__pthread_initialize_minimal): New function.  Perform
185         minimal initialization.
186         (pthread_initialize): Remove this code here.
187         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
188         are working around the problem in glibc.
190 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
192         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
193         now.  First gcc must be fixed (more concrete: libgcc).
195 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
197         * pthread.c: Remove special treatement for interrupt handlers on x86.
198         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
199         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
200         necessary.
201         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
203 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
205         * join.c (pthread_exit): Set p_terminated after reporting the
206         termination event instead of before.
208 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
210         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
211         if __USE_UNIX98.
213 2000-04-18  Andreas Jaeger  <aj@suse.de>
215         * Versions: Use ld instead of ld.so.
217 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
219         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
220         Remove the typedef keyword.
222 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
224         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
225         not stbar.
226         (READ_MEMORY_BARRIER): Define.
227         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
228         MEMORY_BARRIER.
229         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
230         headers.
232 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
234         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
235         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
236         use thread_handle().
238 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
240         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
241         if fast mutex is used.  Don't initialize `already_canceled' twice.
242         Correctly test for return value of timedsuspend.
244         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
245         therefore don't need the _rt versions of the signal handlers.
247 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
249         * pthread.c (pthread_yield): New function.
250         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
251         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
252         * internals.h: Declare __pthread_yield.
254         * pthread.c (pthread_initialize): Avoid a bit more code if
255         realtime signals are known to exist.
257         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
258         to dynamically detect RT signals and avoid generating compatibility
259         functions with old kernel.
260         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
261         __pthread_restart_new directly.
262         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
263         __pthread_wait_for_restart_signal directly.
264         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
265         __pthread_timedsuspend_new directly.
267 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
269         * condvar.c: Remove all the special code to handle cond_timedwait.
270         Use timedsuspend instead.
271         * internals.h: Declare __pthread_timedsuspend_old,
272         __pthread_timedsuspend_new, and __pthread_timedsuspend.
273         Remove declaration of __pthread_init_condvar.
274         * pthread.c: Define __pthread_timedsuspend variable.
275         (__pthread_timedsuspend_old): New function.  Timed suspension
276         implementation for old Linux kernels.
277         (__pthread_timedsuspend_new): New function.  Timed suspension
278         implementation for new Linux kernels.
279         * restart.h (timedsuspend): New function.  Call appropriate
280         suspension function through __pthread_timedsuspend.
281         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
282         the code.
283         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
285         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
286         undefined.
287         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
288         where possible.
289         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
290         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
292         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
293         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
295 2000-04-14  Andreas Jaeger  <aj@suse.de>
297         * weaks.c: Fix typo.
299         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
300         2.2 for linuxthreads.
302 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
304         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
305         (pthread_getcpuclockid): Fix typo.
307 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
309         * Makefile (libpthread-routines): Add getcpuclockid.
310         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
311         * sysdeps/pthread/getcpuclockid.c: New file.
312         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
313         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
315         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
316         Defined.
317         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
319         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
320         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
321         and pthread_spin_unlock.
322         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
323         into pthread_spinlock_t.  Change all uses.
324         * spinlock.c: Implement pthread_spin_lock.
325         Rename __pthread_unlock to __pthread_spin_unlock and define weak
326         alias for real name.
327         Define pthread_spin_trylock, pthread_spin_init, and
328         pthread_spin_destroy.
329         Change all uses of _pthread_fastlock to pthread_spinlock_t.
330         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
331         Change all uses of _pthread_fastlock to pthread_spinlock_t.
332         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
333         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
334         and pthread_spin_unlock.
335         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
336         Change all uses of _pthread_fastlock to pthread_spinlock_t.
337         * condvar.c: Likewise.
338         * internals.h: Likewise.
339         * join.c: Likewise.
340         * manager.c: Likewise.
341         * mutex.c: Likewise.
342         * pthread.c: Likewise.
343         * rwlock.c: Likewise.
344         * semaphore.c: Likewise.
345         * signals.c: Likewise.
347         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
348         macros.
349         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
351 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
353         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
354         _POSIX_SHARED_MEMORY_OBJECTS.
356 2000-04-11  Andreas Jaeger  <aj@suse.de>
358         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
359         (__compare_and_swap): Mark as modifying memory.
361 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
363         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
364         __volatile__.
365         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
366         Don't have the 'asm' __volatile__.
368 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
370         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
371         * spinlock.c (__pthread_lock): Add memory barriers.
372         (__pthread_unlock): Likewise.
373         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
374         instruction.
375         (RELEASE): Not needed anymore.
376         (__compare_and_swap): Mark asm as modifying memory.
377         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
378         of MEMORY_BARRIER.
379         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
380         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
381         (MEMORY_BARRIER): Define using stbar.
382         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
383         stbar.
384         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
385         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
386         Mike Burrows <m3b@pa.dec.com>.
388 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
390         * signals.c (sigaction): Fix return value for the case SIG is one
391         of the signals the implementation uses.
392         Patch by Xavier.Leroy@inria.fr.
394 2000-04-01  Andreas Jaeger  <aj@suse.de>
396         * attr.c: Use shlib-compat macros.
397         * oldsemaphore.c: Likewise.
398         * pthread.c: Likewise.
399         * weaks.c: Likewise.
401 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
403         * semaphore.c (sem_timedwait): New function.
404         Patch by Carl Mailloux <carlm@oricom.ca>.
405         * semaphore.h: Declare sem_timedwait.
406         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
408 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
410         * sysdeps/pthread/Makefile: File removed.
412 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
414         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
415         * internals.h (__pthread_reset_pthread_once): Add prototype.
416         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
418         * manager.c (pthread_handle_create): Store ID of new thread before
419         clone call.
421 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
423         * attr.c: Use new macros from shlib-compat.h to define versions.
424         * oldsemaphore.c: Likewise.
425         * semaphore.c: Likewise.
426         * weaks.c: Likewise.
428         * pthread.c: Update for new SHLIB_COMPAT definition.
430         * manager.c (__pthread_manager): Unmask debug signal.
432         * pthread.c (pthread_initialize): Test for address of __dso_handle
433         being NULL, not value.  Use __on_exit, not on_exit.
434         Patch by Andreas Jaeger <aj@suse.de>.
436         * pthread.c: Use new macros from shlib-compat.h to define versions.
438 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
440         * pthread.c (pthread_initialize): Instead of on_exit use
441         __cxa_atexit if __dso_label is available to allow unloading the
442         libpthread shared library.
444 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
446         * condvar.c: Make tests for ownership of mutex less strict.
448 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
450         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
451         current thread and return error if not.
452         (pthread_cond_timedwait_relative_old): Likewise.
453         (pthread_cond_timedwait_relative_new): Likewise.
455         * mutex.c (__pthread_once): Handle cancelled init function correctly.
456         (pthread_once_cancelhandler): New function.
457         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
459 2000-03-14  Andreas Jaeger  <aj@suse.de>
461         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
462         REG_GS.
463         (pthread_handle_sigrestart_rt): Likewise.
464         * signals.c (pthread_sighandler_rt): Likewise.
466 2000-03-02  Andreas Jaeger  <aj@suse.de>
468         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
469         Reported by Sean Chen <sean.chen@turbolinux.com>.
471 2000-02-28  Andreas Jaeger  <aj@suse.de>
473         * rwlock.c: Fix typo.
475 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
477         * rwlock.c: Define __* variants of the functions and make old names
478         aliases.
479         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
480         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
482 2000-02-25  Andreas Jaeger  <aj@suse.de>
484         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
485         pwrite64, lseek64, open64, and __open64 with version 2.2.
487 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
489         * semaphore.h (SEM_FAILED): Use 0 not NULL.
491 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
493         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
494         nanosleep does not work either.  Get absolute time inside the
495         loop.
496         (pthread_cond_timedwait_relative_new): Likewise.
497         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
499 2000-02-13  Andreas Jaeger  <aj@suse.de>
501         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
502         (pthread_cond_timedwait_relative_old): Likewise.
504 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
506         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
507         but keep the code around.  A bug in the kernel prevent us from
508         using the code.
509         (pthread_cond_timedwait_relative_new): Likewise.
510         (PR libc/1597 and libc/1598).
512 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
514         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
515         loop around nanosleep calls instead of around most of the function
516         (pthread_cond_timedwait_relative_new): Likewise.
517         body.  Got rid of backwards goto and one local.
519 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
521         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
522         before every nanosleep call to account for time spent in the rest
523         of the function.
524         (pthread_cond_timedwait_relative_new): Likewise.
525         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
527 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
529         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
530         from nanosleep call so that in case we restart we only wait for the
531         remaining time.
532         (pthread_cond_timedwait_relative_new): Likewise.
533         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
535 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
537         * manager.c (pthread_allocate_stack): Compute guard page address
538         correctly.  Patch by HJ Lu.
540         * sysdeps/pthread/pthread.h: Define
541         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
543 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
545         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
546         preference handling.
547         (pthread_rwlockattr_setkind_np): Allow
548         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
549         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
551 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
553         * internals.h (pthread_readlock_info): New structure.
554         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
555         p_untracked_readlock_count.
556         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
557         Add initializers for new fields.
558         * manager.c (pthread_free): Free read/write lock lists.
559         * queue.h (queue_is_empty): New function.
560         * rwlock.c: Implement requirements about when readers should get
561         locks assigned.
562         * sysdeps/pthread/pthread.h
563         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
564         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
565         Define this name as well.
566         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
568 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
570         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
571         Adjust initializers for struct _pthread_descr_struct change.
572         * internals.h (struct _pthread_descr_struct): Move new elements to
573         the end.
575 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
577         Redesigned how cancellation unblocks a thread from internal
578         cancellation points (sem_wait, pthread_join,
579         pthread_cond_{wait,timedwait}).
580         Cancellation won't eat a signal in any of these functions
581         (*required* by POSIX and Single Unix Spec!).
582         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
583         simultaneous condition variable signal (not required by POSIX
584         or Single Unix Spec, but nice).
585         * spinlock.c: __pthread_lock queues back any received restarts
586         that don't belong to it instead of assuming ownership of lock
587         upon any restart; fastlock can no longer be acquired by two threads
588         simultaneously.
589         * restart.h: Restarts queue even on kernels that don't have
590         queued real time signals (2.0, early 2.1), thanks to atomic counter,
591         avoiding a rare race condition in pthread_cond_timedwait.
593 1999-12-31  Andreas Jaeger  <aj@suse.de>
595         * internals.h: Remove duplicate prototype declarations.
597         * weaks.c: Remove __THROW from prototypes since the file is not
598         compiled by a C++ compiler.
599         * internals.h: Likewise.
601 1999-12-30  Andreas Jaeger  <aj@suse.de>
603         * sysdeps/pthread/pthread.h: Move internal functions to...
604         * sysdeps/pthread/bits/libc-lock.h: ...here.
606 1999-12-29  Andreas Jaeger  <aj@suse.de>
608         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
610 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
612         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
613         beginning.
615         * manager.c (__pthread_start): Add one more cast to prevent
616         warning on 64bit machines.
618 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
620         * manager.c (pthread_handle_create): Set p_pid of new thread
621         before calling the callback function to report a new thread.
623 1999-12-20  Andreas Jaeger  <aj@suse.de>
625         * pthread.c (pthread_initialize): Move getrlimit call after
626         setting of errno.
628 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
630         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
631         pwrite64, lseek64, open64, and __open64.
632         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
633         pwrite64, lseek64, open64, and __open64.
635         * manager.c (pthread_allocate_stack): Correct computation of
636         new_thread_bottom.  Correct handling of stack size and when the
637         rlimit method to guard for stack growth is used.
638         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
639         minus one pagesize (not two).
641 1999-12-03  Andreas Jaeger  <aj@suse.de>
643         * Versions: Add __res_state with version GLIBC_2.2.
645         * errno.c (__res_state): New function to return thread specific
646         resolver state.
648         * pthread.c (pthread_initialize): Initialize p_resp.
649         (__pthread_reset_main_thread): Also set p_resp.
651         * manager.c (pthread_handle_create): Initialize p_resp.
653         * internals.h: Add thread specific resolver state.
654         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
656 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
658         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
659         beginning.
660         * sysdeps/i386/i686/pt-machine.h: Likewise.
661         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
663 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
665         * manager.c (pthread_start_thread_event): Initialize p_pid already
666         here.
668 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
670         * internals.h: Add prototype for __pthread_manager_event.
671         * manager.c (__pthread_manager_event): New function.
672         (pthread_start_thread_event): Correct computation of self.
673         Use INIT_THREAD_SELF.
674         * pthread.c (__pthread_manager_thread): Initialize p_lock.
675         (__pthread_initialize_manager): Respect event flags also for creation
676         of the manager thread.
678 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
680         * pthread.c (__pthread_initialize_manager): Initialize
681         __pthread_manager_thread.p_tid.
683 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
685         * internals.h: Declare __pthread_last_event.
686         * manager.c: Define __pthread_last_event.
687         (pthread_handle_create): Set __pthread_last_event.
688         (pthread_exited): Likewise.
689         * join.c (pthread_exit): Likewise.
691         * Makefile (libpthread-routines): Add events.
692         * events.c: New file.
693         * internals.h: Protect against multiple inclusion.
694         Include thread_dbP.h header.
695         (struct _pthread_descr_struct): Add new fields p_report_events and
696         p_eventbuf.
697         Declare event reporting functions.
698         * join.c (pthread_exit): Signal event if this is wanted.
699         * manager.c (__pthread_threads_events): New variable.
700         (pthread_handle_create): Take new parameters with event information.
701         Signal TD_CREATE event if wanted.
702         (__pthread_manager): Adjust pthread_handle_create call.
703         (pthread_start_thread_event): New function.  Block until manager is
704         finished and then call pthread_start_thread.
705         (pthread_exited): Signal TD_REAP event if wanted.
707 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
709         * restart.h (suspend_with_cancellation): Rewrite as a macro.
711         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
713 1999-10-25  Andreas Jaeger  <aj@suse.de>
715         * internals.h: Remove K&R compatibility.
716         * no-tsd.c: Likewise.
717         * semaphore.h: Likewise.
718         * signals.c: Likewise.
719         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
720         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
721         * weaks.c: Likewise.
723 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
725         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
726         and pthread_handle_sigcancel with functions that restore
727         %gs from the signal context.  For each signal handling function,
728         two wrappers are required, one for a non-RT signal and one for
729         a RT signal.
730         * linuxthreads/signal.c: For i386, add code to restore %gs
731         from the signal context in pthread_sighandler and
732         pthread_sighandler_rt.
734 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
736         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
738 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
740         * pthread.c (__pthread_initial_thread): Pass argument to
741         PTHREAD_START_ARGS_INITIALIZER.
742         (__pthread_manager_thread): Likewise.
744         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
745         initialize function.
747         * manager.c (pthread_handle_create): Remove p_startfct initialization.
749         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
751 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
753         * internals.h: Correct return types for __libc_read and __libc_write.
755 1999-10-09  Andreas Jaeger  <aj@suse.de>
757         * internals.h: Add __new_sem_post to get prototype in
758         manager.c; include semaphore.h for needed types.
760 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
762         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
763         directly instead of calling sem_post which should not be necessary
764         but is faster and might help in some case to work around problems.
765         Patch by khendricks@ivey.uwo.ca [libc/1382].
767 1999-10-08  Andreas Schwab  <schwab@suse.de>
769         * sysdeps/pthread/Subdirs: New file.
770         * Implies: Removed.
772 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
774         * Implies: New file.
775         * internals.h (struct _pthread_descr_struct): Add p_startfct.
776         * manager.c (pthread_handle_create): Initialize p_startfct.
777         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
779 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
781         * manager.c (__linuxthreads_pthread_threads_max): New variable.
782         * specific.c (__linuxthreads_pthread_keys_max): New variable.
783         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
785         * condvar.c (pthread_cond_timedwait_relative): Never return with
786         EINTR.  Patch by Andreas Schwab.
788 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
790         * signals.c (sigaction): Correct last patch.  Don't select
791         pthread_sighandler_rt based on the signal number but instead of
792         the SA_SIGINFO flag.
794 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
796         * specific.c: Move definitions of struct pthread_key_struct and
797         destr_function to ...
798         * internals.h: ...here.
800 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
802         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
803         this instead of pthread_handle_sigrestart if the signal is an RT
804         signal.
806         * signals.c: Handle passing through of sighandler arguments also
807         for real-time signals.
809 1999-09-03  Andreas Schwab  <schwab@suse.de>
811         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
812         fork as weak alias.
813         (__vfork): New function, alias vfork.
814         * Versions: Export __fork, vfork, and __vfork in libpthread.
816 1999-08-23  Andreas Schwab  <schwab@suse.de>
818         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
819         call to signal handler.
821 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
823         * pthread.c (__pthread_reset_main_thread): Undo last change.
824         (__pthread_kill_other_threads_np): Reset signal handlers for the
825         signals we used in the thread implementation here.
827 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
829         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
830         for the signals we used in the thread implementation [PR libc/1234].
832         * Versions: Export __pthread_kill_other_threads_np from libpthread
833         for GLIBC_2.1.2.
835         * signals.c: Pass sigcontext through wrapper to the user function.
837 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
839         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
840         __libc_internal_tsd_set.
842 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
844         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
845         needed anymore.
847 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
849         * internals.h: Align _pthread_descr_struct to 32 bytes.
850         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
851         libc/1206.
853 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
855         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
856         swap function.
858 1999-07-09  Cristian Gafton  <gafton@redhat.com>
860         * Makefile (libpthread-routines): Add oldsemaphore routine.
861         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
862         sem_trywait, and sem_wait to GLIBC_2.1.
863         * oldsemaphore.c: New file.
864         * semaphore.c: Add default_symbol_versions for the changed functions.
865         (__new_sem_init): Rename from sem_init.
866         (__new_sem_post): Rename from sem_post.
867         (__new_sem_wait): Rename from sem_wait.
868         (__new_sem_trywait): Rename from sem_trywait.
869         (__new_sem_getvalue): Rename from sem_getvalue.
870         (__new_sem_destroy): Rename from sem_destroy.
872 1999-06-23  Robey Pointer  <robey@netscape.com>
874         * internals.h: Added p_nextlock entry to separate queueing for a
875         lock from queueing for a CV (sometimes a thread queues on a lock
876         to serialize removing itself from a CV queue).
877         * pthread.c: Added p_nextlock to initializers.
878         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
880 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
882         * manager.c (pthread_handle_create): Free mmap region after stack
883         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
885 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
887         * man/pthread_cond_init.man: Correct example.
888         Reported by Tomas Berndtsson <tomas@nocrew.org>.
890         * linuxthreads.texi (Condition Variables): Likewise.
892 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
894         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
895         casx not cas, also successful casx returns the old value in rd
896         and not the new value.
898 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
900         * manager.c: If pthread_create() is given a NULL attribute
901         and the thread manager runs with a realtime policy, set the
902         scheduling policy of the newly created thread back to SCHED_OTHER.
903         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
904         initialize the schedpolicy field of new_thread->p_start_args
905         to that of the calling thread.
907 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
909         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
910         instruction does not allow memory element to use offset.
912 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
914         * manager.c (pthread_allocate_stack): Optimize initialization of new
915         thread descriptor.
917         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
918         Don't use initializer since it is all zeroes.
919         (__libc_once_define): Likewise.
921 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
923         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
924         doesn't exist anymore.
925         * sysdeps/i386/Implies: Likewise.
926         * sysdeps/m68k/Implies: Likewise.
927         * sysdeps/mips/Implies: Likewise.
928         * sysdeps/powerpc/Implies: Likewise.
929         * sysdeps/sparc/sparc32/Implies: Likewise.
930         * sysdeps/sparc/sparc64/Implies: Likewise.
932 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
934         * sysdeps/alpha/bits/semaphore.h: Removed.
935         * sysdeps/powerpc/bits/semaphore.h: Removed.
936         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
937         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
938         * Makefile (headers): Remove bits/semaphore.h.
940         * semaphore.h: Define _pthread_descr if necessary.
941         Don't include limits.h.  Define SEM_VALUE_MAX directly.
942         Define SEM_FAILED.
943         (sem_t): Protect element names with leading __.
944         Add declarations for sem_close, sem_open, and sem_unlink.
945         * semaphore.c: Adjust all functions for new element names.
946         Define sem_close, sem_open, and sem_unlink.
947         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
948         GLIBC_2.1.1.
949         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
950         necessary.
952 1999-03-16  H.J. Lu  <hjl@gnu.org>
954         * specific.c (pthread_key_delete): Check th->p_terminated to see
955         if the thread is running.
957         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
958         Added to GLIBC_2.0 for libc.so.
960 1999-02-12  H.J. Lu  <hjl@gnu.org>
962         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
963         __libc_allocate_rtsig): Added to GLIBC_2.1.
965         * internals.h (DEFAULT_SIG_RESTART): Removed.
966         (DEFAULT_SIG_CANCEL): Removed.
968         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
969         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
970         (__pthread_sig_restart, __pthread_sig_cancel,
971         __pthread_sig_debug): Initialized.
972         (pthread_initialize): Call init_rtsigs () to initialize
973         real-time signals.
975 1999-02-03  H.J. Lu  <hjl@gnu.org>
977         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
978         Don't restart the thread which sent REQ_DEBUG.
979         (pthread_start_thread): Check if __pthread_sig_debug > 0
980         before debugging.
982         * pthread.c (__pthread_initialize_manager): Suspend ourself
983         after sending __pthread_sig_debug to gdb instead of
984         __pthread_sig_cancel.
986 1999-01-24  H.J. Lu  <hjl@gnu.org>
988         * manager.c (__pthread_manager): Delete __pthread_sig_debug
989         from mask if __pthread_sig_debug > 0.
990         (pthread_handle_create): Increment __pthread_handles_num.
992         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
993         * pthread.c (__pthread_initialize_manager): Likewise.
995         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
996         instead of __libc_allocate_rtsig (2).
997         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
998         instead of __pthread_sig_cancel.
999         (pthread_handle_sigdebug): Fix comments.
1001 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1003         * manager.c (pthread_allocate_stack): Set
1004         __pthread_nonstandard_stacks if user-specified stack is used.
1006 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1008         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1009         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1011 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1013         * pthread.c: Use a third signal __pthread_sig_debug distinct
1014         from __pthread_sig_cancel to notify gdb when a thread is
1015         created
1016         * manager.c: Likewise.
1017         * internals.h: Likewise.
1018         * signals.c: The implementation of sigwait(s) assumed that
1019         all signals in s have signal handlers already attached.
1020         This is not required by the standard, so make it work
1021         also if some of the signals have no handlers.
1023 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1025         * linuxthreads.texi: Remove pointers from first @node.  Move old
1026         @node spec inside comment.
1028 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1030         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1031         _IO_lock_unlock.
1033 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1035         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1036         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1038 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1040         * manager.c: Threads now send __pthread_sig_cancel on termination.
1041         Change clone call and signal masks.
1042         * thread.c (pthread_handle_sigrestart): Remove special code for
1043         manager.
1044         (pthread_handle_sigcancel): In manager thread call
1045         __pthread_manager_sighandler.
1046         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1047         * sysdeps/i386/i686/pt-machine.h: Likewise.
1048         Patches by Xavier Leroy.
1050 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1052         * spinlock.c (__pthread_unlock): Don't crash if called for an
1053         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1055         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1056         overall runtime.
1058 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1060         * Examples/ex3.c: Wait until all threads are started before
1061         searching for the number to avoid race condition on very fast
1062         systems.
1064 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1066         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1067         declaration since it's not needed.
1069         * sysdeps/pthread/pthread.h: Move internal functions to ...
1070         * internals.h: ...here.
1072 1998-12-02  H.J. Lu  <hjl@gnu.org>
1074         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1075         SIGRTMIN is defined.
1076         (__pthread_sig_cancel): Likewise.
1078 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1080         * wrapsyscall.c: Include <sys/mman.h> for msync,
1081         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1082         Correct msync declaration.
1084 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1086         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1087         __libc_tsd_set): New macros for new interface.
1088         * no-tsd.c: New file, provide uninitialized defns of
1089         __libc_internal_tsd_get and __libc_internal_tsd_set.
1090         * Makefile (routines): Add no-tsd.
1092 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1094         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1095         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1096         __libc_internal_tsd_set): Move decls to ...
1097         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1098         declarations.
1100         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1101         __libc_internal_tsd_set): Make these pointers to functions, not
1102         functions; remove #pragma weak decls for them.
1103         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1104         Define static functions and initialized pointers to them.
1106 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1108         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1109         (CFLAGS-specific.c): Likewise.
1110         (CFLAGS-pthread.c): Likewise.
1111         (CFLAGS-ptfork.c): Likewise.
1112         (CFLAGS-cancel.c): Likewise.
1113         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1114         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1116         * mutex.c (pthread_mutex_init): Define as strong symbol.
1117         (pthread_mutex_destroy): Likewise.
1118         (pthread_mutex_trylock): Likewise.
1119         (pthread_mutex_lock): Likewise.
1120         (pthread_mutex_unlock): Likewise.
1121         (pthread_mutexattr_init): Likewise.
1122         (pthread_mutexattr_destroy): Likewise.
1123         (pthread_once): Likewise.
1124         * ptfork.c (pthread_atfork): Likewise.
1125         * specific.c (pthread_key_create): Likewise.
1126         (pthread_setspecific): Likewise.
1127         (pthread_getspecific): Likewise.
1129 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1131         * linuxthreads.texi: Fix punctuation after xref.
1133 1998-11-10  H.J. Lu  <hjl@gnu.org>
1135         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1136         if it is defined in <linux/limits.h>.
1138 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1140         * spinlock.h (__pthread_trylock): Define inline.
1141         (__pthread_lock): Add extra parameter to declaration.  Declare
1142         using internal_function.
1143         (__pthread_unlock): Declare using internal_function.
1144         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1145         of local variable self.  Avoid recomputing self.  Define using
1146         internal_function.
1147         (__pthread_trylock): Remove.
1148         (__pthread_unlock): Define using internal_function.
1149         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1150         computed self value is possible.
1151         * condvar.c: Likewise.
1152         * join.c: Likewise.
1153         * manager.c: Likewise.
1154         * mutex.c: Likewise.
1155         * pthread.c: Likewise.
1156         * rwlock.c: Likewise.
1157         * semaphore.c: Likewise.
1158         * signals.c: Likewise.
1160 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1162         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1163         __ to field names of the struct.
1164         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1165         Likewise.
1166         (pthread_attr_t): Likewise.
1167         (pthread_cond_t): Likewise.
1168         (pthread_condattr_t): Likewise.
1169         (pthread_mutex_t): Likewise.
1170         (pthread_mutexattr_t): Likewise.
1171         (pthread_rwlock_t): Likewise.
1172         (pthread_rwlockattr_t): Likewise.
1173         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1174         * cancel.c: Likewise.
1175         * condvar.c: Likewise.
1176         * manager.c: Likewise.
1177         * mutex.c: Likewise.
1178         * pthread.c: Likewise.
1179         * ptlongjmp.c: Likewise.
1180         * rwlock.c: Likewise.
1181         * spinlock.c: Likewise.
1183 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1185         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1186         also with PT_EI.
1188         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1189         definitions.
1191         * Makefile (libpthread-routines): Add pt-machine.
1192         * pt-machine.c: New file.
1193         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1194         yet defined.  Use PT_EI in extern inline definitions.
1195         * sysdeps/arm/pt-machine.h: Likewise.
1196         * sysdeps/i386/pt-machine.h: Likewise.
1197         * sysdeps/i386/i686/pt-machine.h: Likewise.
1198         * sysdeps/m68k/pt-machine.h: Likewise.
1199         * sysdeps/mips/pt-machine.h: Likewise.
1200         * sysdeps/powerpc/pt-machine.h: Likewise.
1201         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1202         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1204 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1206         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1207         is declared.
1209 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1211         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1212         argument.
1213         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1215 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1217         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1218         multiple inclusion guard.
1220 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1222         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1223         array index overflow.
1225 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1227         * sysdeps/pthread/semaphore.h: New file.
1229 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1231         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1232         _LIBC_TSD_KEY_DL_ERROR.
1234 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1236         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1237         * sysdeps/i386/pt-machine.h: Likewise.
1238         Suggested by Roland McGrath.
1240 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1242         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1243         access thread data with non-constant offsets.
1244         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1245         necessary.
1247         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1248         THREAD_SETMEM_NC definitions.
1250         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1251         THREAD_SETMEM_NC.
1252         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1254 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1256         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1257         not already defined.
1258         (struct _pthread_descr_struct): Add p_self and p_nr field.
1259         * manager.c (__pthread_handles): Define second element to point
1260         to manager thread.
1261         (__pthread_handles_num): Initialize to 2.
1262         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1263         (pthread_start_thread): Likewise.
1264         (pthread_handle_create): Start search for free slot at entry 2.
1265         Initialize new fields p_self and p_nr.
1266         Call __clone with CLONE_PTRACE if available.
1267         (pthread_free): Call FREE_THREAD_SELF if available.
1268         * pthread.c (__pthread_initial_thread): Initialize new fields.
1269         (__pthread_manager_thread): Likewise.
1270         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1272         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1273         elements of the thread descriptor.
1274         * condvar.c: Likewise.
1275         * errno.c: Likewise.
1276         * join.c: Likewise.
1277         * manager.c: Likewise.
1278         * pthread.c: Likewise.
1279         * ptlongjmp.c: Likewise.
1280         * semaphore.c: Likewise.
1281         * signals.c: Likewise.
1282         * specific.c: Likewise.
1283         * spinlock.c: Likewise.
1285         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1287         * sysdeps/i386/useldt.h: New file.
1288         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1290         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1291         THREAD_SETMEM using __thread_self.
1292         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1294 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1296         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1297         turned out that we didn't need to queue after all.
1299 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1301         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1302         and wastes space; correct types.
1304 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1306         * signals.c (sigaction): Handle NULL argument.
1308 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1310         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1311         of sigset_t.
1313 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1315         * Makefile (linuxthreads-version): Extract correct number from
1316         Banner.
1318 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1320         * Banner: Bump version number to 0.8
1321         * FAQ.html: Many updates, in particular w.r.t. debugging.
1322         * manager.c: Support for non-default stacksize for
1323         LinuxThreads-allocated stacks;
1324         don't use guard pages for stacks with default size, rely on
1325         rlimit(RLIMIT_STACK) instead (it's cheaper).
1326         * attr.c: Likewise.
1327         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1328         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1329         * condvar.c: Likewise.
1330         * internals.h: Likewise.
1331         * restart.h: Likewise.
1332         * signals.c: Likewise.
1333         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1335 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1337         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1338         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1339         * Versions: Put __pthread_mutexattr_settype under version
1340         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1341         __pthread_mutexattr_gettype.
1343 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1345         * sysdeps/pthread/bits/libc-lock.h: Make
1346         __pthread_mutexattr_settype weak.  Don't make
1347         __pthread_mutexattr_setkind_np weak.
1349 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1351         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1352         call can succeed here.
1354         * mutex.c: Define __pthread_mutexattr_settype and make
1355         __pthread_mutexattr_setkind_np an alias.
1356         Likewise for __pthread_mutexattr_gettype.
1358 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1360         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1361         is root.
1363 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1365         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1367 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1369         * Examples/ex6.c: Include <unistd.h> for usleep.
1371 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1373         * Examples/ex4.c (main): Use exit, not pthread_exit.
1375 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1377         * Versions: Add __pthread_mutexattr_gettype and
1378         __pthread_mutexattr_settype.
1379         * lockfile.c: Use __pthread_mutexattr_settype instead of
1380         __pthread_mutexattr_setkind_np.
1381         * mutex.c: Define __pthread_mutexattr_gettype and
1382         __pthread_mutexattr_settype.
1383         * weak.c: Likewise.
1384         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1385         __pthread_mutexattr_settype.
1386         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1387         Use __pthread_mutexattr_settype.
1389 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1391         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1392         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1393         pthread_mutexattr_settype.
1394         * sysdeps/pthread/pthread.h: Declare these functions.
1395         Move pthread_sigmask and pthread_kill declaration in separate header.
1396         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1398 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1400         * Makefile: Add rules to compile and run tests.
1401         * Examples/ex1.c: Little changes to fix warnings.
1402         * Examples/ex2.c: Likewise.
1403         * Examples/ex3.c: Likewise.
1404         * Examples/ex4.c: Likewise.
1405         * Examples/ex5.c: Likewise.
1406         * Examples/ex6.c: New file.
1408 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1410         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1412 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1414         * attr.c: Include <string.h>.
1416 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1418         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1419         * internals.h: Include limits.h.
1420         * manager.c: Use memcpy to copy sched_param.
1421         * ptfork.c: Include errno.h.
1422         * pthread.c: Likewise.
1423         * semaphore.c: Likewise.
1424         * specific.c: Likewise.
1425         * spinlock.h: Likewise.
1426         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1427         type definition to ...
1428         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1430 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1432         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1434         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1435         as macros as demanded in POSIX.1, Annex C.
1437 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1439         * internals.h (struct pthread_request): For free use pthread_t
1440         instead of pthread_descr.
1441         * join.c (pthread_join): Pass thread_id, not th to manager.
1442         (pthread_detach): Likewise.
1443         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1444         (pthread_exited): Remove detached queue code.
1445         (pthread_handle_free): Expect thread ID parameter and use it to
1446         validate the thread decsriptor.  Don't use detached queue.
1447         Patches by Xavier Leroy.
1449 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1451         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1452         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1453         __pthread_atfork, __pthread_key_create, __pthread_once.
1454         * internals.h: Doc fix.
1455         * pthread.c (__pthread_initialize): Define again.
1457 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1459         * manager.c (pthread_exited): If thread is not detached put it on
1460         special list.
1461         (pthread_handle_free): If thread is not on list with living threads
1462         search on list with detached threads.
1464         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1465         for new definition of pthread_rwlock_t.
1467         * spinlock.c: Correct test whether to compile
1468         __pthread_compare_and_swap or not.
1470 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1472         * attr.c: Finish user stack support.  Change locking code to be safe
1473         in situations with different priorities.
1474         * cancel.c: Likewise.
1475         * condvar.c: Likewise.
1476         * internals.h: Likewise.
1477         * join.c: Likewise.
1478         * manager.c: Likewise.
1479         * mutex.c: Likewise.
1480         * pthread.c: Likewise.
1481         * ptlongjmp.c: Likewise.
1482         * queue.h: Likewise.
1483         * rwlock.c: Likewise.
1484         * semaphore.c: Likewise.
1485         * semaphore.h: Likewise.
1486         * signals.c: Likewise.
1487         * spinlock.c: Likewise.
1488         * spinlock.h: Likewise.
1489         * sysdeps/pthread/pthread.h: Likewise.
1490         Patches by Xavier Leroy.
1492         * sysdeps/i386/i686/pt-machine.h: New file.
1494 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1496         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1497         [sg]et_stackaddr prototypes always available.
1499         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1500         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1502 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1504         * manager.c (pthread_free): Undo patch from 980430.
1505         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1507 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1509         * manager.c: Define __pthread_manager_adjust_prio and use it to
1510         increase priority when needed.
1511         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1512         * mutex.c: Optimize mutexes to wake up only one thread.
1513         * pthread.c: Move PID of manager for global variable in structure
1514         element.
1515         Patches by Xavier Leroy.
1517 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1519         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1521 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1523         * attr.c: Correct typo.
1525 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1527         * manager.c (pthread_free): Unmap guard before the stack.
1528         Patch by Matthias Urlichs.
1530 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1532         * manager.c (pthread_free): Detect already free child.
1533         Patch by Xavier Leroy, reported by Matthias Urlichs.
1535 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1537         * Makefile (linuxthreads-version): Renamed back from
1538         libpthread-version.
1540 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
1542         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1543         __libc_longjmp.
1545 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
1547         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1548         * internals.h: Add definitions for new spinlock implementation.
1549         * ptlongjmp.c: New file.
1550         * spinlock.c: New file.
1551         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1552         new function __pthread_acquire to prevent deadlocks with thread
1553         with different priorities.
1554         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1556 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1558         * manager.c (__pthread_manager): Reduce first argument to select
1559         to include just the needed file descriptor.
1561 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
1563         * manager.c: Fix last patch which caused core dumps.
1565         * pthread.c: Correctly handle missing SIGRTMIN.
1567 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1569         * libpthread.map: Add __libc_internal_tsd_get and
1570         __libc_internal_tsd_set.  Add missing cancelable functions. Export
1571         libc internal versions of the cancelable functions.
1573 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
1575         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1577 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
1579         * attr.c: Implement pthread_attr_[gs]etguardsize,
1580         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1581         Change pthread_attr_init to have two interfaces.
1582         * internals.h (struct _pthread_descr_struct): Add new fields for
1583         above functions.
1584         * libpthread.map: Add names in GLIBC_2.1 section.
1585         * manager.c (pthread_handle_create): Implement guardsize and
1586         user stack.
1587         (pthread_free): Likewise.
1588         * pthread.c (pthread_create): Add new interface for changed
1589         pthread_attr_t.
1590         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1591         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1592         PTHREAD_STACK_MIN.
1594 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
1596         * manager.c: Enable resetting of the thread scheduling policy
1597         to SCHED_OTHER when the parent thread has a different one.
1599 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
1601         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1602         _POSIX_ASYNCHRONOUS_IO.
1604         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1605         mutexes.
1606         * mutex.c: Implement new mutex types.
1608         * internals.h: Include <signal.h>.
1610         * libpthread.map: Add __erno_location and __h_errno_location.
1612         * errno.c: Return pointer to variable actually in use.  This might
1613         not be the one in the thread structure.
1614         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1615         and p_h_errnop.
1616         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1617         of manager thread structure.
1618         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1619         thread.
1620         * pthread.c: Adapt initializer for thread structures.
1621         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1622         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1623         current thread to global variables.
1625 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1627         * rwlock.c: New file.
1628         * Makefile (libpthread-routines): Add rwlock.
1629         * sysdeps/pthread/pthread.h: Define data structures and declare
1630         functions.
1631         * libpthread.map: Add new functions.
1633 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1635         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1636         * sysdeps/arm/Implies: likewise.
1637         * README: Document it.
1639 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1641         * signals.c: Remove unneeded initializer for sigwaited, saving a
1642         warning.
1644 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1646         * semaphore.c (sem_init): Set sem_spinlock only if available.
1648 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1650         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1651         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1653         * Makefile: Update from LinuxThreads 0.7.
1654         * internals.h. Likewise.
1655         * manager.c: Likewise.
1656         * mutex.c: Likewise.
1657         * pthread.c: Likewise.
1658         * signals.c: Likewise.
1659         * specific.c: Likewise.
1660         * Examples/ex3.c: Likewise.
1662 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1664         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1665         open.
1667 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1669         * wrapsyscall.c: Add socket functions which are also cancelation
1670         points.
1672 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1674         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1675         New functions for fast thread specific data within libc.
1677         * internals.h: Add new array p_libc_specific to struct
1678         _pthread_descr_struct.
1680         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1682 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1684         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1685         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1687 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1689         * internals.h (struct _pthread_descr_struct): Add definitions for
1690         two-level specific key handling.
1691         * manager.c (pthread_handle_create): Initialize specific memory array.
1692         * specific.c: Implement two-level key handling.
1693         * weaks.c: Don't provide dummy key handling.
1694         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1695         Add definition of __libc_key_t.
1696         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1697         as 1024.
1698         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1699         PTHREAD_DESTRUCTOR_ITERATIONS.
1701         * manager.c (pthread_handle_create): Compare mmap result with
1702         MAP_FAILED.
1704         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1705         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1707 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1709         sysdeps/sparc -> sysdeps/sparc/sparc32
1710         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1712         * internals.h: Change definition of THREAD_SELF to be an expression,
1713         not a statement that did a return.
1714         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1715         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1716         Follow Solaris and use a "system reserved" register (%g6) to hold
1717         the thread descriptor.
1718         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1720 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1722         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1723         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1724         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1726         * semaphore.c: Include spinlock.h only when needed.
1728         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1729         keys for entries not in use.
1731         * weaks.c: Implement key handling functions for real.
1733 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1735         Initial sparc64-linux support:
1736         * linuxthreads/sysdeps/sparc64/Implies: New file.
1737         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1739 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1741         * semaphore.c: Include spinlock.h at correct place.
1742         Patch by HJ Lu.
1744 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1746         The Great Bit File Move:
1747         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1748         * sysdeps/powerpc/semaphorebits.h: Likewise.
1749         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1750         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1751         * sysdeps/pthread/libc-lock.h: -> bits/
1752         * sysdeps/pthread/stdio-lock.h: Likewise.
1753         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1754         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1755         * semaphore.h: Likewise.
1756         * sysdeps/pthread/pthread.h: Likewise.
1758         * lockfile.c: <foo.h> -> <bits/foo.h>.
1759         * semaphore.h: Likewise.
1761         * Makefile: (headers): foo.h -> bits/foo.h.
1762         * sysdeps/pthread/Makefile: Likewise.
1764 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1766         * semaphore.c (sem_init): Set sem_spinlock only if available.
1768         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1769         asm constraints.
1771 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1773         Update from LinuxThreads 0.6.
1775         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1776         and __sched_get_priority_min instead of names without `__'.
1778         * manager.c: Rewrite large parts to implement opaque pthread_t.
1780         * cancel.c: Adapt for opaque pthread_t type.
1781         * condvar.c: Likewise.
1782         * errno.c: Likewise.
1783         * join.c: Likewise.
1784         * mutex.c: Likewise.
1785         * pthread.c: Likewise.
1786         * signals.c: Likewise.
1787         * specific.c: Likewise.
1788         * restart.h: Likewise.
1789         * queue.h: Likewise.
1790         * Examples/ex3.c: Likewise.
1791         * Examples/ex4.c: Likewise.
1792         * sysdeps/pthread/pthread.h: Likewise.
1794         * pthread.c: Accumulate time for all threads in thread manager.
1796         * semaphore.c: Implement fallback implementation for architectures
1797         sometimes missing compare-exchange operations.
1799         * cancel.c (pthread_cancel): Validate handle argument.
1800         * join.c (pthread_join): Likewise.
1801         (pthread_detach): Likewise.
1802         * signals.c (pthread_kill): Likewise.
1804         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1806         * queue.h (enqueue): Enqueue thread according to priority.
1808         * internals.c (struct pthread_start_args): New struct for passing
1809         args to cloning function.
1810         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1811         opaque pthread_t.
1813         * Examples/Makefile (clean): Pass -f option to rm.
1815         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1816         and define TEST_FOR_COMPARE_AND_SWAP.
1817         * sysdeps/i386/i486/pt-machine.h: Removed.
1819         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1820         to 1024.
1822 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1824         * restart.h (suspend): Clear p_signal before suspending.
1825         (suspend_with_cancellation): Likewise.
1826         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1828         * weaks.c: Make __pthread_key_create return 1.
1829         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1830         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1831         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1832         using libio.
1834 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1836         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1838 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1840         * sysdeps/powerpc/Implies: Added.
1841         * sysdeps/powerpc/pt-machine.h: Added.
1842         * sysdeps/powerpc/semaphorebits.h: Added.
1844 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1846         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1847         initializer.
1848         (__pthread_manager_thread): Likewise.
1849         Reported by Andreas Jaeger.
1851 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1853         Since sigset_t no longer fits in a register, we can't pass in the
1854         thread's initial mask so easily.  Take this opportunity to simplify
1855         the clone implementation by only accepting a single void* argument.
1857         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1858         in the thread struct instead of as arguments through clone.
1859         (pthread_start_thread): Look for them there.
1860         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1861         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1862         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1863         clone invocation.