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