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