Update.
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
2
3         * manager.c (pthread_handle_create): Set p_pid of new thread
4         before calling the callback function to report a new thread.
5
6 1999-12-20  Andreas Jaeger  <aj@suse.de>
7
8         * pthread.c (pthread_initialize): Move getrlimit call after
9         setting of errno.
10
11 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
12
13         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
14         pwrite64, lseek64, open64, and __open64.
15         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
16         pwrite64, lseek64, open64, and __open64.
17
18         * manager.c (pthread_allocate_stack): Correct computation of
19         new_thread_bottom.  Correct handling of stack size and when the
20         rlimit method to guard for stack growth is used.
21         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
22         minus one pagesize (not two).
23
24 1999-12-03  Andreas Jaeger  <aj@suse.de>
25
26         * Versions: Add __res_state with version GLIBC_2.2.
27
28         * errno.c (__res_state): New function to return thread specific
29         resolver state.
30
31         * pthread.c (pthread_initialize): Initialize p_resp.
32         (__pthread_reset_main_thread): Also set p_resp.
33
34         * manager.c (pthread_handle_create): Initialize p_resp.
35
36         * internals.h: Add thread specific resolver state.
37         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
38
39 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
40
41         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
42         beginning.
43         * sysdeps/i386/i686/pt-machine.h: Likewise.
44         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
45
46 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
47
48         * manager.c (pthread_start_thread_event): Initialize p_pid already
49         here.
50
51 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
52
53         * internals.h: Add prototype for __pthread_manager_event.
54         * manager.c (__pthread_manager_event): New function.
55         (pthread_start_thread_event): Correct computation of self.
56         Use INIT_THREAD_SELF.
57         * pthread.c (__pthread_manager_thread): Initialize p_lock.
58         (__pthread_initialize_manager): Respect event flags also for creation
59         of the manager thread.
60
61 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
62
63         * pthread.c (__pthread_initialize_manager): Initialize
64         __pthread_manager_thread.p_tid.
65
66 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
67
68         * internals.h: Declare __pthread_last_event.
69         * manager.c: Define __pthread_last_event.
70         (pthread_handle_create): Set __pthread_last_event.
71         (pthread_exited): Likewise.
72         * join.c (pthread_exit): Likewise.
73
74         * Makefile (libpthread-routines): Add events.
75         * events.c: New file.
76         * internals.h: Protect against multiple inclusion.
77         Include thread_dbP.h header.
78         (struct _pthread_descr_struct): Add new fields p_report_events and
79         p_eventbuf.
80         Declare event reporting functions.
81         * join.c (pthread_exit): Signal event if this is wanted.
82         * manager.c (__pthread_threads_events): New variable.
83         (pthread_handle_create): Take new parameters with event information.
84         Signal TD_CREATE event if wanted.
85         (__pthread_manager): Adjust pthread_handle_create call.
86         (pthread_start_thread_event): New function.  Block until manager is
87         finished and then call pthread_start_thread.
88         (pthread_exited): Signal TD_REAP event if wanted.
89
90 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
91
92         * restart.h (suspend_with_cancellation): Rewrite as a macro.
93
94         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
95
96 1999-10-25  Andreas Jaeger  <aj@suse.de>
97
98         * internals.h: Remove K&R compatibility.
99         * no-tsd.c: Likewise.
100         * semaphore.h: Likewise.
101         * signals.c: Likewise.
102         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
103         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
104         * weaks.c: Likewise.
105
106 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
107
108         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
109         and pthread_handle_sigcancel with functions that restore
110         %gs from the signal context.  For each signal handling function,
111         two wrappers are required, one for a non-RT signal and one for
112         a RT signal.
113         * linuxthreads/signal.c: For i386, add code to restore %gs
114         from the signal context in pthread_sighandler and
115         pthread_sighandler_rt.
116
117 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
118
119         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
120
121 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
122
123         * pthread.c (__pthread_initial_thread): Pass argument to
124         PTHREAD_START_ARGS_INITIALIZER.
125         (__pthread_manager_thread): Likewise.
126
127         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
128         initialize function.
129
130         * manager.c (pthread_handle_create): Remove p_startfct initialization.
131
132         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
133
134 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
135
136         * internals.h: Correct return types for __libc_read and __libc_write.
137
138 1999-10-09  Andreas Jaeger  <aj@suse.de>
139
140         * internals.h: Add __new_sem_post to get prototype in
141         manager.c; include semaphore.h for needed types.
142
143 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
144
145         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
146         directly instead of calling sem_post which should not be necessary
147         but is faster and might help in some case to work around problems.
148         Patch by khendricks@ivey.uwo.ca [libc/1382].
149
150 1999-10-08  Andreas Schwab  <schwab@suse.de>
151
152         * sysdeps/pthread/Subdirs: New file.
153         * Implies: Removed.
154
155 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
156
157         * Implies: New file.
158         * internals.h (struct _pthread_descr_struct): Add p_startfct.
159         * manager.c (pthread_handle_create): Initialize p_startfct.
160         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
161
162 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
163
164         * manager.c (__linuxthreads_pthread_threads_max): New variable.
165         * specific.c (__linuxthreads_pthread_keys_max): New variable.
166         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
167
168         * condvar.c (pthread_cond_timedwait_relative): Never return with
169         EINTR.  Patch by Andreas Schwab.
170
171 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
172
173         * signals.c (sigaction): Correct last patch.  Don't select
174         pthread_sighandler_rt based on the signal number but instead of
175         the SA_SIGINFO flag.
176
177 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
178
179         * specific.c: Move definitions of struct pthread_key_struct and
180         destr_function to ...
181         * internals.h: ...here.
182
183 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
184
185         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
186         this instead of pthread_handle_sigrestart if the signal is an RT
187         signal.
188
189         * signals.c: Handle passing through of sighandler arguments also
190         for real-time signals.
191
192 1999-09-03  Andreas Schwab  <schwab@suse.de>
193
194         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
195         fork as weak alias.
196         (__vfork): New function, alias vfork.
197         * Versions: Export __fork, vfork, and __vfork in libpthread.
198
199 1999-08-23  Andreas Schwab  <schwab@suse.de>
200
201         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
202         call to signal handler.
203
204 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
205
206         * pthread.c (__pthread_reset_main_thread): Undo last change.
207         (__pthread_kill_other_threads_np): Reset signal handlers for the
208         signals we used in the thread implementation here.
209
210 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
211
212         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
213         for the signals we used in the thread implementation [PR libc/1234].
214
215         * Versions: Export __pthread_kill_other_threads_np from libpthread
216         for GLIBC_2.1.2.
217
218         * signals.c: Pass sigcontext through wrapper to the user function.
219
220 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
221
222         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
223         __libc_internal_tsd_set.
224
225 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
226
227         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
228         needed anymore.
229
230 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
231
232         * internals.h: Align _pthread_descr_struct to 32 bytes.
233         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
234         libc/1206.
235
236 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
237
238         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
239         swap function.
240
241 1999-07-09  Cristian Gafton  <gafton@redhat.com>
242
243         * Makefile (libpthread-routines): Add oldsemaphore routine.
244         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
245         sem_trywait, and sem_wait to GLIBC_2.1.
246         * oldsemaphore.c: New file.
247         * semaphore.c: Add default_symbol_versions for the changed functions.
248         (__new_sem_init): Rename from sem_init.
249         (__new_sem_post): Rename from sem_post.
250         (__new_sem_wait): Rename from sem_wait.
251         (__new_sem_trywait): Rename from sem_trywait.
252         (__new_sem_getvalue): Rename from sem_getvalue.
253         (__new_sem_destroy): Rename from sem_destroy.
254
255 1999-06-23  Robey Pointer  <robey@netscape.com>
256
257         * internals.h: Added p_nextlock entry to separate queueing for a
258         lock from queueing for a CV (sometimes a thread queues on a lock
259         to serialize removing itself from a CV queue).
260         * pthread.c: Added p_nextlock to initializers.
261         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
262
263 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
264
265         * manager.c (pthread_handle_create): Free mmap region after stack
266         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
267
268 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
269
270         * man/pthread_cond_init.man: Correct example.
271         Reported by Tomas Berndtsson <tomas@nocrew.org>.
272
273         * linuxthreads.texi (Condition Variables): Likewise.
274
275 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
276
277         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
278         casx not cas, also successful casx returns the old value in rd
279         and not the new value.
280
281 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
282
283         * manager.c: If pthread_create() is given a NULL attribute
284         and the thread manager runs with a realtime policy, set the
285         scheduling policy of the newly created thread back to SCHED_OTHER.
286         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
287         initialize the schedpolicy field of new_thread->p_start_args
288         to that of the calling thread.
289
290 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
291
292         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
293         instruction does not allow memory element to use offset.
294
295 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
296
297         * manager.c (pthread_allocate_stack): Optimize initialization of new
298         thread descriptor.
299
300         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
301         Don't use initializer since it is all zeroes.
302         (__libc_once_define): Likewise.
303
304 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
305
306         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
307         doesn't exist anymore.
308         * sysdeps/i386/Implies: Likewise.
309         * sysdeps/m68k/Implies: Likewise.
310         * sysdeps/mips/Implies: Likewise.
311         * sysdeps/powerpc/Implies: Likewise.
312         * sysdeps/sparc/sparc32/Implies: Likewise.
313         * sysdeps/sparc/sparc64/Implies: Likewise.
314
315 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
316
317         * sysdeps/alpha/bits/semaphore.h: Removed.
318         * sysdeps/powerpc/bits/semaphore.h: Removed.
319         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
320         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
321         * Makefile (headers): Remove bits/semaphore.h.
322
323         * semaphore.h: Define _pthread_descr if necessary.
324         Don't include limits.h.  Define SEM_VALUE_MAX directly.
325         Define SEM_FAILED.
326         (sem_t): Protect element names with leading __.
327         Add declarations for sem_close, sem_open, and sem_unlink.
328         * semaphore.c: Adjust all functions for new element names.
329         Define sem_close, sem_open, and sem_unlink.
330         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
331         GLIBC_2.1.1.
332         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
333         necessary.
334
335 1999-03-16  H.J. Lu  <hjl@gnu.org>
336
337         * specific.c (pthread_key_delete): Check th->p_terminated to see
338         if the thread is running.
339
340         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
341         Added to GLIBC_2.0 for libc.so.
342
343 1999-02-12  H.J. Lu  <hjl@gnu.org>
344
345         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
346         __libc_allocate_rtsig): Added to GLIBC_2.1.
347
348         * internals.h (DEFAULT_SIG_RESTART): Removed.
349         (DEFAULT_SIG_CANCEL): Removed.
350
351         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
352         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
353         (__pthread_sig_restart, __pthread_sig_cancel,
354         __pthread_sig_debug): Initialized.
355         (pthread_initialize): Call init_rtsigs () to initialize
356         real-time signals.
357
358 1999-02-03  H.J. Lu  <hjl@gnu.org>
359
360         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
361         Don't restart the thread which sent REQ_DEBUG.
362         (pthread_start_thread): Check if __pthread_sig_debug > 0
363         before debugging.
364
365         * pthread.c (__pthread_initialize_manager): Suspend ourself
366         after sending __pthread_sig_debug to gdb instead of
367         __pthread_sig_cancel.
368
369 1999-01-24  H.J. Lu  <hjl@gnu.org>
370
371         * manager.c (__pthread_manager): Delete __pthread_sig_debug
372         from mask if __pthread_sig_debug > 0.
373         (pthread_handle_create): Increment __pthread_handles_num.
374
375         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
376         * pthread.c (__pthread_initialize_manager): Likewise.
377
378         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
379         instead of __libc_allocate_rtsig (2).
380         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
381         instead of __pthread_sig_cancel.
382         (pthread_handle_sigdebug): Fix comments.
383
384 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
385
386         * manager.c (pthread_allocate_stack): Set
387         __pthread_nonstandard_stacks if user-specified stack is used.
388
389 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
390
391         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
392         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
393
394 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
395
396         * pthread.c: Use a third signal __pthread_sig_debug distinct
397         from __pthread_sig_cancel to notify gdb when a thread is
398         created
399         * manager.c: Likewise.
400         * internals.h: Likewise.
401         * signals.c: The implementation of sigwait(s) assumed that
402         all signals in s have signal handlers already attached.
403         This is not required by the standard, so make it work
404         also if some of the signals have no handlers.
405
406 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
407
408         * linuxthreads.texi: Remove pointers from first @node.  Move old
409         @node spec inside comment.
410
411 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
412
413         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
414         _IO_lock_unlock.
415
416 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
417
418         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
419         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
420
421 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
422
423         * manager.c: Threads now send __pthread_sig_cancel on termination.
424         Change clone call and signal masks.
425         * thread.c (pthread_handle_sigrestart): Remove special code for
426         manager.
427         (pthread_handle_sigcancel): In manager thread call
428         __pthread_manager_sighandler.
429         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
430         * sysdeps/i386/i686/pt-machine.h: Likewise.
431         Patches by Xavier Leroy.
432
433 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
434
435         * spinlock.c (__pthread_unlock): Don't crash if called for an
436         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
437
438         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
439         overall runtime.
440
441 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
442
443         * Examples/ex3.c: Wait until all threads are started before
444         searching for the number to avoid race condition on very fast
445         systems.
446
447 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
448
449         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
450         declaration since it's not needed.
451
452         * sysdeps/pthread/pthread.h: Move internal functions to ...
453         * internals.h: ...here.
454
455 1998-12-02  H.J. Lu  <hjl@gnu.org>
456
457         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
458         SIGRTMIN is defined.
459         (__pthread_sig_cancel): Likewise.
460
461 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
462
463         * wrapsyscall.c: Include <sys/mman.h> for msync,
464         <stdlib.h> for system and <termios.h> for tcdrain prototype.
465         Correct msync declaration.
466
467 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
468
469         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
470         __libc_tsd_set): New macros for new interface.
471         * no-tsd.c: New file, provide uninitialized defns of
472         __libc_internal_tsd_get and __libc_internal_tsd_set.
473         * Makefile (routines): Add no-tsd.
474
475 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
476
477         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
478         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
479         __libc_internal_tsd_set): Move decls to ...
480         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
481         declarations.
482
483         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
484         __libc_internal_tsd_set): Make these pointers to functions, not
485         functions; remove #pragma weak decls for them.
486         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
487         Define static functions and initialized pointers to them.
488
489 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
490
491         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
492         (CFLAGS-specific.c): Likewise.
493         (CFLAGS-pthread.c): Likewise.
494         (CFLAGS-ptfork.c): Likewise.
495         (CFLAGS-cancel.c): Likewise.
496         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
497         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
498
499         * mutex.c (pthread_mutex_init): Define as strong symbol.
500         (pthread_mutex_destroy): Likewise.
501         (pthread_mutex_trylock): Likewise.
502         (pthread_mutex_lock): Likewise.
503         (pthread_mutex_unlock): Likewise.
504         (pthread_mutexattr_init): Likewise.
505         (pthread_mutexattr_destroy): Likewise.
506         (pthread_once): Likewise.
507         * ptfork.c (pthread_atfork): Likewise.
508         * specific.c (pthread_key_create): Likewise.
509         (pthread_setspecific): Likewise.
510         (pthread_getspecific): Likewise.
511
512 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
513
514         * linuxthreads.texi: Fix punctuation after xref.
515
516 1998-11-10  H.J. Lu  <hjl@gnu.org>
517
518         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
519         if it is defined in <linux/limits.h>.
520
521 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
522
523         * spinlock.h (__pthread_trylock): Define inline.
524         (__pthread_lock): Add extra parameter to declaration.  Declare
525         using internal_function.
526         (__pthread_unlock): Declare using internal_function.
527         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
528         of local variable self.  Avoid recomputing self.  Define using
529         internal_function.
530         (__pthread_trylock): Remove.
531         (__pthread_unlock): Define using internal_function.
532         * cancel.c: Adjust for __pthread_lock interface change.  Use already
533         computed self value is possible.
534         * condvar.c: Likewise.
535         * join.c: Likewise.
536         * manager.c: Likewise.
537         * mutex.c: Likewise.
538         * pthread.c: Likewise.
539         * rwlock.c: Likewise.
540         * semaphore.c: Likewise.
541         * signals.c: Likewise.
542
543 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
544
545         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
546         __ to field names of the struct.
547         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
548         Likewise.
549         (pthread_attr_t): Likewise.
550         (pthread_cond_t): Likewise.
551         (pthread_condattr_t): Likewise.
552         (pthread_mutex_t): Likewise.
553         (pthread_mutexattr_t): Likewise.
554         (pthread_rwlock_t): Likewise.
555         (pthread_rwlockattr_t): Likewise.
556         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
557         * cancel.c: Likewise.
558         * condvar.c: Likewise.
559         * manager.c: Likewise.
560         * mutex.c: Likewise.
561         * pthread.c: Likewise.
562         * ptlongjmp.c: Likewise.
563         * rwlock.c: Likewise.
564         * spinlock.c: Likewise.
565
566 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
567
568         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
569         also with PT_EI.
570
571         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
572         definitions.
573
574         * Makefile (libpthread-routines): Add pt-machine.
575         * pt-machine.c: New file.
576         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
577         yet defined.  Use PT_EI in extern inline definitions.
578         * sysdeps/arm/pt-machine.h: Likewise.
579         * sysdeps/i386/pt-machine.h: Likewise.
580         * sysdeps/i386/i686/pt-machine.h: Likewise.
581         * sysdeps/m68k/pt-machine.h: Likewise.
582         * sysdeps/mips/pt-machine.h: Likewise.
583         * sysdeps/powerpc/pt-machine.h: Likewise.
584         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
585         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
586
587 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
588
589         * semaphore.h: Include <sys/types.h> so that _pthread_descr
590         is declared.
591
592 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
593
594         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
595         argument.
596         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
597
598 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
599
600         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
601         multiple inclusion guard.
602
603 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
604
605         * signals.c (sigaction): Check that sig is less than NSIG to avoid
606         array index overflow.
607
608 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
609
610         * sysdeps/pthread/semaphore.h: New file.
611
612 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
613
614         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
615         _LIBC_TSD_KEY_DL_ERROR.
616
617 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
618
619         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
620         * sysdeps/i386/pt-machine.h: Likewise.
621         Suggested by Roland McGrath.
622
623 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
624
625         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
626         access thread data with non-constant offsets.
627         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
628         necessary.
629
630         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
631         THREAD_SETMEM_NC definitions.
632
633         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
634         THREAD_SETMEM_NC.
635         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
636
637 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
638
639         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
640         not already defined.
641         (struct _pthread_descr_struct): Add p_self and p_nr field.
642         * manager.c (__pthread_handles): Define second element to point
643         to manager thread.
644         (__pthread_handles_num): Initialize to 2.
645         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
646         (pthread_start_thread): Likewise.
647         (pthread_handle_create): Start search for free slot at entry 2.
648         Initialize new fields p_self and p_nr.
649         Call __clone with CLONE_PTRACE if available.
650         (pthread_free): Call FREE_THREAD_SELF if available.
651         * pthread.c (__pthread_initial_thread): Initialize new fields.
652         (__pthread_manager_thread): Likewise.
653         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
654
655         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
656         elements of the thread descriptor.
657         * condvar.c: Likewise.
658         * errno.c: Likewise.
659         * join.c: Likewise.
660         * manager.c: Likewise.
661         * pthread.c: Likewise.
662         * ptlongjmp.c: Likewise.
663         * semaphore.c: Likewise.
664         * signals.c: Likewise.
665         * specific.c: Likewise.
666         * spinlock.c: Likewise.
667
668         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
669
670         * sysdeps/i386/useldt.h: New file.
671         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
672
673         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
674         THREAD_SETMEM using __thread_self.
675         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
676
677 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
678
679         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
680         turned out that we didn't need to queue after all.
681
682 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
683
684         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
685         and wastes space; correct types.
686
687 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
688
689         * signals.c (sigaction): Handle NULL argument.
690
691 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
692
693         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
694         of sigset_t.
695
696 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
697
698         * Makefile (linuxthreads-version): Extract correct number from
699         Banner.
700
701 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
702
703         * Banner: Bump version number to 0.8
704         * FAQ.html: Many updates, in particular w.r.t. debugging.
705         * manager.c: Support for non-default stacksize for
706         LinuxThreads-allocated stacks;
707         don't use guard pages for stacks with default size, rely on
708         rlimit(RLIMIT_STACK) instead (it's cheaper).
709         * attr.c: Likewise.
710         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
711         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
712         * condvar.c: Likewise.
713         * internals.h: Likewise.
714         * restart.h: Likewise.
715         * signals.c: Likewise.
716         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
717
718 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
719
720         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
721         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
722         * Versions: Put __pthread_mutexattr_settype under version
723         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
724         __pthread_mutexattr_gettype.
725
726 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
727
728         * sysdeps/pthread/bits/libc-lock.h: Make
729         __pthread_mutexattr_settype weak.  Don't make
730         __pthread_mutexattr_setkind_np weak.
731
732 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
733
734         * manager.c (pthread_handle_create): Check whether sched_setscheduler
735         call can succeed here.
736
737         * mutex.c: Define __pthread_mutexattr_settype and make
738         __pthread_mutexattr_setkind_np an alias.
739         Likewise for __pthread_mutexattr_gettype.
740
741 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
742
743         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
744         is root.
745
746 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
747
748         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
749
750 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
751
752         * Examples/ex6.c: Include <unistd.h> for usleep.
753
754 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
755
756         * Examples/ex4.c (main): Use exit, not pthread_exit.
757
758 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
759
760         * Versions: Add __pthread_mutexattr_gettype and
761         __pthread_mutexattr_settype.
762         * lockfile.c: Use __pthread_mutexattr_settype instead of
763         __pthread_mutexattr_setkind_np.
764         * mutex.c: Define __pthread_mutexattr_gettype and
765         __pthread_mutexattr_settype.
766         * weak.c: Likewise.
767         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
768         __pthread_mutexattr_settype.
769         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
770         Use __pthread_mutexattr_settype.
771
772 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
773
774         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
775         * mutex.c: Define weak alias pthread_mutexattr_gettype and
776         pthread_mutexattr_settype.
777         * sysdeps/pthread/pthread.h: Declare these functions.
778         Move pthread_sigmask and pthread_kill declaration in separate header.
779         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
780
781 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
782
783         * Makefile: Add rules to compile and run tests.
784         * Examples/ex1.c: Little changes to fix warnings.
785         * Examples/ex2.c: Likewise.
786         * Examples/ex3.c: Likewise.
787         * Examples/ex4.c: Likewise.
788         * Examples/ex5.c: Likewise.
789         * Examples/ex6.c: New file.
790
791 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
792
793         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
794
795 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
796
797         * attr.c: Include <string.h>.
798
799 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
800
801         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
802         * internals.h: Include limits.h.
803         * manager.c: Use memcpy to copy sched_param.
804         * ptfork.c: Include errno.h.
805         * pthread.c: Likewise.
806         * semaphore.c: Likewise.
807         * specific.c: Likewise.
808         * spinlock.h: Likewise.
809         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
810         type definition to ...
811         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
812
813 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
814
815         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
816
817         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
818         as macros as demanded in POSIX.1, Annex C.
819
820 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
821
822         * internals.h (struct pthread_request): For free use pthread_t
823         instead of pthread_descr.
824         * join.c (pthread_join): Pass thread_id, not th to manager.
825         (pthread_detach): Likewise.
826         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
827         (pthread_exited): Remove detached queue code.
828         (pthread_handle_free): Expect thread ID parameter and use it to
829         validate the thread decsriptor.  Don't use detached queue.
830         Patches by Xavier Leroy.
831
832 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
833
834         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
835         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
836         __pthread_atfork, __pthread_key_create, __pthread_once.
837         * internals.h: Doc fix.
838         * pthread.c (__pthread_initialize): Define again.
839
840 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
841
842         * manager.c (pthread_exited): If thread is not detached put it on
843         special list.
844         (pthread_handle_free): If thread is not on list with living threads
845         search on list with detached threads.
846
847         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
848         for new definition of pthread_rwlock_t.
849
850         * spinlock.c: Correct test whether to compile
851         __pthread_compare_and_swap or not.
852
853 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
854
855         * attr.c: Finish user stack support.  Change locking code to be safe
856         in situations with different priorities.
857         * cancel.c: Likewise.
858         * condvar.c: Likewise.
859         * internals.h: Likewise.
860         * join.c: Likewise.
861         * manager.c: Likewise.
862         * mutex.c: Likewise.
863         * pthread.c: Likewise.
864         * ptlongjmp.c: Likewise.
865         * queue.h: Likewise.
866         * rwlock.c: Likewise.
867         * semaphore.c: Likewise.
868         * semaphore.h: Likewise.
869         * signals.c: Likewise.
870         * spinlock.c: Likewise.
871         * spinlock.h: Likewise.
872         * sysdeps/pthread/pthread.h: Likewise.
873         Patches by Xavier Leroy.
874
875         * sysdeps/i386/i686/pt-machine.h: New file.
876
877 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
878
879         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
880         [sg]et_stackaddr prototypes always available.
881
882         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
883         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
884
885 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
886
887         * manager.c (pthread_free): Undo patch from 980430.
888         Reported by David Wragg <dpw@doc.ic.ac.uk>.
889
890 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
891
892         * manager.c: Define __pthread_manager_adjust_prio and use it to
893         increase priority when needed.
894         * internals.h: Add prototype for __pthread_manager_adjust_prio.
895         * mutex.c: Optimize mutexes to wake up only one thread.
896         * pthread.c: Move PID of manager for global variable in structure
897         element.
898         Patches by Xavier Leroy.
899
900 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
901
902         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
903
904 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
905
906         * attr.c: Correct typo.
907
908 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
909
910         * manager.c (pthread_free): Unmap guard before the stack.
911         Patch by Matthias Urlichs.
912
913 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
914
915         * manager.c (pthread_free): Detect already free child.
916         Patch by Xavier Leroy, reported by Matthias Urlichs.
917
918 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
919
920         * Makefile (linuxthreads-version): Renamed back from
921         libpthread-version.
922
923 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
924
925         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
926         __libc_longjmp.
927
928 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
929
930         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
931         * internals.h: Add definitions for new spinlock implementation.
932         * ptlongjmp.c: New file.
933         * spinlock.c: New file.
934         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
935         new function __pthread_acquire to prevent deadlocks with thread
936         with different priorities.
937         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
938
939 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
940
941         * manager.c (__pthread_manager): Reduce first argument to select
942         to include just the needed file descriptor.
943
944 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
945
946         * manager.c: Fix last patch which caused core dumps.
947
948         * pthread.c: Correctly handle missing SIGRTMIN.
949
950 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
951
952         * libpthread.map: Add __libc_internal_tsd_get and
953         __libc_internal_tsd_set.  Add missing cancelable functions. Export
954         libc internal versions of the cancelable functions.
955
956 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
957
958         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
959
960 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
961
962         * attr.c: Implement pthread_attr_[gs]etguardsize,
963         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
964         Change pthread_attr_init to have two interfaces.
965         * internals.h (struct _pthread_descr_struct): Add new fields for
966         above functions.
967         * libpthread.map: Add names in GLIBC_2.1 section.
968         * manager.c (pthread_handle_create): Implement guardsize and
969         user stack.
970         (pthread_free): Likewise.
971         * pthread.c (pthread_create): Add new interface for changed
972         pthread_attr_t.
973         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
974         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
975         PTHREAD_STACK_MIN.
976
977 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
978
979         * manager.c: Enable resetting of the thread scheduling policy
980         to SCHED_OTHER when the parent thread has a different one.
981
982 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
983
984         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
985         _POSIX_ASYNCHRONOUS_IO.
986
987         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
988         mutexes.
989         * mutex.c: Implement new mutex types.
990
991         * internals.h: Include <signal.h>.
992
993         * libpthread.map: Add __erno_location and __h_errno_location.
994
995         * errno.c: Return pointer to variable actually in use.  This might
996         not be the one in the thread structure.
997         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
998         and p_h_errnop.
999         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1000         of manager thread structure.
1001         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1002         thread.
1003         * pthread.c: Adapt initializer for thread structures.
1004         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1005         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1006         current thread to global variables.
1007
1008 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1009
1010         * rwlock.c: New file.
1011         * Makefile (libpthread-routines): Add rwlock.
1012         * sysdeps/pthread/pthread.h: Define data structures and declare
1013         functions.
1014         * libpthread.map: Add new functions.
1015
1016 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1017
1018         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1019         * sysdeps/arm/Implies: likewise.
1020         * README: Document it.
1021
1022 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1023
1024         * signals.c: Remove unneeded initializer for sigwaited, saving a
1025         warning.
1026
1027 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1028
1029         * semaphore.c (sem_init): Set sem_spinlock only if available.
1030
1031 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1032
1033         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1034         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1035
1036         * Makefile: Update from LinuxThreads 0.7.
1037         * internals.h. Likewise.
1038         * manager.c: Likewise.
1039         * mutex.c: Likewise.
1040         * pthread.c: Likewise.
1041         * signals.c: Likewise.
1042         * specific.c: Likewise.
1043         * Examples/ex3.c: Likewise.
1044
1045 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1046
1047         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1048         open.
1049
1050 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1051
1052         * wrapsyscall.c: Add socket functions which are also cancelation
1053         points.
1054
1055 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1056
1057         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1058         New functions for fast thread specific data within libc.
1059
1060         * internals.h: Add new array p_libc_specific to struct
1061         _pthread_descr_struct.
1062
1063         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1064
1065 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1066
1067         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1068         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1069
1070 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1071
1072         * internals.h (struct _pthread_descr_struct): Add definitions for
1073         two-level specific key handling.
1074         * manager.c (pthread_handle_create): Initialize specific memory array.
1075         * specific.c: Implement two-level key handling.
1076         * weaks.c: Don't provide dummy key handling.
1077         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1078         Add definition of __libc_key_t.
1079         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1080         as 1024.
1081         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1082         PTHREAD_DESTRUCTOR_ITERATIONS.
1083
1084         * manager.c (pthread_handle_create): Compare mmap result with
1085         MAP_FAILED.
1086
1087         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1088         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1089
1090 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1091
1092         sysdeps/sparc -> sysdeps/sparc/sparc32
1093         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1094
1095         * internals.h: Change definition of THREAD_SELF to be an expression,
1096         not a statement that did a return.
1097         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1098         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1099         Follow Solaris and use a "system reserved" register (%g6) to hold
1100         the thread descriptor.
1101         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1102
1103 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1104
1105         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1106         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1107         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1108
1109         * semaphore.c: Include spinlock.h only when needed.
1110
1111         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1112         keys for entries not in use.
1113
1114         * weaks.c: Implement key handling functions for real.
1115
1116 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1117
1118         Initial sparc64-linux support:
1119         * linuxthreads/sysdeps/sparc64/Implies: New file.
1120         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1121
1122 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1123
1124         * semaphore.c: Include spinlock.h at correct place.
1125         Patch by HJ Lu.
1126
1127 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1128
1129         The Great Bit File Move:
1130         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1131         * sysdeps/powerpc/semaphorebits.h: Likewise.
1132         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1133         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1134         * sysdeps/pthread/libc-lock.h: -> bits/
1135         * sysdeps/pthread/stdio-lock.h: Likewise.
1136         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1137         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1138         * semaphore.h: Likewise.
1139         * sysdeps/pthread/pthread.h: Likewise.
1140
1141         * lockfile.c: <foo.h> -> <bits/foo.h>.
1142         * semaphore.h: Likewise.
1143
1144         * Makefile: (headers): foo.h -> bits/foo.h.
1145         * sysdeps/pthread/Makefile: Likewise.
1146
1147 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1148
1149         * semaphore.c (sem_init): Set sem_spinlock only if available.
1150
1151         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1152         asm constraints.
1153
1154 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1155
1156         Update from LinuxThreads 0.6.
1157
1158         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1159         and __sched_get_priority_min instead of names without `__'.
1160
1161         * manager.c: Rewrite large parts to implement opaque pthread_t.
1162
1163         * cancel.c: Adapt for opaque pthread_t type.
1164         * condvar.c: Likewise.
1165         * errno.c: Likewise.
1166         * join.c: Likewise.
1167         * mutex.c: Likewise.
1168         * pthread.c: Likewise.
1169         * signals.c: Likewise.
1170         * specific.c: Likewise.
1171         * restart.h: Likewise.
1172         * queue.h: Likewise.
1173         * Examples/ex3.c: Likewise.
1174         * Examples/ex4.c: Likewise.
1175         * sysdeps/pthread/pthread.h: Likewise.
1176
1177         * pthread.c: Accumulate time for all threads in thread manager.
1178
1179         * semaphore.c: Implement fallback implementation for architectures
1180         sometimes missing compare-exchange operations.
1181
1182         * cancel.c (pthread_cancel): Validate handle argument.
1183         * join.c (pthread_join): Likewise.
1184         (pthread_detach): Likewise.
1185         * signals.c (pthread_kill): Likewise.
1186
1187         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1188
1189         * queue.h (enqueue): Enqueue thread according to priority.
1190
1191         * internals.c (struct pthread_start_args): New struct for passing
1192         args to cloning function.
1193         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1194         opaque pthread_t.
1195
1196         * Examples/Makefile (clean): Pass -f option to rm.
1197
1198         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1199         and define TEST_FOR_COMPARE_AND_SWAP.
1200         * sysdeps/i386/i486/pt-machine.h: Removed.
1201
1202         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1203         to 1024.
1204
1205 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1206
1207         * restart.h (suspend): Clear p_signal before suspending.
1208         (suspend_with_cancellation): Likewise.
1209         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1210
1211         * weaks.c: Make __pthread_key_create return 1.
1212         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1213         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1214         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1215         using libio.
1216
1217 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1218
1219         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1220
1221 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1222
1223         * sysdeps/powerpc/Implies: Added.
1224         * sysdeps/powerpc/pt-machine.h: Added.
1225         * sysdeps/powerpc/semaphorebits.h: Added.
1226
1227 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1228
1229         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1230         initializer.
1231         (__pthread_manager_thread): Likewise.
1232         Reported by Andreas Jaeger.
1233
1234 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1235
1236         Since sigset_t no longer fits in a register, we can't pass in the
1237         thread's initial mask so easily.  Take this opportunity to simplify
1238         the clone implementation by only accepting a single void* argument.
1239
1240         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1241         in the thread struct instead of as arguments through clone.
1242         (pthread_start_thread): Look for them there.
1243         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1244         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1245         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1246         clone invocation.