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