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