Update.
[glibc.git] / linuxthreads / ChangeLog
blobd20d68a8e0ab224b5b352809c456614abcbf810d
1 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
3         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
5 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
7         * internals.h (__RES_PTHREAD_INTERNAL): Define.
9 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
11         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
12         object state is represented with additional bits which distinguish
13         whether that state was set up in the current process, or
14         in an ancestor process. If that state was set in an ancestor,
15         it means that a fork happened while thread was executing the init
16         function. In that case, the state is reset to NEVER.
17         * mutex.c (__pthread_once_fork_prepare): New function.
18         (__pthread_once_fork_child): Likewise
19         (__pthread_once_fork_parent): Likewise
20         (__pthread_reset_pthread_once): Removed.
21         * ptfork.c (__fork): Call new handlers in mutex.c.
22         * internals.h: Declarations of new mutex.c functions added.
23         Declaration of removed function deleted.
24         * linuxthreads.texi: Updated documentation about pthread_once
25         to clarify what happens under cancellation and forking.
27 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
29         * internals.h: New thread manager request type, REQ_KICK.
30         * join.c (pthread_exit): main thread now calls exit() instead
31         of _exit() in order to proper process cleanup.
32         * manager.c (__pthread_manager): Do not terminate manager
33         after unblocking main thread; wait for main thread's
34         REQ_PROCESS_EXIT request instead.
35         Also, added REQ_KICK case to handle new request; this just does
36         nothing.
37         * manager.c (pthread_exited): Do not terminate manager after
38         unblocking main thread.
39         * manager.c (__pthread_manager_sighandler): If the main thread
40         is waiting for all other threads to die, send a REQ_KICK into
41         the thread manager request pipe to get it to clean out the threads
42         and unblock the main thread as soon as possible. This fixes
43         the 2000 millisecond hang on shutdown bug.
44         * Examples/ex7.c: New file, tests shutdown behavior when all threads
45         including the main one call pthread_exit(), or implicitly do so.
46         * Makefile (tests): Add ex7.
48 2000-05-05  Andreas Jaeger  <aj@suse.de>
50         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
51         (pthread_getcpuclockid): Correct test for ourselves.
53 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
55         * internals.h (struct _pthread_descr_struct): Reorganization.
56         Allocate room for 16 pointers at head of the structure for future
57         thread-local data handling.  Move p_self member in this area.
58         * manager.c (pthread_handle_create): Adjust use of p_self.
59         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
60         * pthread.c (__pthread_initial_thread): Adjust initialization.
61         (__pthread_manager_thread): Likewise.
63 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
65         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
66         for eventmask larger than 1 word.
68 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
70         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
71         * pthread.c (__pthread_initialize_minimal): New function.  Perform
72         minimal initialization.
73         (pthread_initialize): Remove this code here.
74         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
75         are working around the problem in glibc.
77 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
79         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
80         now.  First gcc must be fixed (more concrete: libgcc).
82 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
84         * pthread.c: Remove special treatement for interrupt handlers on x86.
85         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
86         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
87         necessary.
88         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
90 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
92         * join.c (pthread_exit): Set p_terminated after reporting the
93         termination event instead of before.
95 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
97         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
98         if __USE_UNIX98.
100 2000-04-18  Andreas Jaeger  <aj@suse.de>
102         * Versions: Use ld instead of ld.so.
104 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
106         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
107         Remove the typedef keyword.
109 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
111         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
112         not stbar.
113         (READ_MEMORY_BARRIER): Define.
114         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
115         MEMORY_BARRIER.
116         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
117         headers.
119 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
121         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
122         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
123         use thread_handle().
125 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
127         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
128         if fast mutex is used.  Don't initialize `already_canceled' twice.
129         Correctly test for return value of timedsuspend.
131         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
132         therefore don't need the _rt versions of the signal handlers.
134 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
136         * pthread.c (pthread_yield): New function.
137         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
138         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
139         * internals.h: Declare __pthread_yield.
141         * pthread.c (pthread_initialize): Avoid a bit more code if
142         realtime signals are known to exist.
144         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
145         to dynamically detect RT signals and avoid generating compatibility
146         functions with old kernel.
147         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
148         __pthread_restart_new directly.
149         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
150         __pthread_wait_for_restart_signal directly.
151         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
152         __pthread_timedsuspend_new directly.
154 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
156         * condvar.c: Remove all the special code to handle cond_timedwait.
157         Use timedsuspend instead.
158         * internals.h: Declare __pthread_timedsuspend_old,
159         __pthread_timedsuspend_new, and __pthread_timedsuspend.
160         Remove declaration of __pthread_init_condvar.
161         * pthread.c: Define __pthread_timedsuspend variable.
162         (__pthread_timedsuspend_old): New function.  Timed suspension
163         implementation for old Linux kernels.
164         (__pthread_timedsuspend_new): New function.  Timed suspension
165         implementation for new Linux kernels.
166         * restart.h (timedsuspend): New function.  Call appropriate
167         suspension function through __pthread_timedsuspend.
168         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
169         the code.
170         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
172         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
173         undefined.
174         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
175         where possible.
176         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
177         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
179         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
180         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
182 2000-04-14  Andreas Jaeger  <aj@suse.de>
184         * weaks.c: Fix typo.
186         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
187         2.2 for linuxthreads.
189 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
191         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
192         (pthread_getcpuclockid): Fix typo.
194 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
196         * Makefile (libpthread-routines): Add getcpuclockid.
197         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
198         * sysdeps/pthread/getcpuclockid.c: New file.
199         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
200         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
202         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
203         Defined.
204         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
206         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
207         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
208         and pthread_spin_unlock.
209         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
210         into pthread_spinlock_t.  Change all uses.
211         * spinlock.c: Implement pthread_spin_lock.
212         Rename __pthread_unlock to __pthread_spin_unlock and define weak
213         alias for real name.
214         Define pthread_spin_trylock, pthread_spin_init, and
215         pthread_spin_destroy.
216         Change all uses of _pthread_fastlock to pthread_spinlock_t.
217         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
218         Change all uses of _pthread_fastlock to pthread_spinlock_t.
219         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
220         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
221         and pthread_spin_unlock.
222         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
223         Change all uses of _pthread_fastlock to pthread_spinlock_t.
224         * condvar.c: Likewise.
225         * internals.h: Likewise.
226         * join.c: Likewise.
227         * manager.c: Likewise.
228         * mutex.c: Likewise.
229         * pthread.c: Likewise.
230         * rwlock.c: Likewise.
231         * semaphore.c: Likewise.
232         * signals.c: Likewise.
234         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
235         macros.
236         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
238 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
240         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
241         _POSIX_SHARED_MEMORY_OBJECTS.
243 2000-04-11  Andreas Jaeger  <aj@suse.de>
245         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
246         (__compare_and_swap): Mark as modifying memory.
248 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
250         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
251         __volatile__.
252         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
253         Don't have the 'asm' __volatile__.
255 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
257         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
258         * spinlock.c (__pthread_lock): Add memory barriers.
259         (__pthread_unlock): Likewise.
260         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
261         instruction.
262         (RELEASE): Not needed anymore.
263         (__compare_and_swap): Mark asm as modifying memory.
264         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
265         of MEMORY_BARRIER.
266         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
267         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
268         (MEMORY_BARRIER): Define using stbar.
269         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
270         stbar.
271         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
272         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
273         Mike Burrows <m3b@pa.dec.com>.
275 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
277         * signals.c (sigaction): Fix return value for the case SIG is one
278         of the signals the implementation uses.
279         Patch by Xavier.Leroy@inria.fr.
281 2000-04-01  Andreas Jaeger  <aj@suse.de>
283         * attr.c: Use shlib-compat macros.
284         * oldsemaphore.c: Likewise.
285         * pthread.c: Likewise.
286         * weaks.c: Likewise.
288 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
290         * semaphore.c (sem_timedwait): New function.
291         Patch by Carl Mailloux <carlm@oricom.ca>.
292         * semaphore.h: Declare sem_timedwait.
293         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
295 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
297         * sysdeps/pthread/Makefile: File removed.
299 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
301         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
302         * internals.h (__pthread_reset_pthread_once): Add prototype.
303         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
305         * manager.c (pthread_handle_create): Store ID of new thread before
306         clone call.
308 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
310         * attr.c: Use new macros from shlib-compat.h to define versions.
311         * oldsemaphore.c: Likewise.
312         * semaphore.c: Likewise.
313         * weaks.c: Likewise.
315         * pthread.c: Update for new SHLIB_COMPAT definition.
317         * manager.c (__pthread_manager): Unmask debug signal.
319         * pthread.c (pthread_initialize): Test for address of __dso_handle
320         being NULL, not value.  Use __on_exit, not on_exit.
321         Patch by Andreas Jaeger <aj@suse.de>.
323         * pthread.c: Use new macros from shlib-compat.h to define versions.
325 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
327         * pthread.c (pthread_initialize): Instead of on_exit use
328         __cxa_atexit if __dso_label is available to allow unloading the
329         libpthread shared library.
331 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
333         * condvar.c: Make tests for ownership of mutex less strict.
335 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
337         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
338         current thread and return error if not.
339         (pthread_cond_timedwait_relative_old): Likewise.
340         (pthread_cond_timedwait_relative_new): Likewise.
342         * mutex.c (__pthread_once): Handle cancelled init function correctly.
343         (pthread_once_cancelhandler): New function.
344         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
346 2000-03-14  Andreas Jaeger  <aj@suse.de>
348         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
349         REG_GS.
350         (pthread_handle_sigrestart_rt): Likewise.
351         * signals.c (pthread_sighandler_rt): Likewise.
353 2000-03-02  Andreas Jaeger  <aj@suse.de>
355         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
356         Reported by Sean Chen <sean.chen@turbolinux.com>.
358 2000-02-28  Andreas Jaeger  <aj@suse.de>
360         * rwlock.c: Fix typo.
362 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
364         * rwlock.c: Define __* variants of the functions and make old names
365         aliases.
366         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
367         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
369 2000-02-25  Andreas Jaeger  <aj@suse.de>
371         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
372         pwrite64, lseek64, open64, and __open64 with version 2.2.
374 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
376         * semaphore.h (SEM_FAILED): Use 0 not NULL.
378 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
380         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
381         nanosleep does not work either.  Get absolute time inside the
382         loop.
383         (pthread_cond_timedwait_relative_new): Likewise.
384         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
386 2000-02-13  Andreas Jaeger  <aj@suse.de>
388         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
389         (pthread_cond_timedwait_relative_old): Likewise.
391 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
393         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
394         but keep the code around.  A bug in the kernel prevent us from
395         using the code.
396         (pthread_cond_timedwait_relative_new): Likewise.
397         (PR libc/1597 and libc/1598).
399 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
401         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
402         loop around nanosleep calls instead of around most of the function
403         (pthread_cond_timedwait_relative_new): Likewise.
404         body.  Got rid of backwards goto and one local.
406 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
408         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
409         before every nanosleep call to account for time spent in the rest
410         of the function.
411         (pthread_cond_timedwait_relative_new): Likewise.
412         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
414 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
416         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
417         from nanosleep call so that in case we restart we only wait for the
418         remaining time.
419         (pthread_cond_timedwait_relative_new): Likewise.
420         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
422 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
424         * manager.c (pthread_allocate_stack): Compute guard page address
425         correctly.  Patch by HJ Lu.
427         * sysdeps/pthread/pthread.h: Define
428         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
430 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
432         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
433         preference handling.
434         (pthread_rwlockattr_setkind_np): Allow
435         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
436         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
438 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
440         * internals.h (pthread_readlock_info): New structure.
441         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
442         p_untracked_readlock_count.
443         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
444         Add initializers for new fields.
445         * manager.c (pthread_free): Free read/write lock lists.
446         * queue.h (queue_is_empty): New function.
447         * rwlock.c: Implement requirements about when readers should get
448         locks assigned.
449         * sysdeps/pthread/pthread.h
450         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
451         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
452         Define this name as well.
453         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
455 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
457         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
458         Adjust initializers for struct _pthread_descr_struct change.
459         * internals.h (struct _pthread_descr_struct): Move new elements to
460         the end.
462 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
464         Redesigned how cancellation unblocks a thread from internal
465         cancellation points (sem_wait, pthread_join,
466         pthread_cond_{wait,timedwait}).
467         Cancellation won't eat a signal in any of these functions
468         (*required* by POSIX and Single Unix Spec!).
469         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
470         simultaneous condition variable signal (not required by POSIX
471         or Single Unix Spec, but nice).
472         * spinlock.c: __pthread_lock queues back any received restarts
473         that don't belong to it instead of assuming ownership of lock
474         upon any restart; fastlock can no longer be acquired by two threads
475         simultaneously.
476         * restart.h: Restarts queue even on kernels that don't have
477         queued real time signals (2.0, early 2.1), thanks to atomic counter,
478         avoiding a rare race condition in pthread_cond_timedwait.
480 1999-12-31  Andreas Jaeger  <aj@suse.de>
482         * internals.h: Remove duplicate prototype declarations.
484         * weaks.c: Remove __THROW from prototypes since the file is not
485         compiled by a C++ compiler.
486         * internals.h: Likewise.
488 1999-12-30  Andreas Jaeger  <aj@suse.de>
490         * sysdeps/pthread/pthread.h: Move internal functions to...
491         * sysdeps/pthread/bits/libc-lock.h: ...here.
493 1999-12-29  Andreas Jaeger  <aj@suse.de>
495         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
497 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
499         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
500         beginning.
502         * manager.c (__pthread_start): Add one more cast to prevent
503         warning on 64bit machines.
505 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
507         * manager.c (pthread_handle_create): Set p_pid of new thread
508         before calling the callback function to report a new thread.
510 1999-12-20  Andreas Jaeger  <aj@suse.de>
512         * pthread.c (pthread_initialize): Move getrlimit call after
513         setting of errno.
515 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
517         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
518         pwrite64, lseek64, open64, and __open64.
519         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
520         pwrite64, lseek64, open64, and __open64.
522         * manager.c (pthread_allocate_stack): Correct computation of
523         new_thread_bottom.  Correct handling of stack size and when the
524         rlimit method to guard for stack growth is used.
525         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
526         minus one pagesize (not two).
528 1999-12-03  Andreas Jaeger  <aj@suse.de>
530         * Versions: Add __res_state with version GLIBC_2.2.
532         * errno.c (__res_state): New function to return thread specific
533         resolver state.
535         * pthread.c (pthread_initialize): Initialize p_resp.
536         (__pthread_reset_main_thread): Also set p_resp.
538         * manager.c (pthread_handle_create): Initialize p_resp.
540         * internals.h: Add thread specific resolver state.
541         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
543 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
545         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
546         beginning.
547         * sysdeps/i386/i686/pt-machine.h: Likewise.
548         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
550 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
552         * manager.c (pthread_start_thread_event): Initialize p_pid already
553         here.
555 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
557         * internals.h: Add prototype for __pthread_manager_event.
558         * manager.c (__pthread_manager_event): New function.
559         (pthread_start_thread_event): Correct computation of self.
560         Use INIT_THREAD_SELF.
561         * pthread.c (__pthread_manager_thread): Initialize p_lock.
562         (__pthread_initialize_manager): Respect event flags also for creation
563         of the manager thread.
565 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
567         * pthread.c (__pthread_initialize_manager): Initialize
568         __pthread_manager_thread.p_tid.
570 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
572         * internals.h: Declare __pthread_last_event.
573         * manager.c: Define __pthread_last_event.
574         (pthread_handle_create): Set __pthread_last_event.
575         (pthread_exited): Likewise.
576         * join.c (pthread_exit): Likewise.
578         * Makefile (libpthread-routines): Add events.
579         * events.c: New file.
580         * internals.h: Protect against multiple inclusion.
581         Include thread_dbP.h header.
582         (struct _pthread_descr_struct): Add new fields p_report_events and
583         p_eventbuf.
584         Declare event reporting functions.
585         * join.c (pthread_exit): Signal event if this is wanted.
586         * manager.c (__pthread_threads_events): New variable.
587         (pthread_handle_create): Take new parameters with event information.
588         Signal TD_CREATE event if wanted.
589         (__pthread_manager): Adjust pthread_handle_create call.
590         (pthread_start_thread_event): New function.  Block until manager is
591         finished and then call pthread_start_thread.
592         (pthread_exited): Signal TD_REAP event if wanted.
594 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
596         * restart.h (suspend_with_cancellation): Rewrite as a macro.
598         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
600 1999-10-25  Andreas Jaeger  <aj@suse.de>
602         * internals.h: Remove K&R compatibility.
603         * no-tsd.c: Likewise.
604         * semaphore.h: Likewise.
605         * signals.c: Likewise.
606         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
607         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
608         * weaks.c: Likewise.
610 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
612         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
613         and pthread_handle_sigcancel with functions that restore
614         %gs from the signal context.  For each signal handling function,
615         two wrappers are required, one for a non-RT signal and one for
616         a RT signal.
617         * linuxthreads/signal.c: For i386, add code to restore %gs
618         from the signal context in pthread_sighandler and
619         pthread_sighandler_rt.
621 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
623         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
625 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
627         * pthread.c (__pthread_initial_thread): Pass argument to
628         PTHREAD_START_ARGS_INITIALIZER.
629         (__pthread_manager_thread): Likewise.
631         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
632         initialize function.
634         * manager.c (pthread_handle_create): Remove p_startfct initialization.
636         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
638 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
640         * internals.h: Correct return types for __libc_read and __libc_write.
642 1999-10-09  Andreas Jaeger  <aj@suse.de>
644         * internals.h: Add __new_sem_post to get prototype in
645         manager.c; include semaphore.h for needed types.
647 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
649         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
650         directly instead of calling sem_post which should not be necessary
651         but is faster and might help in some case to work around problems.
652         Patch by khendricks@ivey.uwo.ca [libc/1382].
654 1999-10-08  Andreas Schwab  <schwab@suse.de>
656         * sysdeps/pthread/Subdirs: New file.
657         * Implies: Removed.
659 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
661         * Implies: New file.
662         * internals.h (struct _pthread_descr_struct): Add p_startfct.
663         * manager.c (pthread_handle_create): Initialize p_startfct.
664         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
666 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
668         * manager.c (__linuxthreads_pthread_threads_max): New variable.
669         * specific.c (__linuxthreads_pthread_keys_max): New variable.
670         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
672         * condvar.c (pthread_cond_timedwait_relative): Never return with
673         EINTR.  Patch by Andreas Schwab.
675 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
677         * signals.c (sigaction): Correct last patch.  Don't select
678         pthread_sighandler_rt based on the signal number but instead of
679         the SA_SIGINFO flag.
681 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
683         * specific.c: Move definitions of struct pthread_key_struct and
684         destr_function to ...
685         * internals.h: ...here.
687 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
689         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
690         this instead of pthread_handle_sigrestart if the signal is an RT
691         signal.
693         * signals.c: Handle passing through of sighandler arguments also
694         for real-time signals.
696 1999-09-03  Andreas Schwab  <schwab@suse.de>
698         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
699         fork as weak alias.
700         (__vfork): New function, alias vfork.
701         * Versions: Export __fork, vfork, and __vfork in libpthread.
703 1999-08-23  Andreas Schwab  <schwab@suse.de>
705         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
706         call to signal handler.
708 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
710         * pthread.c (__pthread_reset_main_thread): Undo last change.
711         (__pthread_kill_other_threads_np): Reset signal handlers for the
712         signals we used in the thread implementation here.
714 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
716         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
717         for the signals we used in the thread implementation [PR libc/1234].
719         * Versions: Export __pthread_kill_other_threads_np from libpthread
720         for GLIBC_2.1.2.
722         * signals.c: Pass sigcontext through wrapper to the user function.
724 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
726         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
727         __libc_internal_tsd_set.
729 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
731         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
732         needed anymore.
734 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
736         * internals.h: Align _pthread_descr_struct to 32 bytes.
737         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
738         libc/1206.
740 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
742         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
743         swap function.
745 1999-07-09  Cristian Gafton  <gafton@redhat.com>
747         * Makefile (libpthread-routines): Add oldsemaphore routine.
748         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
749         sem_trywait, and sem_wait to GLIBC_2.1.
750         * oldsemaphore.c: New file.
751         * semaphore.c: Add default_symbol_versions for the changed functions.
752         (__new_sem_init): Rename from sem_init.
753         (__new_sem_post): Rename from sem_post.
754         (__new_sem_wait): Rename from sem_wait.
755         (__new_sem_trywait): Rename from sem_trywait.
756         (__new_sem_getvalue): Rename from sem_getvalue.
757         (__new_sem_destroy): Rename from sem_destroy.
759 1999-06-23  Robey Pointer  <robey@netscape.com>
761         * internals.h: Added p_nextlock entry to separate queueing for a
762         lock from queueing for a CV (sometimes a thread queues on a lock
763         to serialize removing itself from a CV queue).
764         * pthread.c: Added p_nextlock to initializers.
765         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
767 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
769         * manager.c (pthread_handle_create): Free mmap region after stack
770         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
772 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
774         * man/pthread_cond_init.man: Correct example.
775         Reported by Tomas Berndtsson <tomas@nocrew.org>.
777         * linuxthreads.texi (Condition Variables): Likewise.
779 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
781         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
782         casx not cas, also successful casx returns the old value in rd
783         and not the new value.
785 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
787         * manager.c: If pthread_create() is given a NULL attribute
788         and the thread manager runs with a realtime policy, set the
789         scheduling policy of the newly created thread back to SCHED_OTHER.
790         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
791         initialize the schedpolicy field of new_thread->p_start_args
792         to that of the calling thread.
794 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
796         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
797         instruction does not allow memory element to use offset.
799 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
801         * manager.c (pthread_allocate_stack): Optimize initialization of new
802         thread descriptor.
804         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
805         Don't use initializer since it is all zeroes.
806         (__libc_once_define): Likewise.
808 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
810         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
811         doesn't exist anymore.
812         * sysdeps/i386/Implies: Likewise.
813         * sysdeps/m68k/Implies: Likewise.
814         * sysdeps/mips/Implies: Likewise.
815         * sysdeps/powerpc/Implies: Likewise.
816         * sysdeps/sparc/sparc32/Implies: Likewise.
817         * sysdeps/sparc/sparc64/Implies: Likewise.
819 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
821         * sysdeps/alpha/bits/semaphore.h: Removed.
822         * sysdeps/powerpc/bits/semaphore.h: Removed.
823         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
824         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
825         * Makefile (headers): Remove bits/semaphore.h.
827         * semaphore.h: Define _pthread_descr if necessary.
828         Don't include limits.h.  Define SEM_VALUE_MAX directly.
829         Define SEM_FAILED.
830         (sem_t): Protect element names with leading __.
831         Add declarations for sem_close, sem_open, and sem_unlink.
832         * semaphore.c: Adjust all functions for new element names.
833         Define sem_close, sem_open, and sem_unlink.
834         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
835         GLIBC_2.1.1.
836         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
837         necessary.
839 1999-03-16  H.J. Lu  <hjl@gnu.org>
841         * specific.c (pthread_key_delete): Check th->p_terminated to see
842         if the thread is running.
844         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
845         Added to GLIBC_2.0 for libc.so.
847 1999-02-12  H.J. Lu  <hjl@gnu.org>
849         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
850         __libc_allocate_rtsig): Added to GLIBC_2.1.
852         * internals.h (DEFAULT_SIG_RESTART): Removed.
853         (DEFAULT_SIG_CANCEL): Removed.
855         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
856         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
857         (__pthread_sig_restart, __pthread_sig_cancel,
858         __pthread_sig_debug): Initialized.
859         (pthread_initialize): Call init_rtsigs () to initialize
860         real-time signals.
862 1999-02-03  H.J. Lu  <hjl@gnu.org>
864         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
865         Don't restart the thread which sent REQ_DEBUG.
866         (pthread_start_thread): Check if __pthread_sig_debug > 0
867         before debugging.
869         * pthread.c (__pthread_initialize_manager): Suspend ourself
870         after sending __pthread_sig_debug to gdb instead of
871         __pthread_sig_cancel.
873 1999-01-24  H.J. Lu  <hjl@gnu.org>
875         * manager.c (__pthread_manager): Delete __pthread_sig_debug
876         from mask if __pthread_sig_debug > 0.
877         (pthread_handle_create): Increment __pthread_handles_num.
879         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
880         * pthread.c (__pthread_initialize_manager): Likewise.
882         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
883         instead of __libc_allocate_rtsig (2).
884         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
885         instead of __pthread_sig_cancel.
886         (pthread_handle_sigdebug): Fix comments.
888 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
890         * manager.c (pthread_allocate_stack): Set
891         __pthread_nonstandard_stacks if user-specified stack is used.
893 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
895         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
896         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
898 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
900         * pthread.c: Use a third signal __pthread_sig_debug distinct
901         from __pthread_sig_cancel to notify gdb when a thread is
902         created
903         * manager.c: Likewise.
904         * internals.h: Likewise.
905         * signals.c: The implementation of sigwait(s) assumed that
906         all signals in s have signal handlers already attached.
907         This is not required by the standard, so make it work
908         also if some of the signals have no handlers.
910 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
912         * linuxthreads.texi: Remove pointers from first @node.  Move old
913         @node spec inside comment.
915 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
917         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
918         _IO_lock_unlock.
920 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
922         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
923         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
925 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
927         * manager.c: Threads now send __pthread_sig_cancel on termination.
928         Change clone call and signal masks.
929         * thread.c (pthread_handle_sigrestart): Remove special code for
930         manager.
931         (pthread_handle_sigcancel): In manager thread call
932         __pthread_manager_sighandler.
933         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
934         * sysdeps/i386/i686/pt-machine.h: Likewise.
935         Patches by Xavier Leroy.
937 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
939         * spinlock.c (__pthread_unlock): Don't crash if called for an
940         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
942         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
943         overall runtime.
945 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
947         * Examples/ex3.c: Wait until all threads are started before
948         searching for the number to avoid race condition on very fast
949         systems.
951 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
953         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
954         declaration since it's not needed.
956         * sysdeps/pthread/pthread.h: Move internal functions to ...
957         * internals.h: ...here.
959 1998-12-02  H.J. Lu  <hjl@gnu.org>
961         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
962         SIGRTMIN is defined.
963         (__pthread_sig_cancel): Likewise.
965 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
967         * wrapsyscall.c: Include <sys/mman.h> for msync,
968         <stdlib.h> for system and <termios.h> for tcdrain prototype.
969         Correct msync declaration.
971 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
973         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
974         __libc_tsd_set): New macros for new interface.
975         * no-tsd.c: New file, provide uninitialized defns of
976         __libc_internal_tsd_get and __libc_internal_tsd_set.
977         * Makefile (routines): Add no-tsd.
979 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
981         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
982         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
983         __libc_internal_tsd_set): Move decls to ...
984         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
985         declarations.
987         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
988         __libc_internal_tsd_set): Make these pointers to functions, not
989         functions; remove #pragma weak decls for them.
990         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
991         Define static functions and initialized pointers to them.
993 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
995         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
996         (CFLAGS-specific.c): Likewise.
997         (CFLAGS-pthread.c): Likewise.
998         (CFLAGS-ptfork.c): Likewise.
999         (CFLAGS-cancel.c): Likewise.
1000         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1001         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1003         * mutex.c (pthread_mutex_init): Define as strong symbol.
1004         (pthread_mutex_destroy): Likewise.
1005         (pthread_mutex_trylock): Likewise.
1006         (pthread_mutex_lock): Likewise.
1007         (pthread_mutex_unlock): Likewise.
1008         (pthread_mutexattr_init): Likewise.
1009         (pthread_mutexattr_destroy): Likewise.
1010         (pthread_once): Likewise.
1011         * ptfork.c (pthread_atfork): Likewise.
1012         * specific.c (pthread_key_create): Likewise.
1013         (pthread_setspecific): Likewise.
1014         (pthread_getspecific): Likewise.
1016 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1018         * linuxthreads.texi: Fix punctuation after xref.
1020 1998-11-10  H.J. Lu  <hjl@gnu.org>
1022         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1023         if it is defined in <linux/limits.h>.
1025 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1027         * spinlock.h (__pthread_trylock): Define inline.
1028         (__pthread_lock): Add extra parameter to declaration.  Declare
1029         using internal_function.
1030         (__pthread_unlock): Declare using internal_function.
1031         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1032         of local variable self.  Avoid recomputing self.  Define using
1033         internal_function.
1034         (__pthread_trylock): Remove.
1035         (__pthread_unlock): Define using internal_function.
1036         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1037         computed self value is possible.
1038         * condvar.c: Likewise.
1039         * join.c: Likewise.
1040         * manager.c: Likewise.
1041         * mutex.c: Likewise.
1042         * pthread.c: Likewise.
1043         * rwlock.c: Likewise.
1044         * semaphore.c: Likewise.
1045         * signals.c: Likewise.
1047 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1049         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1050         __ to field names of the struct.
1051         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1052         Likewise.
1053         (pthread_attr_t): Likewise.
1054         (pthread_cond_t): Likewise.
1055         (pthread_condattr_t): Likewise.
1056         (pthread_mutex_t): Likewise.
1057         (pthread_mutexattr_t): Likewise.
1058         (pthread_rwlock_t): Likewise.
1059         (pthread_rwlockattr_t): Likewise.
1060         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1061         * cancel.c: Likewise.
1062         * condvar.c: Likewise.
1063         * manager.c: Likewise.
1064         * mutex.c: Likewise.
1065         * pthread.c: Likewise.
1066         * ptlongjmp.c: Likewise.
1067         * rwlock.c: Likewise.
1068         * spinlock.c: Likewise.
1070 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1072         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1073         also with PT_EI.
1075         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1076         definitions.
1078         * Makefile (libpthread-routines): Add pt-machine.
1079         * pt-machine.c: New file.
1080         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1081         yet defined.  Use PT_EI in extern inline definitions.
1082         * sysdeps/arm/pt-machine.h: Likewise.
1083         * sysdeps/i386/pt-machine.h: Likewise.
1084         * sysdeps/i386/i686/pt-machine.h: Likewise.
1085         * sysdeps/m68k/pt-machine.h: Likewise.
1086         * sysdeps/mips/pt-machine.h: Likewise.
1087         * sysdeps/powerpc/pt-machine.h: Likewise.
1088         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1089         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1091 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1093         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1094         is declared.
1096 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1098         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1099         argument.
1100         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1102 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1104         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1105         multiple inclusion guard.
1107 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1109         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1110         array index overflow.
1112 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1114         * sysdeps/pthread/semaphore.h: New file.
1116 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1118         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1119         _LIBC_TSD_KEY_DL_ERROR.
1121 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1123         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1124         * sysdeps/i386/pt-machine.h: Likewise.
1125         Suggested by Roland McGrath.
1127 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1129         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1130         access thread data with non-constant offsets.
1131         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1132         necessary.
1134         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1135         THREAD_SETMEM_NC definitions.
1137         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1138         THREAD_SETMEM_NC.
1139         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1141 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1143         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1144         not already defined.
1145         (struct _pthread_descr_struct): Add p_self and p_nr field.
1146         * manager.c (__pthread_handles): Define second element to point
1147         to manager thread.
1148         (__pthread_handles_num): Initialize to 2.
1149         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1150         (pthread_start_thread): Likewise.
1151         (pthread_handle_create): Start search for free slot at entry 2.
1152         Initialize new fields p_self and p_nr.
1153         Call __clone with CLONE_PTRACE if available.
1154         (pthread_free): Call FREE_THREAD_SELF if available.
1155         * pthread.c (__pthread_initial_thread): Initialize new fields.
1156         (__pthread_manager_thread): Likewise.
1157         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1159         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1160         elements of the thread descriptor.
1161         * condvar.c: Likewise.
1162         * errno.c: Likewise.
1163         * join.c: Likewise.
1164         * manager.c: Likewise.
1165         * pthread.c: Likewise.
1166         * ptlongjmp.c: Likewise.
1167         * semaphore.c: Likewise.
1168         * signals.c: Likewise.
1169         * specific.c: Likewise.
1170         * spinlock.c: Likewise.
1172         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1174         * sysdeps/i386/useldt.h: New file.
1175         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1177         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1178         THREAD_SETMEM using __thread_self.
1179         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1181 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1183         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1184         turned out that we didn't need to queue after all.
1186 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1188         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1189         and wastes space; correct types.
1191 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1193         * signals.c (sigaction): Handle NULL argument.
1195 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1197         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1198         of sigset_t.
1200 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1202         * Makefile (linuxthreads-version): Extract correct number from
1203         Banner.
1205 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1207         * Banner: Bump version number to 0.8
1208         * FAQ.html: Many updates, in particular w.r.t. debugging.
1209         * manager.c: Support for non-default stacksize for
1210         LinuxThreads-allocated stacks;
1211         don't use guard pages for stacks with default size, rely on
1212         rlimit(RLIMIT_STACK) instead (it's cheaper).
1213         * attr.c: Likewise.
1214         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1215         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1216         * condvar.c: Likewise.
1217         * internals.h: Likewise.
1218         * restart.h: Likewise.
1219         * signals.c: Likewise.
1220         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1222 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1224         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1225         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1226         * Versions: Put __pthread_mutexattr_settype under version
1227         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1228         __pthread_mutexattr_gettype.
1230 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1232         * sysdeps/pthread/bits/libc-lock.h: Make
1233         __pthread_mutexattr_settype weak.  Don't make
1234         __pthread_mutexattr_setkind_np weak.
1236 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1238         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1239         call can succeed here.
1241         * mutex.c: Define __pthread_mutexattr_settype and make
1242         __pthread_mutexattr_setkind_np an alias.
1243         Likewise for __pthread_mutexattr_gettype.
1245 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1247         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1248         is root.
1250 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1252         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1254 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1256         * Examples/ex6.c: Include <unistd.h> for usleep.
1258 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1260         * Examples/ex4.c (main): Use exit, not pthread_exit.
1262 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1264         * Versions: Add __pthread_mutexattr_gettype and
1265         __pthread_mutexattr_settype.
1266         * lockfile.c: Use __pthread_mutexattr_settype instead of
1267         __pthread_mutexattr_setkind_np.
1268         * mutex.c: Define __pthread_mutexattr_gettype and
1269         __pthread_mutexattr_settype.
1270         * weak.c: Likewise.
1271         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1272         __pthread_mutexattr_settype.
1273         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1274         Use __pthread_mutexattr_settype.
1276 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1278         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1279         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1280         pthread_mutexattr_settype.
1281         * sysdeps/pthread/pthread.h: Declare these functions.
1282         Move pthread_sigmask and pthread_kill declaration in separate header.
1283         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1285 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1287         * Makefile: Add rules to compile and run tests.
1288         * Examples/ex1.c: Little changes to fix warnings.
1289         * Examples/ex2.c: Likewise.
1290         * Examples/ex3.c: Likewise.
1291         * Examples/ex4.c: Likewise.
1292         * Examples/ex5.c: Likewise.
1293         * Examples/ex6.c: New file.
1295 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1297         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1299 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1301         * attr.c: Include <string.h>.
1303 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1305         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1306         * internals.h: Include limits.h.
1307         * manager.c: Use memcpy to copy sched_param.
1308         * ptfork.c: Include errno.h.
1309         * pthread.c: Likewise.
1310         * semaphore.c: Likewise.
1311         * specific.c: Likewise.
1312         * spinlock.h: Likewise.
1313         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1314         type definition to ...
1315         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1317 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1319         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1321         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1322         as macros as demanded in POSIX.1, Annex C.
1324 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1326         * internals.h (struct pthread_request): For free use pthread_t
1327         instead of pthread_descr.
1328         * join.c (pthread_join): Pass thread_id, not th to manager.
1329         (pthread_detach): Likewise.
1330         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1331         (pthread_exited): Remove detached queue code.
1332         (pthread_handle_free): Expect thread ID parameter and use it to
1333         validate the thread decsriptor.  Don't use detached queue.
1334         Patches by Xavier Leroy.
1336 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1338         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1339         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1340         __pthread_atfork, __pthread_key_create, __pthread_once.
1341         * internals.h: Doc fix.
1342         * pthread.c (__pthread_initialize): Define again.
1344 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1346         * manager.c (pthread_exited): If thread is not detached put it on
1347         special list.
1348         (pthread_handle_free): If thread is not on list with living threads
1349         search on list with detached threads.
1351         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1352         for new definition of pthread_rwlock_t.
1354         * spinlock.c: Correct test whether to compile
1355         __pthread_compare_and_swap or not.
1357 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1359         * attr.c: Finish user stack support.  Change locking code to be safe
1360         in situations with different priorities.
1361         * cancel.c: Likewise.
1362         * condvar.c: Likewise.
1363         * internals.h: Likewise.
1364         * join.c: Likewise.
1365         * manager.c: Likewise.
1366         * mutex.c: Likewise.
1367         * pthread.c: Likewise.
1368         * ptlongjmp.c: Likewise.
1369         * queue.h: Likewise.
1370         * rwlock.c: Likewise.
1371         * semaphore.c: Likewise.
1372         * semaphore.h: Likewise.
1373         * signals.c: Likewise.
1374         * spinlock.c: Likewise.
1375         * spinlock.h: Likewise.
1376         * sysdeps/pthread/pthread.h: Likewise.
1377         Patches by Xavier Leroy.
1379         * sysdeps/i386/i686/pt-machine.h: New file.
1381 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1383         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1384         [sg]et_stackaddr prototypes always available.
1386         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1387         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1389 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1391         * manager.c (pthread_free): Undo patch from 980430.
1392         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1394 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1396         * manager.c: Define __pthread_manager_adjust_prio and use it to
1397         increase priority when needed.
1398         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1399         * mutex.c: Optimize mutexes to wake up only one thread.
1400         * pthread.c: Move PID of manager for global variable in structure
1401         element.
1402         Patches by Xavier Leroy.
1404 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1406         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1408 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1410         * attr.c: Correct typo.
1412 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1414         * manager.c (pthread_free): Unmap guard before the stack.
1415         Patch by Matthias Urlichs.
1417 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1419         * manager.c (pthread_free): Detect already free child.
1420         Patch by Xavier Leroy, reported by Matthias Urlichs.
1422 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1424         * Makefile (linuxthreads-version): Renamed back from
1425         libpthread-version.
1427 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
1429         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1430         __libc_longjmp.
1432 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
1434         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1435         * internals.h: Add definitions for new spinlock implementation.
1436         * ptlongjmp.c: New file.
1437         * spinlock.c: New file.
1438         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1439         new function __pthread_acquire to prevent deadlocks with thread
1440         with different priorities.
1441         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1443 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1445         * manager.c (__pthread_manager): Reduce first argument to select
1446         to include just the needed file descriptor.
1448 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
1450         * manager.c: Fix last patch which caused core dumps.
1452         * pthread.c: Correctly handle missing SIGRTMIN.
1454 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1456         * libpthread.map: Add __libc_internal_tsd_get and
1457         __libc_internal_tsd_set.  Add missing cancelable functions. Export
1458         libc internal versions of the cancelable functions.
1460 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
1462         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1464 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
1466         * attr.c: Implement pthread_attr_[gs]etguardsize,
1467         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1468         Change pthread_attr_init to have two interfaces.
1469         * internals.h (struct _pthread_descr_struct): Add new fields for
1470         above functions.
1471         * libpthread.map: Add names in GLIBC_2.1 section.
1472         * manager.c (pthread_handle_create): Implement guardsize and
1473         user stack.
1474         (pthread_free): Likewise.
1475         * pthread.c (pthread_create): Add new interface for changed
1476         pthread_attr_t.
1477         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1478         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1479         PTHREAD_STACK_MIN.
1481 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
1483         * manager.c: Enable resetting of the thread scheduling policy
1484         to SCHED_OTHER when the parent thread has a different one.
1486 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
1488         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1489         _POSIX_ASYNCHRONOUS_IO.
1491         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1492         mutexes.
1493         * mutex.c: Implement new mutex types.
1495         * internals.h: Include <signal.h>.
1497         * libpthread.map: Add __erno_location and __h_errno_location.
1499         * errno.c: Return pointer to variable actually in use.  This might
1500         not be the one in the thread structure.
1501         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1502         and p_h_errnop.
1503         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1504         of manager thread structure.
1505         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1506         thread.
1507         * pthread.c: Adapt initializer for thread structures.
1508         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1509         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1510         current thread to global variables.
1512 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1514         * rwlock.c: New file.
1515         * Makefile (libpthread-routines): Add rwlock.
1516         * sysdeps/pthread/pthread.h: Define data structures and declare
1517         functions.
1518         * libpthread.map: Add new functions.
1520 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1522         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1523         * sysdeps/arm/Implies: likewise.
1524         * README: Document it.
1526 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1528         * signals.c: Remove unneeded initializer for sigwaited, saving a
1529         warning.
1531 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1533         * semaphore.c (sem_init): Set sem_spinlock only if available.
1535 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1537         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1538         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1540         * Makefile: Update from LinuxThreads 0.7.
1541         * internals.h. Likewise.
1542         * manager.c: Likewise.
1543         * mutex.c: Likewise.
1544         * pthread.c: Likewise.
1545         * signals.c: Likewise.
1546         * specific.c: Likewise.
1547         * Examples/ex3.c: Likewise.
1549 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1551         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1552         open.
1554 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1556         * wrapsyscall.c: Add socket functions which are also cancelation
1557         points.
1559 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1561         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1562         New functions for fast thread specific data within libc.
1564         * internals.h: Add new array p_libc_specific to struct
1565         _pthread_descr_struct.
1567         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1569 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1571         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1572         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1574 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1576         * internals.h (struct _pthread_descr_struct): Add definitions for
1577         two-level specific key handling.
1578         * manager.c (pthread_handle_create): Initialize specific memory array.
1579         * specific.c: Implement two-level key handling.
1580         * weaks.c: Don't provide dummy key handling.
1581         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1582         Add definition of __libc_key_t.
1583         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1584         as 1024.
1585         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1586         PTHREAD_DESTRUCTOR_ITERATIONS.
1588         * manager.c (pthread_handle_create): Compare mmap result with
1589         MAP_FAILED.
1591         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1592         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1594 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1596         sysdeps/sparc -> sysdeps/sparc/sparc32
1597         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1599         * internals.h: Change definition of THREAD_SELF to be an expression,
1600         not a statement that did a return.
1601         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1602         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1603         Follow Solaris and use a "system reserved" register (%g6) to hold
1604         the thread descriptor.
1605         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1607 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1609         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1610         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1611         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1613         * semaphore.c: Include spinlock.h only when needed.
1615         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1616         keys for entries not in use.
1618         * weaks.c: Implement key handling functions for real.
1620 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1622         Initial sparc64-linux support:
1623         * linuxthreads/sysdeps/sparc64/Implies: New file.
1624         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1626 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1628         * semaphore.c: Include spinlock.h at correct place.
1629         Patch by HJ Lu.
1631 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1633         The Great Bit File Move:
1634         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1635         * sysdeps/powerpc/semaphorebits.h: Likewise.
1636         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1637         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1638         * sysdeps/pthread/libc-lock.h: -> bits/
1639         * sysdeps/pthread/stdio-lock.h: Likewise.
1640         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1641         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1642         * semaphore.h: Likewise.
1643         * sysdeps/pthread/pthread.h: Likewise.
1645         * lockfile.c: <foo.h> -> <bits/foo.h>.
1646         * semaphore.h: Likewise.
1648         * Makefile: (headers): foo.h -> bits/foo.h.
1649         * sysdeps/pthread/Makefile: Likewise.
1651 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1653         * semaphore.c (sem_init): Set sem_spinlock only if available.
1655         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1656         asm constraints.
1658 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1660         Update from LinuxThreads 0.6.
1662         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1663         and __sched_get_priority_min instead of names without `__'.
1665         * manager.c: Rewrite large parts to implement opaque pthread_t.
1667         * cancel.c: Adapt for opaque pthread_t type.
1668         * condvar.c: Likewise.
1669         * errno.c: Likewise.
1670         * join.c: Likewise.
1671         * mutex.c: Likewise.
1672         * pthread.c: Likewise.
1673         * signals.c: Likewise.
1674         * specific.c: Likewise.
1675         * restart.h: Likewise.
1676         * queue.h: Likewise.
1677         * Examples/ex3.c: Likewise.
1678         * Examples/ex4.c: Likewise.
1679         * sysdeps/pthread/pthread.h: Likewise.
1681         * pthread.c: Accumulate time for all threads in thread manager.
1683         * semaphore.c: Implement fallback implementation for architectures
1684         sometimes missing compare-exchange operations.
1686         * cancel.c (pthread_cancel): Validate handle argument.
1687         * join.c (pthread_join): Likewise.
1688         (pthread_detach): Likewise.
1689         * signals.c (pthread_kill): Likewise.
1691         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1693         * queue.h (enqueue): Enqueue thread according to priority.
1695         * internals.c (struct pthread_start_args): New struct for passing
1696         args to cloning function.
1697         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1698         opaque pthread_t.
1700         * Examples/Makefile (clean): Pass -f option to rm.
1702         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1703         and define TEST_FOR_COMPARE_AND_SWAP.
1704         * sysdeps/i386/i486/pt-machine.h: Removed.
1706         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1707         to 1024.
1709 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1711         * restart.h (suspend): Clear p_signal before suspending.
1712         (suspend_with_cancellation): Likewise.
1713         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1715         * weaks.c: Make __pthread_key_create return 1.
1716         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1717         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1718         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1719         using libio.
1721 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1723         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1725 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1727         * sysdeps/powerpc/Implies: Added.
1728         * sysdeps/powerpc/pt-machine.h: Added.
1729         * sysdeps/powerpc/semaphorebits.h: Added.
1731 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1733         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1734         initializer.
1735         (__pthread_manager_thread): Likewise.
1736         Reported by Andreas Jaeger.
1738 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1740         Since sigset_t no longer fits in a register, we can't pass in the
1741         thread's initial mask so easily.  Take this opportunity to simplify
1742         the clone implementation by only accepting a single void* argument.
1744         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1745         in the thread struct instead of as arguments through clone.
1746         (pthread_start_thread): Look for them there.
1747         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1748         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1749         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1750         clone invocation.