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